org.eclipse.actf.validation.rules
Class NodeNameCriterion
java.lang.Object
org.eclipse.actf.validation.rules.AbstractCriterion
org.eclipse.actf.validation.rules.NodeNameCriterion
- All Implemented Interfaces:
- ICriterion
public class NodeNameCriterion
- extends AbstractCriterion
Methods inherited from class org.eclipse.actf.validation.rules.AbstractCriterion |
addPart, equals, getAttribute, getParent, getParts, getRuleSet, hashCode, setAttribute, setParent, setParts, setRuleSet |
NodeNameCriterion
public NodeNameCriterion()
getTargetNodeName
public String getTargetNodeName()
apply
public boolean apply(IValidationContext context,
Object target)
throws Exception
- Description copied from interface:
ICriterion
- apply this rule to the given target using the given
context. The returned value indicates whether or not a violation of
some kind has taken place.
Note that the context object can be used to retrieve a great deal of information about the current validation
process. In particular, it can be used to update the validation report being generated with
the violations that result from an application of this rule to the given target.
- 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:
ICriterion.initialize(Object)
,
IValidationContext
,
ValidationContextConstants
initialize
public void initialize(Object content)
throws Exception
- Description copied from interface:
ICriterion
- 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 any time prior to calling
apply
.
- Parameters:
content
- - initialization content for the rule
- Throws:
Exception
- See Also:
ICriterion.apply(IValidationContext, Object)