|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.platform.security.api.StandardAuthorizationActions
public class StandardAuthorizationActions
The static and closed set of basic authorization actions. Actions include "create", "read", "update", and "delete".
The instances are static to both close the set and minimize VM resource requirements.
AuthorizationActions,
Serialized Form| Field Summary | |
|---|---|
static AuthorizationActions |
ALL
|
static int |
ALL_VALUE
|
static AuthorizationActions |
DATA_CREATE
|
static java.lang.String |
DATA_CREATE_LABEL
|
static int |
DATA_CREATE_VALUE
|
static AuthorizationActions |
DATA_DELETE
|
static java.lang.String |
DATA_DELETE_LABEL
|
static int |
DATA_DELETE_VALUE
|
static AuthorizationActions |
DATA_READ
|
static java.lang.String |
DATA_READ_LABEL
|
static int |
DATA_READ_VALUE
|
static AuthorizationActions |
DATA_UPDATE
|
static java.lang.String |
DATA_UPDATE_LABEL
|
static int |
DATA_UPDATE_VALUE
|
static AuthorizationActions |
NONE
|
static java.lang.String |
NONE_LABEL
|
static int |
NONE_VALUE
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
Compares this AuthorizationActions to another Object. |
boolean |
containsLabel(java.lang.String label)
Return whether this instance contains the specified label |
boolean |
containsLabels(java.util.Collection labels)
Return whether this instance contains all of the specified labels |
boolean |
containsLabels(java.lang.String[] labels)
Return whether this instance contains all of the specified labels |
boolean |
equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. |
static java.lang.String[] |
getActionsLabels(int actionsValue)
Obtain the formatted String[] version of the given actionsValue. |
static java.lang.String |
getActionsString(int actionsValue)
Obtain the formatted String version of the given actionsValue. |
static AuthorizationActions |
getAuthorizationActions(java.util.Collection labels)
Obtain the AuthorizationActions instance that is associated with the specified set of labels. |
static AuthorizationActions |
getAuthorizationActions(int actions)
Obtain the AuthorizationActions instance that is associated with the specified set of actions. |
static AuthorizationActions |
getAuthorizationActions(java.lang.String labels)
Obtain the AuthorizationActions instance that is associated with the specified set of labels. |
static AuthorizationActions |
getAuthorizationActions(java.lang.String[] labels)
Obtain the AuthorizationActions instance that is associated with the specified set of labels. |
static AuthorizationActions |
getCommonActions(AuthorizationActions actions,
AuthorizationActions sharedActions)
Get the AuthorizationActions in actions that are also in
sharedActions. |
static AuthorizationActions |
getCommonActions(int actions,
int sharedActions)
Get the AuthorizationActions in actions that are also in
sharedActions. |
static AuthorizationActions |
getIndependantActions(AuthorizationActions actions,
AuthorizationActions sharedActions)
Get the AuthorizationActions in actions that are NOT in
sharedActions. |
static AuthorizationActions |
getIndependantActions(int actions,
int sharedActions)
Get the AuthorizationActions in actions that are NOT in
sharedActions. |
java.lang.String |
getLabel()
Return the label of this action. |
int |
getLabelCount()
Return the number of actions. |
java.lang.String[] |
getLabels()
Return the set of labels of this action. |
static AuthorizationActions |
getORedActions(AuthorizationActions actions,
AuthorizationActions otherActions)
Get the AuthorizationActions that or in actions OR are in
otherActions. |
int |
getValue()
Return the value of this action. |
int |
hashCode()
Returns the hashCode for the object. |
boolean |
implies(AuthorizationActions that)
Checks if the specified authorization's actions are "implied by" this object's actions. |
java.lang.String |
toString()
Returns the stringified representation for this user ID. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NONE_VALUE
public static final int DATA_CREATE_VALUE
public static final int DATA_READ_VALUE
public static final int DATA_UPDATE_VALUE
public static final int DATA_DELETE_VALUE
public static final int ALL_VALUE
public static final java.lang.String NONE_LABEL
public static final java.lang.String DATA_CREATE_LABEL
public static final java.lang.String DATA_READ_LABEL
public static final java.lang.String DATA_UPDATE_LABEL
public static final java.lang.String DATA_DELETE_LABEL
public static final AuthorizationActions NONE
public static final AuthorizationActions DATA_CREATE
public static final AuthorizationActions DATA_UPDATE
public static final AuthorizationActions DATA_READ
public static final AuthorizationActions DATA_DELETE
public static final AuthorizationActions ALL
| Method Detail |
|---|
public static AuthorizationActions getAuthorizationActions(int actions)
actions - the set of actions (logical inclusive OR)
java.lang.IllegalArgumentException - if the specified set of actions is
invalid.public static AuthorizationActions getAuthorizationActions(java.lang.String[] labels)
labels - the set of labels
java.lang.IllegalArgumentException - if the specified set of actions is
invalid.public static AuthorizationActions getAuthorizationActions(java.lang.String labels)
labels - the set of labels, with labels all being separated by commas,
and must correspond exactly to the getLabel of one of the actions.
java.lang.IllegalArgumentException - if the specified set of actions is
invalid.public static AuthorizationActions getAuthorizationActions(java.util.Collection labels)
labels - the set of labels
java.lang.IllegalArgumentException - if the specified set of actions is
invalid.
public static AuthorizationActions getORedActions(AuthorizationActions actions,
AuthorizationActions otherActions)
AuthorizationActions that or in actions OR are in
otherActions. May be StandardAuthorizationActions.NONE if there
are no actions in either argument.
actions - otherActions -
AuthorizationActions in both args or
StandardAuthorizationActions.NONE if none exist.
public static AuthorizationActions getCommonActions(AuthorizationActions actions,
AuthorizationActions sharedActions)
AuthorizationActions in actions that are also in
sharedActions. May be StandardAuthorizationActions.NONE if there
are no common actions.
actions - sharedActions -
AuthorizationActions common to both args or
StandardAuthorizationActions.NONE if none exist.
public static AuthorizationActions getCommonActions(int actions,
int sharedActions)
AuthorizationActions in actions that are also in
sharedActions. May be StandardAuthorizationActions.NONE if there
are no common actions.
actions - sharedActions -
AuthorizationActions common to both args or
StandardAuthorizationActions.NONE if none exist.
public static AuthorizationActions getIndependantActions(AuthorizationActions actions,
AuthorizationActions sharedActions)
AuthorizationActions in actions that are NOT in
sharedActions. May be actions if there are no common actions.
actions - sharedActions -
AuthorizationActions in actions that are NOT in
sharedActions.
public static AuthorizationActions getIndependantActions(int actions,
int sharedActions)
AuthorizationActions in actions that are NOT in
sharedActions. May be actions if there are no common actions.
actions - sharedActions -
AuthorizationActions in actions that are NOT in
sharedActions.public static java.lang.String[] getActionsLabels(int actionsValue)
actionsValue.
actionsValue - The set of actions to determiine labels.
java.lang.IllegalArgumentException - if the specified set of actions is
invalid.public static java.lang.String getActionsString(int actionsValue)
actionsValue.
actionsValue - The set of actions to determiine labels.
java.lang.IllegalArgumentException - if the specified set of actions is
invalid.public int getValue()
getValue in interface AuthorizationActionspublic int getLabelCount()
getLabelCount in interface AuthorizationActionspublic java.lang.String getLabel()
getLabel in interface AuthorizationActionspublic java.lang.String[] getLabels()
getLabels in interface AuthorizationActionspublic boolean containsLabel(java.lang.String label)
containsLabel in interface AuthorizationActionslabel - the single label that is to be checked
public boolean containsLabels(java.lang.String[] labels)
containsLabels in interface AuthorizationActionslabels - the array of labels that are to be checked
public boolean containsLabels(java.util.Collection labels)
containsLabels in interface AuthorizationActionslabels - the set of labels that are to be checked
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
compareTo().
equals in class java.lang.Objectobj - the object that this instance is to be compared to.
public int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
equals().
compareTo in interface java.lang.Comparableobj - the authorization to compare this instance against.
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this AuthorizationActions.public boolean implies(AuthorizationActions that)
More specifically, this method returns true if:
implies in interface AuthorizationActionsthat - the authorization action to check against.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||