com.cafesoft.cams.attr
Class StandardAttributeCondition

java.lang.Object
  extended by com.cafesoft.cams.attr.StandardAttributeCondition
All Implemented Interfaces:
AttributeCondition

public class StandardAttributeCondition
extends Object
implements AttributeCondition

StandardAttributeCondition implements the AttributeCondition interface, which contains a disjunctive sequence of AttributeMatch instances for a given attribute category. StandardAttributeCondition evaluates the enclosed list of AttributeMatch instances and returns true if ANY AttributeMatch returns true.

Since:
5/6/2004

Constructor Summary
StandardAttributeCondition(URI attrCategory)
          Create a new StandardAttributeCondition instance.
 
Method Summary
 URI getAttributeCategory()
          Returns the attribute category of this AttributeCondition.
 List getAttributeMatchList()
          Get the List of AttributeMatchs.
 MatchResult match(EvaluationContext evalContext)
          Determines whether this AttributeCondition matches the input request (whether it is applicable)
 void setAttributeMatchList(List attrMatchList)
          Set the List of AttributeMatchs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardAttributeCondition

public StandardAttributeCondition(URI attrCategory)
                           throws IllegalArgumentException
Create a new StandardAttributeCondition instance.

Parameters:
attrCategory - the attribute category.
Throws:
IllegalArgumentException - if the attribute category is null or does not start with the required namespace.
Method Detail

getAttributeCategory

public URI getAttributeCategory()
Returns the attribute category of this AttributeCondition.

Specified by:
getAttributeCategory in interface AttributeCondition
Returns:
the attribute category.

setAttributeMatchList

public void setAttributeMatchList(List attrMatchList)
Set the List of AttributeMatchs.

Specified by:
setAttributeMatchList in interface AttributeCondition
Parameters:
attrMatchList - the List of AttributeMatchs.
Throws:
IllegalArgumentException - if the List contains an object that does not implement AttributeMatch or it does not have the same attribute category as this AttributeCondition.

getAttributeMatchList

public List getAttributeMatchList()
Get the List of AttributeMatchs.

Specified by:
getAttributeMatchList in interface AttributeCondition
Returns:
a List of AttributeMatchs. If none, an empty List is returned.

match

public MatchResult match(EvaluationContext evalContext)
Determines whether this AttributeCondition matches the input request (whether it is applicable)

Specified by:
match in interface AttributeCondition
Parameters:
evalContext - the representation of the request
Returns:
the result of trying to match the AttributeCondition and the request


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.