public class FileSystemResource extends BitFlagsResource
Rights objects for this resource are made of one bitfield with 8 bits. The first four bits
correspond to the create, delete, read and write respectively. There are 2 reserved bits.
The last bit is for explicit denial of access. When printed, they are shown as
CDRWE
Resource names will be namespaced using the subclass' resource type name. The naming approach
is /resource_type_name/instance_name. Each different instance of a particular
resource type will share the same type name but must have a unique, non-empty instance name.
| Modifier and Type | Field and Description |
|---|---|
static int |
BIT_EXECUTE_ACCESS
EXECUTE permissions bit for the bitflags resource.
|
private static CentralLogger |
LOG
Logger
|
static java.lang.String |
TYPE_NAME
Resource type name
|
objectPointer, resourceIndex, smBIT_CREATE_ACCESS, BIT_DELETE_ACCESS, BIT_DENIED_ACCESS, BIT_READ_ACCESS, BIT_WRITE_ACCESS, BITSET_SIZE| Constructor and Description |
|---|
FileSystemResource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExecute(java.lang.String name)
Reports if EXECUTE is allowed for the given resource name.
|
java.util.function.BiPredicate<AccessControlList,java.lang.String> |
getACLMatcher()
Returns a bi-predicate allowing to match ACLs based on a supplied resource instance name.
|
java.lang.String[] |
getExtendedBits()
Override the method to provide extended bit names to augment the default set of bits.
|
Rights |
getRightsInstance(java.lang.Object[] rights)
Instantiates a plugin's class that implements the
Rights interface, using
the array of objects representing a set of access rights fields. |
java.lang.String |
getTypeName()
Returns the plugin resource type name as a string.
|
boolean |
isInstanceNameValid(java.lang.String resource)
Checks whether a given string is a syntactically valid resource name
for this resource type.
|
accessWorker, canCreate, canDelete, canRead, canWrite, describeRights, isRightsSetValidassociate, attach, disassociate, getEnclosingScope, getLibrary, getLink, getPermissions, init, refresh, registeredAs, toStringgetLibraries, getLibraryClasses, getLibsByClass, getVariableList, getVariablesprivate static CentralLogger LOG
public static final int BIT_EXECUTE_ACCESS
public static final java.lang.String TYPE_NAME
public java.lang.String getTypeName()
getTypeName in interface ResourcegetTypeName in class BitFlagsResourcepublic java.lang.String[] getExtendedBits()
null for no extended bits or an array of length 1, 2, 3.
An array of length 1 will carry name of bit 4, length 2 bits 4 and 5, and length 3 bits 4, 5 and 6.getExtendedBits in class BitFlagsResourcepublic Rights getRightsInstance(java.lang.Object[] rights)
Rights interface, using
the array of objects representing a set of access rights fields.getRightsInstance in interface ResourcegetRightsInstance in class BitFlagsResourcerights - The objects needed to create an access rights instance.public boolean isInstanceNameValid(java.lang.String resource)
resource - string naming a resourcetrue if the name is syntactically correctpublic java.util.function.BiPredicate<AccessControlList,java.lang.String> getACLMatcher()
getACLMatcher in class AbstractResourcepublic boolean canExecute(java.lang.String name)
name - Resource instance name.true if access is allowed.