com.cafesoft.cams.access
Interface AccessControlRule

All Superinterfaces:
AccessControlRuleElement, Debuggable
All Known Implementing Classes:
AbstractAccessControlRule

public interface AccessControlRule
extends AccessControlRuleElement, Debuggable

AccessControlRule defines an interface for a rule that implements access control logic. The rule is evaluated based on an AccessControlRequest, AccessControlResponse, and any other parameters or logic associated with the concrete rule implementation.


Method Summary
 void destroy()
          Destroy the AccessControlRule.
 boolean evaluate(InternalAccessControlRequest accessRequest, InternalAccessControlResponse accessResponse)
          Evaluate the AccessControlRule.
 String getDescription()
          Get a description of this AccessControlRule.
 String getId()
          Get the identifier.
 void initialize(Config config)
          Initialize the AccessControlRule.
 void setDescription(String desc)
          Set a description of this AccessControlRule.
 void setId(String id)
          Set the identifier.
 
Methods inherited from interface com.cafesoft.core.util.Debuggable
setDebug
 

Method Detail

initialize

public void initialize(Config config)
                throws ConfigException
Initialize the AccessControlRule.

Parameters:
config - a Config object that provides access to configuration parameters and a runtime Context.
ConfigException

getId

public String getId()
Get the identifier.

Returns:
a unique identifier for the AccessControlRule for use it referencing and looking it up. Return null if no identifier.

setId

public void setId(String id)
Set the identifier.

Parameters:
id - a unique identifier for the AccessControlRule.

getDescription

public String getDescription()
Get a description of this AccessControlRule.

Returns:
a textual description of this rule or null if none available.

setDescription

public void setDescription(String desc)
Set a description of this AccessControlRule.

Parameters:
desc - a textual description of this rule.

evaluate

public boolean evaluate(InternalAccessControlRequest accessRequest,
                        InternalAccessControlResponse accessResponse)
                 throws EvaluationException
Evaluate the AccessControlRule.

Parameters:
accessRequest - the access request.
accessResponse - the access response.
Returns:
true if the rule evaluates to true, else false.
Throws:
EvaluationException - if an error when attempting to evaluate the rule. This condition may correspond to an unanticipated system error or an antipated precondition to evaluating the rule.

destroy

public void destroy()
Destroy the AccessControlRule. This method enables AccessControlRule implementations to release any runtime resources they may be holding.



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