|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AccessControlEntry
Represents an entry in an AccessControlList
. An AccessControlEntry contains a principal
and a set of Permission
objects.
The principal can be either a group or a user. The user doesn't have to be userid; it can also be
the "owner" of the object.
Field Summary | |
---|---|
static java.lang.String |
GROUP_ALL_USERS
Name for a special group, which is all users. |
static java.lang.String |
USER_OWNER
Name for a special user, which is the owner of this node. |
Method Summary | |
---|---|
void |
addPermission(Permission permission)
Add the given permission to this entry. |
java.lang.String |
getName()
Get the name of this AccessControlEntry. |
boolean |
hasPermission(Permission permission)
Test whether this entry contains the given permission. |
boolean |
isGroupEntry()
Test whether this AccessControlEntry is associated with a group. |
boolean |
isUserEntry()
Test whether this AccessControEntry is associated with a user. |
void |
removePermission(Permission permission)
Remove the given permission from this entry. |
void |
setPermissions(java.util.Set permissions)
Set the permissions on this entry to the set of permissions passed in. |
Field Detail |
---|
static final java.lang.String GROUP_ALL_USERS
static final java.lang.String USER_OWNER
Method Detail |
---|
boolean hasPermission(Permission permission)
permission
- permission to check for
void addPermission(Permission permission) throws InvalidTypeException
permission
- permission to add
InvalidTypeException
- If the node that this entry points to is a file
and the permission passed in is a container permission,
e.g. Permission.INHERIT_READ_PERMISSION
void removePermission(Permission permission)
permission
- permission to removevoid setPermissions(java.util.Set permissions) throws InvalidTypeException
permissions
- Set of Permission
objects
InvalidTypeException
- If the node that this entry points to is a file
and one or more of the permissions passed in is a container permission,
e.g. Permission.INHERIT_READ_PERMISSION
boolean isUserEntry()
boolean isGroupEntry()
java.lang.String getName()
user entry
, this
is a userid. If this is a group entry
, this is a group name. This
could also be either GROUP_ALL_USERS
or USER_OWNER
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |