com.netscape.cms.evaluators
Class UserAccessEvaluator

java.lang.Object
  extended by com.netscape.cms.evaluators.UserAccessEvaluator
All Implemented Interfaces:
IAccessEvaluator

public class UserAccessEvaluator
extends java.lang.Object
implements IAccessEvaluator

A class represents a user acls evaluator.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Constructor Summary
UserAccessEvaluator()
          Class constructor.
 
Method Summary
 boolean evaluate(IAuthToken authToken, java.lang.String type, java.lang.String op, java.lang.String value)
          Evaluates the user in AuthToken to see if it's equal to value
 boolean evaluate(java.lang.String type, java.lang.String op, java.lang.String value)
          Evaluates the user in session context to see if it's equal to value
 java.lang.String getDescription()
          gets the description for this acl evaluator
 java.lang.String[] getSupportedOperators()
          Get the supported operators for this evaluator
 java.lang.String getType()
          gets the type name for this acl evaluator
 void init()
          initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAccessEvaluator

public UserAccessEvaluator()
Class constructor.

Method Detail

init

public void init()
initialization. nothing for now.

Specified by:
init in interface IAccessEvaluator

getType

public java.lang.String getType()
gets the type name for this acl evaluator

Specified by:
getType in interface IAccessEvaluator
Returns:
type for this acl evaluator: "user" or "at_user"

getDescription

public java.lang.String getDescription()
gets the description for this acl evaluator

Specified by:
getDescription in interface IAccessEvaluator
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 interface IAccessEvaluator
Returns:
Supported operators in string array

evaluate

public boolean evaluate(IAuthToken authToken,
                        java.lang.String type,
                        java.lang.String op,
                        java.lang.String value)
Evaluates the user in AuthToken to see if it's equal to value

Specified by:
evaluate in interface IAccessEvaluator
Parameters:
authToken - AuthToken from authentication
type - must be "at_user"
op - must be "="
value - the user id
Returns:
true if AuthToken uid is same as value, false otherwise

evaluate

public boolean evaluate(java.lang.String type,
                        java.lang.String op,
                        java.lang.String value)
Evaluates the user in session context to see if it's equal to value

Specified by:
evaluate in interface IAccessEvaluator
Parameters:
type - must be "user"
op - must be "="
value - the user id
Returns:
true if SessionContext uid is same as value, false otherwise