com.cafesoft.cams.access.attr
Class StandardAttributeTarget

java.lang.Object
  |
  +--com.cafesoft.cams.access.attr.StandardAttributeTarget
All Implemented Interfaces:
AttributeTarget

public class StandardAttributeTarget
extends Object
implements AttributeTarget

StandardAttributeTarget implements a conjunctive sequence of AttributeConditions instances used to match an AccessControlRequest. Each AttributeConditions instance must have a unique attribute category. AttributeTarget is responsible for matching AttributeConditions instances and returning a "MATCH" status if ALL AttributeConditions match. AttributeConditions are matched in the order specified by a List.

Since:
5/10/2004

Constructor Summary
StandardAttributeTarget(AccessControlRule acr, String desc)
          Create a new StandardAttributeTarget instance.
 
Method Summary
 AccessControlRule getAccessControlRule()
          Returns the associated AccessControlRule.
 List getAttributeConditionsList()
          Get the List of AttributeConditions to be matched.
 String getDescription()
          Returns a textual description.
 MatchResult match(EvaluationContext evalContext)
          Determines whether this AttributeTarget matches the input request (whether it is applicable).
 void setAttributeConditionsList(List attrCondsList)
          Set the List of AttributeConditions to be matched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardAttributeTarget

public StandardAttributeTarget(AccessControlRule acr,
                               String desc)
                        throws IllegalArgumentException
Create a new StandardAttributeTarget instance.

Parameters:
acr - the AccessControlRule.
desc - a textual description of the target.
Throws:
IllegalArgumentException - if the access control rule is null.
Method Detail

getDescription

public String getDescription()
Returns a textual description.

Specified by:
getDescription in interface AttributeTarget
Returns:
a textual description of the AttributeTarget or null if no description is available.

getAccessControlRule

public AccessControlRule getAccessControlRule()
Returns the associated AccessControlRule.

Specified by:
getAccessControlRule in interface AttributeTarget
Returns:
the AccessControlRule associated with this AttributeTarget. NOTE: It is the caller's responsibility to evaluate the AccessControlRule in the event that an AccessControlRequest matches this AttributeTarget.

setAttributeConditionsList

public void setAttributeConditionsList(List attrCondsList)
                                throws IllegalArgumentException
Set the List of AttributeConditions to be matched.

Specified by:
setAttributeConditionsList in interface AttributeTarget
Parameters:
attrCondsList - the List of AttributeConditions.
Throws:
IllegalArgumentException - if one of the objects within the List does not implement AttributeConditions or if multiple AttributeConditions have the same attribute category.

getAttributeConditionsList

public List getAttributeConditionsList()
Get the List of AttributeConditions to be matched.

Specified by:
getAttributeConditionsList in interface AttributeTarget
Returns:
a List of AttributeConditions or an empty List if no current AttributeConditions.

match

public MatchResult match(EvaluationContext evalContext)
Determines whether this AttributeTarget matches the input request (whether it is applicable). This will be true only if ALL enclosed AttributeConditionss match.

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


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.