issrg.pba.rbac.policies
Class UserActionTargetDomain

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

public class UserActionTargetDomain
extends UserAction

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

Author:
sfl

Constructor Summary
UserActionTargetDomain(java.lang.String actionName, Subtree targetDomain)
          Creates a UserActionTargetDomain given the action and the target domain.
 
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 are 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

UserActionTargetDomain

public UserActionTargetDomain(java.lang.String actionName,
                              Subtree targetDomain)
Creates a UserActionTargetDomain given the action and the target domain.

Parameters:
actionName - the name of the action
targetDomain - the target domain
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 are not the given action and target match this object. The matching will return true if the given action is equal to the action stored in this object and when the given target is part of the target domain stored in this object.

Specified by:
matches in class UserAction
Parameters:
action - a string representing the action name
target - a string representing the target
Returns:
true if the given action and target match the action and target domain stored in this object, false otherwise.