flux.security
Class Role

java.lang.Object
  extended by flux.security.Role
All Implemented Interfaces:
java.io.Serializable

public class Role
extends java.lang.Object
implements java.io.Serializable

Security role that grants or restricts access to different parts of engines in the cluster as well as the Operations Console.

All other privileges pertain to engines in the cluster only.

There are two predefined, built-in roles: Administrator and Flow Chart Master. An Administrator has all privileges, while a Flow Chart Master can perform typical "day-to-day" activities but no "administrative" activities. A newly instantiated Role object contains the same privileges as the built-in Flow Chart Master role.

Changing any information through this Role does not take effect until SecurityAdministrator.putRole() is called, which requires administrator privileges.

Author:
Copyright 2014 Flux Corporation. All rights reserved.
See Also:
SecurityAdministrator, Serialized Form

Constructor Summary
Role()
           
 
Method Summary
 java.util.SortedSet<Privilege> getPrivileges()
          Returns the privileges for this role.
 java.lang.String getRoleDescription()
          Returns a description of this role meant for human consumption.
 java.lang.String getRoleName()
          Returns the name of this role.
 boolean hasPrivilege(Privilege privilege)
          Returns whether this role has this privilege.
 void setPrivileges(Privilege... privileges)
          Sets the privileges for this role.
 void setRoleDescription(java.lang.String roleDescription)
          Sets a description of this role meant for human consumption.
 void setRoleName(java.lang.String roleName)
          Sets the name of this role.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Role

public Role()
Method Detail

getPrivileges

public java.util.SortedSet<Privilege> getPrivileges()
Returns the privileges for this role.

Returns:
The privileges for this role.

getRoleDescription

public java.lang.String getRoleDescription()
Returns a description of this role meant for human consumption.

Returns:
A description of this role meant for human consumption.

getRoleName

public java.lang.String getRoleName()
Returns the name of this role.

Returns:
The name of this role.

hasPrivilege

public boolean hasPrivilege(Privilege privilege)
Returns whether this role has this privilege.

Parameters:
privilege - Privilege to check in this role.
Returns:
Whether this role has this privilege.

setPrivileges

public void setPrivileges(Privilege... privileges)
Sets the privileges for this role.

Parameters:
privileges - The privileges for this role.

setRoleDescription

public void setRoleDescription(java.lang.String roleDescription)
Sets a description of this role meant for human consumption.

Parameters:
roleDescription - A description of this role meant for human consumption.

setRoleName

public void setRoleName(java.lang.String roleName)
Sets the name of this role.

Parameters:
roleName - The name of this role.
Throws:
java.lang.IllegalArgumentException - If name is null or empty.


© 2014 Flux Corporation. All rights reserved.