nl.uva.vlet.vfs
Interface VACL

All Known Implementing Classes:
VDir, VFile, VFSNode

public interface VACL

Implementation of AccessControlList (ACL) interface.
The ACL consists of a VAttribute Matrix where each row in the matrix, for example acl[rows][columns], represents an ACL Record. The column represents the ACL Record attributes.


Field Summary
static java.lang.String GROUP_ENTITY
           
static java.lang.String PERM_ACCESSABLE
          'x' for directories
static java.lang.String PERM_EXECUTABLE
          'x' for files
static java.lang.String PERM_READABLE
           
static java.lang.String PERM_WRITABLE
           
static java.lang.String USER_ENTITY
           
static java.lang.String WORLD_ENTITY
           
 
Method Summary
 VAttribute[] createACLRecord(VAttribute entity, boolean writeThrough)
          Returns a new 'row' or ACLRecord for the entity.
 boolean deleteACLEntity(VAttribute entity)
          Remove the entity from the ACL list, effectively removing all permission settings associated with the entity (Although this depends on the default permissions of the implementation).
 VAttribute[][] getACL()
          Get a modifyable attribute matrix which represents the ACL list.
 VAttribute[] getACLEntities()
          Returns list of all possible 'entities' which can have an ACL record entry in the list.
 void setACL(VAttribute[][] acl)
          Set the modified ACL list
 

Field Detail

USER_ENTITY

static final java.lang.String USER_ENTITY
See Also:
Constant Field Values

GROUP_ENTITY

static final java.lang.String GROUP_ENTITY
See Also:
Constant Field Values

WORLD_ENTITY

static final java.lang.String WORLD_ENTITY
See Also:
Constant Field Values

PERM_READABLE

static final java.lang.String PERM_READABLE
See Also:
Constant Field Values

PERM_WRITABLE

static final java.lang.String PERM_WRITABLE
See Also:
Constant Field Values

PERM_EXECUTABLE

static final java.lang.String PERM_EXECUTABLE
'x' for files

See Also:
Constant Field Values

PERM_ACCESSABLE

static final java.lang.String PERM_ACCESSABLE
'x' for directories

See Also:
Constant Field Values
Method Detail

getACL

VAttribute[][] getACL()
                      throws VlException
Get a modifyable attribute matrix which represents the ACL list.

Returns:
Throws:
VlException

setACL

void setACL(VAttribute[][] acl)
            throws VlException
Set the modified ACL list

Throws:
VlException

getACLEntities

VAttribute[] getACLEntities()
                            throws VlException
Returns list of all possible 'entities' which can have an ACL record entry in the list. For example for a linux file system this would be "user,group,other". An entity can also be a username a groupname or a domainname. The name of the entity is specified as VAttribute name.

Returns:
VAttribute array of possible entities.
Throws:
VlException

createACLRecord

VAttribute[] createACLRecord(VAttribute entity,
                             boolean writeThrough)
                             throws VlException
Returns a new 'row' or ACLRecord for the entity. This entity is taken from one of the entities returned by getACLEntities.

Parameters:
entity -
writeThrough -
Returns:
Throws:
VlException

deleteACLEntity

boolean deleteACLEntity(VAttribute entity)
                        throws VlException
Remove the entity from the ACL list, effectively removing all permission settings associated with the entity (Although this depends on the default permissions of the implementation).

Parameters:
entity -
Returns:
Throws:
VlException