Package com.netscape.cms.evaluators
Class IPAddressAccessEvaluator
- java.lang.Object
-
- com.netscape.cms.evaluators.IPAddressAccessEvaluator
-
- All Implemented Interfaces:
IAccessEvaluator
public class IPAddressAccessEvaluator extends java.lang.Object implements IAccessEvaluator
A class represents a IP address acls evaluator.- Version:
- $Revision$, $Date$
-
-
Constructor Summary
Constructors Constructor Description IPAddressAccessEvaluator()
Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(IAuthToken authToken, java.lang.String type, java.lang.String op, java.lang.String value)
Gets the IP address from session contextboolean
evaluate(java.lang.String type, java.lang.String op, java.lang.String value)
evaluates uid in SessionContext to see if it has membership in group valuejava.lang.String
getDescription()
gets the description for this acl evaluatorjava.lang.String[]
getSupportedOperators()
Get the supported operators for this evaluatorjava.lang.String
getType()
gets the type name for this acl evaluatorvoid
init()
initialization.
-
-
-
Method Detail
-
init
public void init()
initialization. nothing for now.- Specified by:
init
in interfaceIAccessEvaluator
-
getType
public java.lang.String getType()
gets the type name for this acl evaluator- Specified by:
getType
in interfaceIAccessEvaluator
- Returns:
- type for this acl evaluator: ipaddress
-
getDescription
public java.lang.String getDescription()
gets the description for this acl evaluator- Specified by:
getDescription
in interfaceIAccessEvaluator
- Returns:
- description for this acl evaluator
-
getSupportedOperators
public java.lang.String[] getSupportedOperators()
Description copied from interface:IAccessEvaluator
Get the supported operators for this evaluator- Specified by:
getSupportedOperators
in interfaceIAccessEvaluator
- Returns:
- Supported operators in string array
-
evaluate
public boolean evaluate(IAuthToken authToken, java.lang.String type, java.lang.String op, java.lang.String value)
Gets the IP address from session context- Specified by:
evaluate
in interfaceIAccessEvaluator
- Parameters:
authToken
- authentication tokentype
- must be "ipaddress"op
- must be "=" or "!="value
- the ipaddress- Returns:
- true if the evaluation expression is matched; false otherwise.
-
evaluate
public boolean evaluate(java.lang.String type, java.lang.String op, java.lang.String value)
evaluates uid in SessionContext to see if it has membership in group value- Specified by:
evaluate
in interfaceIAccessEvaluator
- Parameters:
type
- must be "group"op
- must be "="value
- the group name- Returns:
- true if SessionContext uid belongs to the group value, false otherwise
-
-