nbi.xmlsec.xacml.builder
Class RuleBuilder

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
      extended bynbi.xmlsec.xacml.builder.RuleBuilder
All Implemented Interfaces:
PolicyTreeElementBuilder, XACMLObjectBuilder
Direct Known Subclasses:
DenyRuleBuilder, PermitRuleBuilder

public class RuleBuilder
extends AbstractPolicyTreeElementBuilder

Class to create rule instances.

Since:
Version:
$Revision: 1.4 $
Author:
Lutz Suhrbier

Field Summary
(package private)  Apply condition
          condition for this Rule or null if there is no condition.
(package private)  int effect
          effect that this Rule will return from the evaluate method (Permit or Deny) if the request applies.
 
Fields inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
description, identifier, target
 
Constructor Summary
RuleBuilder(URI identifier, boolean permit)
          Creates a rule builder with required elements.
 
Method Summary
 PolicyTreeElement getInstance()
          Creates an instance of the policy tree element built.
 void setCondition(Apply condition)
          Sets the condition for this rule
 void setCondition(ConditionTypeBuilder condition)
          Sets the condition for this rule
 void setEffect(boolean permit)
          Sets the effect that this Rule will return from the evaluate method (Permit or Deny) if the request applies.
 
Methods inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
setDescription, setIdentifier, setIdentifier, setTarget, setTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

effect

int effect
effect that this Rule will return from the evaluate method (Permit or Deny) if the request applies.


condition

Apply condition
condition for this Rule or null if there is no condition.

Constructor Detail

RuleBuilder

public RuleBuilder(URI identifier,
                   boolean permit)
Creates a rule builder with required elements.

Parameters:
identifier - rule identifier.
permit - true, to set the effect to PERMIT, false sets the effect to DENY.
Method Detail

getInstance

public PolicyTreeElement getInstance()
Description copied from class: AbstractPolicyTreeElementBuilder
Creates an instance of the policy tree element built.

Specified by:
getInstance in interface PolicyTreeElementBuilder
Specified by:
getInstance in class AbstractPolicyTreeElementBuilder
See Also:
PolicyTreeElementBuilder.getInstance()

setEffect

public void setEffect(boolean permit)
Sets the effect that this Rule will return from the evaluate method (Permit or Deny) if the request applies.

Parameters:
permit - true, to set the effect to permit, false sets the effect to deny.

setCondition

public void setCondition(Apply condition)
Sets the condition for this rule

Parameters:
condition - The condition for this rule to set.

setCondition

public void setCondition(ConditionTypeBuilder condition)
Sets the condition for this rule

Parameters:
condition - The condition for this rule to set.


Copyright © 2006 Lutz Suhrbier, Freie Universitšt Berlin. All Rights Reserved.