|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.cams.access.AbstractAccessControlRule
AbstractAccessControlRule is an abstract implementation of
AccessControlRule that provides an implementation for basic methods.
Concrete AbstractControlRule implementations may extend this class and
override the "evaluate" method.
| Field Summary | |
protected Config |
config
The Config from which resources are made available. |
protected boolean |
debug
A flag that enables/disables DEBUG-level messages. |
protected String |
desc
A textual description of the AccessControlRule. |
protected String |
id
The AccessControlRule ID (unique within SecurityDomain). |
protected Logger |
logger
Logger for this object |
| Constructor Summary | |
AbstractAccessControlRule()
Create a new AccessControlRule. |
|
AbstractAccessControlRule(String id)
Create a new AccessControlRule with the specified ID. |
|
| Method Summary | |
void |
destroy()
Destroy the AccessControlRule. |
abstract 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. |
boolean |
setDebug(boolean enable)
Enable or disable debugging. |
void |
setDescription(String desc)
Set a description of this AccessControlRule. |
void |
setId(String id)
Set the identifier. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean debug
protected String id
protected String desc
protected Config config
protected Logger logger
| Constructor Detail |
public AbstractAccessControlRule()
public AbstractAccessControlRule(String id)
id - the AccessControlRule identifier.| Method Detail |
public boolean setDebug(boolean enable)
setDebug in interface Debuggableenable - if true, enable debugging, else disable debugging.
public void initialize(Config config)
throws ConfigException
initialize in interface AccessControlRuleconfig - a Config object that provides access to configuration
parameters and a runtime Context.
ConfigExceptionpublic String getId()
getId in interface AccessControlRulepublic void setId(String id)
setId in interface AccessControlRuleid - a unique identifier for the AccessControlRule.public String getDescription()
getDescription in interface AccessControlRulepublic void setDescription(String desc)
setDescription in interface AccessControlRuledesc - a textual description of this rule.
public abstract boolean evaluate(InternalAccessControlRequest accessRequest,
InternalAccessControlResponse accessResponse)
throws EvaluationException
evaluate in interface AccessControlRuleaccessRequest - the access request.accessResponse - the access response.
EvaluationException - if an error when attempting to
evaluate the rule.public void destroy()
destroy in interface AccessControlRule
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||