public class PublicObjectCapabilities extends Object
Subclasses of PublicObject that require further capability restriction
based on object type should extend this class, override the capability
method that must be restricted, and then override the
PublicObject.capabilities
method to return the subclass.
Constructor and Description |
---|
PublicObjectCapabilities(PublicObject object)
Constructs a new PublicObjectCapabilities instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
ADDITEM()
Performs additional capability check for the ADDITEM permission.
|
boolean |
ADDMEMBER()
Performs additional capability check for the ADDMEMBER permission.
|
boolean |
ADDRELATIONSHIP()
Performs additional capability check for the ADDRELATIONSHIP permission.
|
boolean |
ADDVERSION()
Performs additional capability check for the ADDVERSION permission.
|
boolean |
ADDVERSIONSERIES()
Performs additional capability check for the ADDVERSIONSERIES permission.
|
boolean |
ADMINISTER_CATEGORY()
Performs additional capability check for the ADMINISTER_CATEGORY
permission.
|
boolean |
ADMINISTER_CONFIGURATION()
Performs additional capability check for the
ADMINISTER_CONFIGURATION permission.
|
boolean |
ADMINISTER_CONTAINER()
Performs additional capability check for the ADMINISTER_CONTAINER
permission.
|
boolean |
ADMINISTER_DOMAIN()
Performs additional capability check for the ADMINISTER_DOMIN permission.
|
boolean |
ADMINISTER_LOCK()
Performs additional capability check for the ADMINISTER_LOCK permission.
|
boolean |
ADMINISTER_QUOTA()
Performs additional capability check for the ADMINISTER_QUOTA permission.
|
boolean |
ADMINISTER_RECORD()
Performs additional capability check for the ADMINISTER_RECORD permission.
|
boolean |
ADMINISTER_ROLE()
Performs additional capability check for the ADMINISTER_ROLE permission.
|
boolean |
ADMINISTER_SECURITY()
Performs additional capability check for the
ADMINISTER_SECURITY permission.
|
boolean |
ADMINISTER_USER()
Performs additional capability check for the ADMINISTER_USER permission.
|
boolean |
ADMINISTER_WORKSPACE()
Performs additional capability check for the
ADMINISTER_WORKSPACE permission.
|
boolean |
checkCapabilities(AccessLevel capabilities)
Checks if every capability specified by the given AccessLevel is enabled.
|
boolean |
checkCapability(long capability)
Checks if the given capability is enabled.
|
boolean |
checkEffectiveAccess(AccessLevel capabilities)
Checks if the encapsulated object has the access specified in the
given AccessLevel.
|
boolean |
checkEffectiveAccess(DirectoryObject grantee,
AccessLevel capabilities)
Checks if the encapsulated object has the access specified for the
specified grantee in the given AccessLevel.
|
boolean |
COPY()
Performs additional capability check for the COPY permission.
|
boolean |
CREATECONTAINER()
Performs additional capability check for the CREATECONTAINER permission.
|
boolean |
CREATEFOLDER()
Performs additional capability check for the CREATEFOLDER permission.
|
boolean |
CREATEWORKSPACE()
Performs additional capability check for the CREATEWORKSPACE permission.
|
boolean |
DELETE()
Performs additional capability check for the DELETE permission.
|
boolean |
DISCOVER()
Performs additional capability check for the DISCOVER permission.
|
boolean |
GET_CONTENT()
Performs additional capability check for the GET_CONTENT permission.
|
boolean |
GETAUDITHISTORY()
Performs additional capability check for the GETAUDITHISTORY permission.
|
AccessLevel |
getCapabilities()
Returns the set of enabled capabilities.
|
boolean |
GETMETADATA()
Performs additional capability check for the GETMETADATA permission.
|
boolean |
GETRELATION()
Performs additional capability check for the GETRELATION permission.
|
protected PublicObject |
getTrackedObject()
Returns the object being tracked.
|
boolean |
LOCK()
Performs additional capability check for the LOCK permission.
|
boolean |
MOVE()
Performs additional capability check for the MOVE permission.
|
boolean |
REMOVEITEM()
Performs additional capability check for the REMOVEITEM permission.
|
boolean |
REMOVEMEMBER()
Performs additional capability check for the REMOVEMEMBER permission.
|
boolean |
REMOVERELATIONSHIP()
Performs additional capability check for the REMOVERELATIONSHIP permission.
|
boolean |
REMOVEVERSIONSERIES()
Performs additional capability check for the REMOVEVERSIONSERIES permission.
|
boolean |
SET_ATTR()
Performs additional capability check for the SET_ATTR permission.
|
boolean |
SET_CONTENT()
Performs additional capability check for the SET_CONTENT permission.
|
boolean |
SETMETADATA()
Performs additional capability check for the SETMETADATA permission.
|
boolean |
SETRELATION()
Performs additional capability check for the SETRELATION permission.
|
protected boolean |
testBit(long capBit)
Test one of the capability bits.
|
void |
verifyCapabilities(AccessLevel capabilities)
Verifies that every capability specified by the given AccessLevel is
enabled; throws an exception if any of the capabilities are not enabled.
|
void |
verifyCapability(long capability)
Verifies that the given capability is enabled; throws an exception if the
capability is not enabled.
|
public PublicObjectCapabilities(PublicObject object)
object
- the PublicObject for which capabilities
are tracked.protected PublicObject getTrackedObject()
public final boolean checkCapability(long capability) throws IfsException
This method checks:
capability
- the capability to test.IfsException
- public final void verifyCapability(long capability) throws IfsException
This method verifies:
capability
- the capability to verify.IfsException
- public final boolean checkCapabilities(AccessLevel capabilities) throws IfsException
This method checks:
capabilities
- the set of capabilities (an AccessLevel) to test.IfsException
- public final void verifyCapabilities(AccessLevel capabilities) throws IfsException
This method verifies:
capabilities
- the set of capabilities (an AccessLevel) to verify.IfsException
- public final AccessLevel getCapabilities() throws IfsException
To determine the set of enabled capabilities, this method checks:
IfsException
- public boolean checkEffectiveAccess(AccessLevel capabilities) throws IfsException
capabilities
- the set of capabilities (an AccessLevel) to test.IfsException
- if the operation failspublic boolean checkEffectiveAccess(DirectoryObject grantee, AccessLevel capabilities) throws IfsException
grantee
- the user or group to checkcapabilities
- the set of capabilities (an AccessLevel) to test.IfsException
- if the operation failspublic boolean DISCOVER() throws IfsException
IfsException
- if the operation failspublic boolean SET_ATTR() throws IfsException
IfsException
- if the operation failspublic boolean GET_CONTENT() throws IfsException
IfsException
- if the operation failspublic boolean SET_CONTENT() throws IfsException
IfsException
- if the operation failspublic boolean DELETE() throws IfsException
IfsException
- if the operation failspublic boolean LOCK() throws IfsException
IfsException
- if the operation failspublic boolean ADDMEMBER() throws IfsException
IfsException
- if the operation failspublic boolean REMOVEMEMBER() throws IfsException
IfsException
- if the operation failspublic boolean ADDITEM() throws IfsException
IfsException
- if the operation failspublic boolean REMOVEITEM() throws IfsException
IfsException
- if the operation failspublic boolean ADDRELATIONSHIP() throws IfsException
IfsException
- if the operation failspublic boolean REMOVERELATIONSHIP() throws IfsException
IfsException
- if the operation failspublic boolean ADDVERSIONSERIES() throws IfsException
IfsException
- if the operation failspublic boolean REMOVEVERSIONSERIES() throws IfsException
IfsException
- if the operation failspublic boolean CREATEFOLDER() throws IfsException
IfsException
- if the operation failspublic boolean ADDVERSION() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_DOMAIN() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_LOCK() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_USER() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_CATEGORY() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_RECORD() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_ROLE() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_CONTAINER() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_QUOTA() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_WORKSPACE() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_SECURITY() throws IfsException
IfsException
- if the operation failspublic boolean ADMINISTER_CONFIGURATION() throws IfsException
IfsException
- if the operation failspublic boolean CREATEWORKSPACE() throws IfsException
IfsException
- if the operation failspublic boolean CREATECONTAINER() throws IfsException
IfsException
- if the operation failspublic boolean MOVE() throws IfsException
IfsException
- if the operation failspublic boolean GETMETADATA() throws IfsException
IfsException
- if the operation failspublic boolean GETAUDITHISTORY() throws IfsException
IfsException
- if the operation failspublic boolean GETRELATION() throws IfsException
IfsException
- if the operation failspublic boolean SETMETADATA() throws IfsException
IfsException
- if the operation failspublic boolean SETRELATION() throws IfsException
IfsException
- if the operation failspublic boolean COPY() throws IfsException
IfsException
- if the operation failsprotected boolean testBit(long capBit) throws IfsException
capBit
- the capability bit to checkIfsException
- if the operation failsCopyright © 2023. All rights reserved.