issrg.pba.rbac.policies
Class UserActionTargetName

java.lang.Object
  extended by issrg.pba.rbac.policies.UserAction
      extended by issrg.pba.rbac.policies.UserActionTargetName

public class UserActionTargetName
extends UserAction

Class representing a user action on a target represented as a target name.

Author:
sfl

Constructor Summary
UserActionTargetName(java.lang.String actionName, java.lang.String targetName)
          Constructs a UserActionTargetName object given the name and the target.
 
Method Summary
 java.lang.String getAction()
          Returns a string representing the action name.
 java.lang.String getTarget()
          Returns a string representing the target.
 boolean matches(java.lang.String action, java.lang.String target)
          Decides whether or not the given action and target match this object.
 
Methods inherited from class issrg.pba.rbac.policies.UserAction
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserActionTargetName

public UserActionTargetName(java.lang.String actionName,
                            java.lang.String targetName)
Constructs a UserActionTargetName object given the name and the target.

Parameters:
actionName - the name of the action
targetName - the name of the target
Method Detail

getAction

public java.lang.String getAction()
Returns a string representing the action name.

Specified by:
getAction in class UserAction
Returns:
a string representing the action name

getTarget

public java.lang.String getTarget()
Returns a string representing the target.

Specified by:
getTarget in class UserAction
Returns:
a string representing the target

matches

public boolean matches(java.lang.String action,
                       java.lang.String target)
Decides whether or not the given action and target match this object. Because the target is represented as a target name, both the action and target matching are simply done by comparing strings for equality.

Specified by:
matches in class UserAction
Parameters:
action - the requested action
target - the requested target
Returns: