com.cafesoft.cams.oblig
Class StandardObligation

java.lang.Object
  |
  +--com.cafesoft.cams.oblig.StandardObligation
All Implemented Interfaces:
Obligation

public final class StandardObligation
extends Object
implements Obligation

Standard implementation of the Obligation.

Since:
9/22/04
See Also:
Obligation

Constructor Summary
StandardObligation(URI id, String desc, AttributeSet attrSet)
          Create a new StandardObligation object.
StandardObligation(URI id, String desc, List evalResultMatchList, List effectMatchList, AttributeSet attrSet)
          Create a new StandardObligation object.
 
Method Summary
 int getAttributeCount()
          Get the number of attributes.
 AttributeSet getAttributes()
          Get the attributes.
 String getDescription()
          Get the obligation description.
 URI getId()
          Get the obligation identifier.
 boolean matches(Effect effect)
          Determine if this Obligation matches a given Effect.
 boolean matches(EvaluationResult evalResult)
          Determine if this Obligation matches a given security component evaluation result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardObligation

public StandardObligation(URI id,
                          String desc,
                          AttributeSet attrSet)
Create a new StandardObligation object.

Parameters:
id - the id of the new Obligation.
desc - the description of the new Obligation.
attrSet - a set of Attributes.

StandardObligation

public StandardObligation(URI id,
                          String desc,
                          List evalResultMatchList,
                          List effectMatchList,
                          AttributeSet attrSet)
Create a new StandardObligation object.

Parameters:
id - the id of the new Obligation.
desc - the description of the new Obligation.
evalResultMatchList - a List of EvaluationResultMatch objects.
effectMatchList - a List of EffectMatch objects.
attrSet - a set of Attributes.
Method Detail

getId

public URI getId()
Get the obligation identifier.

Specified by:
getId in interface Obligation
Returns:
the obligation's identifier as a URI.

getDescription

public String getDescription()
Get the obligation description.

Specified by:
getDescription in interface Obligation
Returns:
a textual description of the obligation.

getAttributeCount

public int getAttributeCount()
Get the number of attributes.

Specified by:
getAttributeCount in interface Obligation
Returns:
the number of attributes for this Obligation instance.

getAttributes

public AttributeSet getAttributes()
Get the attributes.

Specified by:
getAttributes in interface Obligation
Returns:
the attributes for this Obligation instance.

matches

public boolean matches(EvaluationResult evalResult)
Determine if this Obligation matches a given security component evaluation result.

Specified by:
matches in interface Obligation
Parameters:
evalResult - the EvaluationResult.
Returns:
true if this Obligation matches the specified EvaluationResult else false.

matches

public boolean matches(Effect effect)
Determine if this Obligation matches a given Effect.

Specified by:
matches in interface Obligation
Parameters:
effect - the Effect to be matched.


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