com.gentics.api.lib.rule
Class Rule

java.lang.Object
  extended by com.gentics.api.lib.rule.Rule

public class Rule
extends Object

Instances of Class Rule can be used to match Resolvables against a given RuleTree.


Constructor Summary
Rule(RuleTree ruleTree)
          Create an instance that matches against the given RuleTree
 
Method Summary
 RuleTree getRuleTree()
          Get the RuleTree this Rule uses
 boolean isConstant()
          Check whether the rule is constant or not.
 boolean match()
          Match the rule
 boolean match(Resolvable object)
          Match the given Resolvable against the rule tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rule

public Rule(RuleTree ruleTree)
Create an instance that matches against the given RuleTree

Parameters:
ruleTree - rule tree
Method Detail

match

public boolean match(Resolvable object)
Match the given Resolvable against the rule tree

Parameters:
object - object to insert into rule for all object.* variables
Returns:
true when the object matches or false if not

match

public boolean match()
Match the rule

Returns:
true when the rule matches, or false if not

getRuleTree

public RuleTree getRuleTree()
Get the RuleTree this Rule uses

Returns:
returns RuleTree object of this Rule

isConstant

public boolean isConstant()
Check whether the rule is constant or not. A constant rule will or will not match against any resolvable object independent from the object's properties.

Returns:
true for constant rules, false otherwise


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.