|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.common.AccessLevel
The AccessLevel class. This class is used to manage security on iFS Public Objects (e.g. Folders and Documents). An instance of this class encapsulates a set of operations, that is used as a parameter to methods that grant or revoke permissions, and as the result of inquiring on permissions.
AccessLevel can be viewed as a set of boolean permission flags for up to 64 standard access levels, and an unrestricted number of extendedPermissions. The stadnard access levels currently defined are:
The Strings used to identify these permissions are by default the English strings used in the descriptions above. Localized translations of these Strings can be used, and accessed using the static string keys,such as ACCESSLEVEL_DISCOVER_KEY. This class has methods to set and clear the various permission flags, as well as methods to test whether a permission flag is set.
AccessControlList
, Serialized FormField Summary | |
static long |
ACCESSLEVEL_ADDITEM
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_ADDMEMBER
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_ADDRELATIONSHIP
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_ADDVERSION
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_ADDVERSIONSERIES
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_ALL
Numeric value that designates "all permissions". |
static long |
ACCESSLEVEL_CREATE
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_DELETE
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_DISCOVER
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_GET_CONTENT
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_GRANT
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_LOCK
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_NONE
Numeric value that designates "no permissions". |
static long |
ACCESSLEVEL_REMOVEITEM
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_REMOVEMEMBER
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_REMOVERELATIONSHIP
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_REMOVEVERSION
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_REMOVEVERSIONSERIES
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_SELECTORACCESS
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_SET_ATTR
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_SET_CONTENT
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_SETDEFAULTVERSION
Numeric value that designates Discover permission. |
static long |
ACCESSLEVEL_SETPOLICY
Numeric value that designates Discover permission. |
static java.lang.String |
ACCESSLEVEL_TOSTRING_DELIMITER_KEY
resourceBundle key used to get the permission delimiter for a String representation for an AccessLevel. |
static java.lang.String |
ACCESSLEVEL_TOSTRING_PREFIX_KEY
resourceBundle key used to get the prefix for a String representation for an AccessLevel. |
static java.lang.String |
ACCESSLEVEL_TOSTRING_SUFFIX_KEY
resourceBundle key used to get the suffix for a String representation for an AccessLevel. |
Constructor Summary | |
AccessLevel()
default Constructor for an AccessLevel. |
|
AccessLevel(AccessLevel level)
Clone an AccessLevel |
|
AccessLevel(long access_level)
Construct an AccessLevel, with a long accesslevel value. |
|
AccessLevel(java.lang.String[] stringLevels)
constructor to initialize set of permissions, specified by an array of Strings. |
|
AccessLevel(java.lang.String[] stringLevels,
LibrarySessionInterface session)
constructor to initialize set of permissions, specified by an array of Strings and a specific LibrarySessionInterface. |
|
AccessLevel(java.lang.String[] stringLevels,
Localizer localizer)
constructor to initialize set of permissions, specified by an array of Strings and a specific Localizer. |
Method Summary | |
void |
add(AccessLevel level,
LibrarySessionInterface sess)
Add permissions specified in another AccessLevel to this AccessLevel |
void |
clearAllPermissions()
Clear all permission flags - standard and extended. |
void |
clearAllStandardPermissions()
Clear all standard permission flags. |
void |
disableStandardPermission(long permission)
Disable a standard perrmission. |
void |
enableAllStandardPermissions()
Set all standard permission flags. |
void |
enableStandardPermission(long permission)
Enable a standard perrmission. |
boolean |
equals(AccessLevel level)
Add permissions specified in another AccessLevel to this AccessLevel |
static java.lang.String[] |
getAllDefinedStandardPermissionNames(LibrarySessionInterface session)
return the array of all defined standard permission localized labels. |
static java.lang.String[] |
getAllDefinedStandardPermissionNames(Localizer localizer)
return the array of all defined standard permission localized labels. |
static long[] |
getAllDefinedStandardPermissions()
return the array of all defined standard permission numeric values. |
java.lang.String[] |
getEnabledStandardPermissionNames(LibrarySessionInterface session)
return the array of the names of all standard permission enabled in this instance. |
java.lang.String[] |
getEnabledStandardPermissionNames(Localizer localizer)
return the array of the names of all standard permission enabled in this instance. |
long[] |
getEnabledStandardPermissions()
return the array of all enabled standard permissions, using the numeric values (defined as static long constants in this class) to represent each permission. |
boolean |
isStandardPermissionEnabled(long permission)
Is a standard perrmission enabled? |
boolean |
isSufficientlyEnabled(AccessLevel level,
LibrarySessionInterface sess)
check to see if specified permissions are enabled on the target AccessLevel. |
void |
subtract(AccessLevel level,
LibrarySessionInterface sess)
Remove permissions specified in another AccessLevel to this AccessLevel. |
long |
toLong()
toLong - return the long representation of the access level. |
java.lang.String |
toString()
toString - convert AccessLevel to a String, representing the set of permissions; for example "{Discover,GetContent}". |
java.lang.String |
toString(Localizer localizer)
toString - convert AccessLevel to a String, representing the set of permissions for a specified Localizer; for example "{Discover,GetContent}". |
Field Detail |
public static final long ACCESSLEVEL_NONE
public static final long ACCESSLEVEL_ALL
public static final long ACCESSLEVEL_DISCOVER
public static final long ACCESSLEVEL_SET_ATTR
public static final long ACCESSLEVEL_GET_CONTENT
public static final long ACCESSLEVEL_SET_CONTENT
public static final long ACCESSLEVEL_DELETE
public static final long ACCESSLEVEL_LOCK
public static final long ACCESSLEVEL_GRANT
public static final long ACCESSLEVEL_CREATE
public static final long ACCESSLEVEL_SELECTORACCESS
public static final long ACCESSLEVEL_ADDMEMBER
public static final long ACCESSLEVEL_REMOVEMEMBER
public static final long ACCESSLEVEL_ADDITEM
public static final long ACCESSLEVEL_REMOVEITEM
public static final long ACCESSLEVEL_ADDRELATIONSHIP
public static final long ACCESSLEVEL_REMOVERELATIONSHIP
public static final long ACCESSLEVEL_ADDVERSIONSERIES
public static final long ACCESSLEVEL_REMOVEVERSIONSERIES
public static final long ACCESSLEVEL_ADDVERSION
public static final long ACCESSLEVEL_REMOVEVERSION
public static final long ACCESSLEVEL_SETDEFAULTVERSION
public static final long ACCESSLEVEL_SETPOLICY
public static final java.lang.String ACCESSLEVEL_TOSTRING_PREFIX_KEY
public static final java.lang.String ACCESSLEVEL_TOSTRING_SUFFIX_KEY
public static final java.lang.String ACCESSLEVEL_TOSTRING_DELIMITER_KEY
Constructor Detail |
public AccessLevel() throws IfsException
public AccessLevel(long access_level)
access
- The long access level.public AccessLevel(java.lang.String[] stringLevels) throws IfsException
stringLevels
- - array of permission Strings.IfsException
- if operation fails.public AccessLevel(java.lang.String[] stringLevels, LibrarySessionInterface session) throws IfsException
stringLevels
- - array of permission Strings.session
- - LibrarySession used to determine the Localizer
to be used to translate the specified Strings into standard permissions.IfsException
- if operation fails.public AccessLevel(java.lang.String[] stringLevels, Localizer localizer) throws IfsException
stringLevels
- - array of permission Strings.localizer
- - Localizer to be used to translate the specified Strings into standard permissions.IfsException
- if operation fails.public AccessLevel(AccessLevel level) throws IfsException
IfsException
- if operation fails.Method Detail |
public long toLong() throws IfsException
public long[] getEnabledStandardPermissions() throws IfsException
IfsException
- if operation fails.public static long[] getAllDefinedStandardPermissions() throws IfsException
IfsException
- if operation fails.public java.lang.String[] getEnabledStandardPermissionNames(LibrarySessionInterface session) throws IfsException
session
- a LibrarySession, used to determine the LocalizerIfsException
- if operation fails.public java.lang.String[] getEnabledStandardPermissionNames(Localizer localizer) throws IfsException
localizer
- Localizer used to get the localized Permission names.IfsException
- if operation fails.public static java.lang.String[] getAllDefinedStandardPermissionNames(LibrarySessionInterface session) throws IfsException
session
- a LibrarySession, used to determine the LocalizerIfsException
- if operation fails.public static java.lang.String[] getAllDefinedStandardPermissionNames(Localizer localizer) throws IfsException
session
- a Localizer, used to returned localized String values.
If null, the default Localizer is used.IfsException
- if operation fails.public void add(AccessLevel level, LibrarySessionInterface sess) throws IfsException
level
- AccessLevel to add (union) to this instance.sess
- the Session.public void subtract(AccessLevel level, LibrarySessionInterface sess) throws IfsException
level
- AccessLevel to remove (union) to this instance.sess
- the Session.public boolean equals(AccessLevel level) throws IfsException
level
- AccessLevel to add (union) to this instance.sess
- the Session.public boolean isSufficientlyEnabled(AccessLevel level, LibrarySessionInterface sess) throws IfsException
level
- AccessLevel that holds permissions to check.sess
- the Session.public void enableAllStandardPermissions() throws IfsException
public void clearAllStandardPermissions() throws IfsException
public void clearAllPermissions() throws IfsException
public void enableStandardPermission(long permission) throws IfsException
permission
- the standard permission to enable.IfsException
- if operation fails.public void disableStandardPermission(long permission) throws IfsException
permission
- the standard permission to disable.IfsException
- if operation fails.public boolean isStandardPermissionEnabled(long permission) throws IfsException
permission
- the standard permission to check.IfsException
- if operation fails.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(Localizer localizer) throws IfsException
IfsException
- if operation fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |