|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--bees.core.Capability
|
+--bees.core.resource.PathSpec
|
+--bees.core.resource.Directory
The Directory capability is used to designate a directory relative to a FileSystemRoot.
| Field Summary | |
static PermissionSet |
DEFAULT_PERMISSIONS
The default permissions given to new Directory capabilities. |
static PermissionSet |
DEFAULT_RESTRICTED_PERMISSIONS
A more restricted set of permissions for Directory capabilities. |
static FilePermission |
DIRECTORY_CREATE_PERMISSION
Permission for creating directories. |
static FilePermission |
DIRECTORY_DELETE_PERMISSION
Permission for deleting directories. |
static FilePermission |
DIRECTORY_EXECUTE_PERMISSION
Permission for opening directories. |
static FilePermission |
DIRECTORY_LIST_PERMISSION
Permission for listing directories. |
static java.lang.String |
DIRECTORY_PREFIX
The string used to prefix directory permission names. |
static FilePermission |
FILE_CREATE_PERMISSION
Permission for creating files. |
static FilePermission |
FILE_DELETE_PERMISSION
Permission for deleting files. |
static FilePermission |
FILE_EXECUTE_PERMISSION
Permission for opening files. |
static FilePermission |
FILE_LIST_PERMISSION
Permission for listing files. |
static java.lang.String |
FILE_PREFIX
The string used to prefix file permission names. |
| Fields inherited from class bees.core.Capability |
DELETE_PERMISSION, id, INVALID_ID |
| Constructor Summary | |
Directory()
Construct an empty Directory object. |
|
| Method Summary | |
void |
delete(java.lang.String name)
Delete a file/directory contained within this directory. |
Directory |
directory(java.lang.String name)
Reference a directory contained within this directory |
Directory |
directory(java.lang.String name,
PermissionSet ps)
Reference a directory contained within this directory. |
Directory |
directory(java.lang.String name,
PermissionSet ps,
boolean create)
Reference a directory or create a new one contained within this directory. |
File |
file(java.lang.String name)
Reference a file contained within this directory. |
File |
file(java.lang.String name,
PermissionSet ps)
Reference a file contained within this directory. |
File |
file(java.lang.String name,
PermissionSet ps,
boolean create)
Reference a file or create a new one contained within this directory. |
protected void |
fromBytes(byte[] flattened,
CapabilityEnvelope[] sub)
Bind this capability to the given object. |
java.lang.String[] |
list()
|
PathSpec |
lookup(java.lang.String name)
Lookup an object contained within this directory. |
void |
revoke()
Revoke access to the capability. |
java.lang.String |
toString()
|
| Methods inherited from class bees.core.resource.PathSpec |
getFactory, specFromBytes, toBytes |
| Methods inherited from class bees.core.Capability |
checkPermission, clear, clonePermission, deleteCapability, equals, fromBytes, revokedPermission, revokePermission, revokePermissions, valid |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String FILE_PREFIX
public static final FilePermission FILE_CREATE_PERMISSION
public static final FilePermission FILE_DELETE_PERMISSION
public static final FilePermission FILE_EXECUTE_PERMISSION
public static final FilePermission FILE_LIST_PERMISSION
public static final java.lang.String DIRECTORY_PREFIX
public static final FilePermission DIRECTORY_CREATE_PERMISSION
public static final FilePermission DIRECTORY_DELETE_PERMISSION
public static final FilePermission DIRECTORY_EXECUTE_PERMISSION
public static final FilePermission DIRECTORY_LIST_PERMISSION
public static final PermissionSet DEFAULT_PERMISSIONS
public static final PermissionSet DEFAULT_RESTRICTED_PERMISSIONS
| Constructor Detail |
public Directory()
| Method Detail |
protected void fromBytes(byte[] flattened,
CapabilityEnvelope[] sub)
throws java.lang.Exception
CapabilityfromBytes in class CapabilityCapability.fromBytes(byte[], CapabilityEnvelope[])public void revoke()
Capabilityrevoke in class PathSpecCapability.revoke()public java.lang.String[] list()
public PathSpec lookup(java.lang.String name)
throws java.io.IOException
name - The name of the file or directory to lookup.java.io.IOException - if the file could not be found or there was another
problem.
public Directory directory(java.lang.String name,
PermissionSet ps,
boolean create)
throws java.io.IOException
name - The name of the directory.ps - The set of permissions to give the Directory capability.create - True if the directory should be created, false otherwise.java.io.IOException - if the directory could not be found or if there was
a problem creating the directory.
public Directory directory(java.lang.String name,
PermissionSet ps)
throws java.io.IOException
name - The name of the directory.ps - The set of permissions to give the Directory capability.java.io.IOException - if the directory could not be found.
public Directory directory(java.lang.String name)
throws java.io.IOException
name - The name of the directory.java.io.IOException - if the directory could not be found.
public File file(java.lang.String name,
PermissionSet ps,
boolean create)
throws java.io.IOException
name - The name of the file.ps - The set of permissions to give the file capability.create - True if the file should be created, false otherwise.java.io.IOException - if the file could not be found or if there was
a problem creating the file.
public File file(java.lang.String name,
PermissionSet ps)
throws java.io.IOException
name - The name of the file.ps - The set of permissions to give the file capability.java.io.IOException - if the file could not be found.
public File file(java.lang.String name)
throws java.io.IOException
name - The name of the file.java.io.IOException - if the file could not be found.public void delete(java.lang.String name)
name - The name of the file/directory to delete.public java.lang.String toString()
toString in class PathSpecObject.toString()
|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||