package com.mostafa.security.policy;

import org.springframework.expression.Expression;

public class PolicyRule {
	/*
	 * Boolean SpEL expression where this policy applied 
	 */
	private Expression  target;
	
	/*
	 * Boolean SpEL expression, if evaluated to true, then access granted.
	 */
	private Expression  condition;
	
	

	public PolicyRule(Expression  target, Expression condition) {
		super();
		this.target = target;
		this.condition = condition;
	}

	public Expression  getTarget() {
		return target;
	}

	public void setTarget(Expression  target) {
		this.target = target;
	}

	public Expression  getCondition() {
		return condition;
	}

	public void setCondition(Expression  condition) {
		this.condition = condition;
	}
}

@@ -149,35 +149,88 @@
 sion
- where this policy applied 
+. If evaluated to true, then this rule is applied to the request access context.
 %0D%0A%09 

Make PolicyRule comments more descriptive