Package org.apache.wiki.api.core
Interface AclEntry
- 
- All Known Subinterfaces:
- AclEntry
 - All Known Implementing Classes:
- AclEntryImpl
 
 public interface AclEntry Represents one entry in an Access Control List (ACL). An ACL can be thought of as a data structure with multiple ACL entry objects. Each ACL entry object contains a set of positive page permissions associated with a particular principal. (A principal represents an entity such as an individual user, group, or role). Each principal can have at most one ACL entry; that is, multiple ACL entries are not allowed for any principal. This interface is functionally equivalent to the java.security.acl.AclEntry interface, minus negative permissions. - Since:
- 2.3
- See Also:
- Acl
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddPermission(java.security.Permission permission)Adds the specified permission to this ACL entry.booleancheckPermission(java.security.Permission permission)Checks if the specified permission is part of the permission set in this entry.java.security.PrincipalgetPrincipal()Returns the principal for which permissions are granted by this ACL entry.java.util.Enumeration<java.security.Permission>permissions()Returns an enumeration of the permissions in this ACL entry.booleanremovePermission(java.security.Permission permission)Removes the specified permission from this ACL entry.booleansetPrincipal(java.security.Principal user)Specifies the principal for which permissions are granted or denied by this ACL entry.
 
- 
- 
- 
Method Detail- 
addPermissionboolean addPermission(java.security.Permission permission) Adds the specified permission to this ACL entry. The permission must be of typePagePermission. Note: An entry can have multiple permissions.- Parameters:
- permission- the permission to be associated with the principal in this entry
- Returns:
- trueif the permission was added,- falseif the permission was already part of this entry's permission set, and- falseif the permission is not of type PagePermission
 
 - 
checkPermissionboolean checkPermission(java.security.Permission permission) Checks if the specified permission is part of the permission set in this entry.- Parameters:
- permission- the permission to be checked for.
- Returns:
- true if the permission is part of the permission set in this entry, false otherwise.
 
 - 
getPrincipaljava.security.Principal getPrincipal() Returns the principal for which permissions are granted by this ACL entry. Returns null if there is no principal set for this entry yet.- Returns:
- the principal associated with this entry.
 
 - 
permissionsjava.util.Enumeration<java.security.Permission> permissions() Returns an enumeration of the permissions in this ACL entry.- Returns:
- an enumeration of the permissions
 
 - 
removePermissionboolean removePermission(java.security.Permission permission) Removes the specified permission from this ACL entry.- Parameters:
- permission- the permission to be removed from this entry.
- Returns:
- true if the permission is removed, false if the permission was not part of this entry's permission set.
 
 - 
setPrincipalboolean setPrincipal(java.security.Principal user) Specifies the principal for which permissions are granted or denied by this ACL entry. If a principal was already set for this ACL entry, false is returned, otherwise true is returned.- Parameters:
- user- the principal to be set for this entry
- Returns:
- true if the principal is set, false if there was already a principal set for this entry
 
 
- 
 
-