org.gcube.accounting.security.authz
Class Role

java.lang.Object
  extended by org.gcube.accounting.security.authz.Role

public class Role
extends Object


Constructor Summary
Role(String name)
          Basic constructor
 
Method Summary
 void addAction(Action act)
          Add the given action to this role
 void addActions(Action... acts)
          Add the given actions to this role
 void addActions(Collection<Action> actions)
          Add the given actions to this role
 String getName()
          Return the name of the role
 boolean isAllowed(Action action)
          Check whether the role can perform the given action
 void setName(String name)
          Set the role name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Role

public Role(String name)
Basic constructor

Parameters:
name -
Method Detail

setName

public void setName(String name)
Set the role name

Parameters:
name -

getName

public String getName()
Return the name of the role

Returns:

isAllowed

public boolean isAllowed(Action action)
Check whether the role can perform the given action

Parameters:
action -
Returns:

addAction

public void addAction(Action act)
Add the given action to this role

Parameters:
act -

addActions

public void addActions(Action... acts)
Add the given actions to this role

Parameters:
acts -

addActions

public void addActions(Collection<Action> actions)
Add the given actions to this role

Parameters:
actions -


Copyright © 2013. All Rights Reserved.