public final class UserServicePermission extends Object
The possible states are:
Modifier and Type | Method and Description |
---|---|
static UserServicePermission |
getDisabled()
Factory method that specifies that a user service can not be displayed or executed
in the current session context.
|
static UserServicePermission |
getDisabled(UserMessage aReason)
Factory method that specifies that a user service can not be displayed or executed
in the current session context.
|
UserMessage |
getDisabledReason()
Only defined if this state is set to 'disabled' and a specific reason is provided.
|
static UserServicePermission |
getEnabled()
Factory method that specifies that a user service can be displayed or executed
in the current session context.
|
char |
getFlag()
Persistent flag that identifies the permission.
|
String |
getFlagString()
Persistent flag that identifies the permission.
|
boolean |
isDisabled() |
boolean |
isEnabled() |
boolean |
isSameFlag(String aFlagString)
Returns
true if the flag specified is the
same as the flag of this permission. |
UserServicePermission |
max(UserServicePermission anotherPermission)
Returns the least restrictive permission between this instance and the instance given
as an argument.
|
UserServicePermission |
min(UserServicePermission anotherPermission)
Returns the most restrictive permission between this instance and the instance given
as an argument.
|
static UserServicePermission |
parseFlag(char accessFlag)
Factory method.
|
static UserServicePermission |
parseFlag(String actionFlag)
Factory method.
|
String |
toDisplayString(Locale aLocale) |
String |
toString() |
public static UserServicePermission getEnabled()
public static UserServicePermission getDisabled()
getDisabled(UserMessage)
method.public static UserServicePermission getDisabled(UserMessage aReason)
public boolean isEnabled()
getEnabled()
public boolean isDisabled()
getDisabled()
,
getDisabled(UserMessage)
public UserMessage getDisabledReason()
getDisabled(UserMessage)
public static UserServicePermission parseFlag(String actionFlag)
getFlagString()
.public static UserServicePermission parseFlag(char accessFlag)
getFlagString()
.public char getFlag()
public String getFlagString()
It returns the same content as getFlag()
.
public boolean isSameFlag(String aFlagString)
true
if the flag specified is the
same as the flag of this permission.public UserServicePermission min(UserServicePermission anotherPermission)
public UserServicePermission max(UserServicePermission anotherPermission)