org.eclipse.actf.validation.rules
Class OrRule

java.lang.Object
  extended by org.eclipse.actf.validation.rules.AbstractRule
      extended by org.eclipse.actf.validation.rules.OrRule
All Implemented Interfaces:
IRule

public class OrRule
extends AbstractRule

the actf:or rule

Author:
John Buslawski

Field Summary
 
Fields inherited from class org.eclipse.actf.validation.rules.AbstractRule
SEVERITY_MAP
 
Constructor Summary
OrRule()
           
 
Method Summary
 boolean apply(IValidationContext context, Object target)
          insures that either the target is not null or that, if the target is null, null targets can be ignored
 void initialize(Object content)
          initialize this rule with any content that might be necessary for its application to a target during the invocation of the apply method.
 
Methods inherited from class org.eclipse.actf.validation.rules.AbstractRule
addRulePart, findComponentCategory, findMessage, findRuleId, getAliasValue, getAttribute, getComponentCategory, getId, getIgnoreIfNull, getIterator, getLongDescription, getMessage, getName, getParent, getRepairHint, getRuleFactory, getRuleParts, getRuleSet, getSeverity, getTextTrim, isEnabled, isIgnoringNullTarget, processActfAttributes, report, setAttribute, setComponentCategory, setEnabled, setId, setIgnoreIfNull, setIteratorName, setLongDescription, setMessage, setName, setParent, setRepairHint, setRuleParts, setRuleSet, setSeverity, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrRule

public OrRule()
Method Detail

initialize

public void initialize(Object content)
                throws Exception
initialize this rule with any content that might be necessary for its application to a target during the invocation of the apply method.

The specified content may take any form. It may be an XML element, a .properties file, a string, etc. This method may be invoked anytime prior to calling apply.

Parameters:
content - - initialization content for the rule
Throws:
Exception
See Also:
IRule.apply(IValidationContext, Object)

apply

public boolean apply(IValidationContext context,
                     Object target)
              throws Exception
insures that either the target is not null or that, if the target is null, null targets can be ignored

Specified by:
apply in interface IRule
Overrides:
apply in class AbstractRule
Parameters:
context - context under which rule is being evaluated (supplied by engine)
target - object to which rule is to be applied
Returns:
whether or not the target violates the rule
Throws:
Exception
See Also:
IRule.initialize(Object), IValidationContext, ValidationContextConstants