flux.security
Class Privilege

java.lang.Object
  extended by flux.security.Privilege
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Privilege>

public final class Privilege
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<Privilege>

Defines a privilege for a security role. A privilege determines what actions a user can perform against an engine, the cluster, and the Operations Console.

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

Constructor Summary
Privilege(PrivilegeType privilegeType)
          Creates a permission to perform a certain function based on the specified type of privilege.
 
Method Summary
 int compareTo(Privilege that)
           
 boolean equals(java.lang.Object o)
           
 java.util.SortedSet<AccessibleActionVariable> getActionVariables()
          Returns action variables used by some permission types.
 java.util.SortedSet<AccessibleFlowChartVariable> getFlowChartVariables()
          Returns flow chart variables used by some permission types.
 java.util.SortedSet<java.lang.String> getNamespaces()
          Returns namespaces used by some permission types.
 PrivilegeType getType()
          Returns the underlying privilege type for this privilege.
 int hashCode()
           
 void setActionVariables(AccessibleActionVariable... actionVariables)
          Sets action variables used by some permission types.
 void setFlowChartVariables(AccessibleFlowChartVariable... flowChartVariables)
          Sets flow chart variables used by some permission types.
 void setNamespaces(java.lang.String... namespaces)
          Sets namespaces used by some permission types.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Privilege

public Privilege(PrivilegeType privilegeType)
Creates a permission to perform a certain function based on the specified type of privilege. Some privilege types permit or require additional information to be specified, which can be performed using the methods of this Privilege class.

Parameters:
privilegeType - The type of permission that this privilege grants.
Method Detail

getActionVariables

public java.util.SortedSet<AccessibleActionVariable> getActionVariables()
Returns action variables used by some permission types.

Returns:
Action variables used by some permission types. May be empty but not null.

getFlowChartVariables

public java.util.SortedSet<AccessibleFlowChartVariable> getFlowChartVariables()
Returns flow chart variables used by some permission types.

Returns:
Flow chart variables used by some permission types. May be empty but not null.

getNamespaces

public java.util.SortedSet<java.lang.String> getNamespaces()
Returns namespaces used by some permission types.

Returns:
Namespaces used by some permission types. May be empty but not null.

getType

public PrivilegeType getType()
Returns the underlying privilege type for this privilege.

Returns:
the underlying privilege type for this privilege.

setActionVariables

public void setActionVariables(AccessibleActionVariable... actionVariables)
Sets action variables used by some permission types. If the underlying privilege type does not access action variables, calling this method has no effect.

Parameters:
actionVariables - Action variables used by some permission types.

setFlowChartVariables

public void setFlowChartVariables(AccessibleFlowChartVariable... flowChartVariables)
Sets flow chart variables used by some permission types. If the underlying privilege type does not access flow chart variables, calling this method has no effect.

Parameters:
flowChartVariables - Flow chart variables used by some permission types.

setNamespaces

public void setNamespaces(java.lang.String... namespaces)
Sets namespaces used by some permission types. If the underlying privilege type does not access namespaces, calling this method has no effect.

Parameters:
namespaces - Namespaces used by some permission types.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(Privilege that)
Specified by:
compareTo in interface java.lang.Comparable<Privilege>


© 2014 Flux Corporation. All rights reserved.