Package lumis.util.security.acl
Class AccessControlEntry
- java.lang.Object
-
- lumis.util.security.acl.AccessControlEntry
-
- All Implemented Interfaces:
java.lang.Cloneable
,ICloneableConfig<AccessControlEntry>
public class AccessControlEntry extends java.lang.Object implements ICloneableConfig<AccessControlEntry>
Value class for an entry of an Access Control List, which represents a principal and its permissions.- Since:
- 4.0.9
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static int
COPY_AS_INHERITED
static int
COPY_AS_NOT_INHERITED
-
Constructor Summary
Constructors Constructor Description AccessControlEntry(java.lang.String principalId, Permissions permissions, boolean inherited)
AccessControlEntry(AccessControlEntry parentAccessControlListEntry, int copyType, java.util.HashMap<java.lang.Integer,java.lang.Integer> permissionsMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkPermission(IPermission permission)
AccessControlEntry
clone()
protected void
deserialize(org.w3c.dom.Node aclEntryNode)
boolean
equals(java.lang.Object obj)
Permissions
getPermissions()
java.lang.String
getPrincipalId()
boolean
hasDenyPermission(IPermission permission)
Checks if this ACL Entry has the been denied the given permission.int
hashCode()
void
inherit(AccessControlEntry parentAccessControlListEntry)
void
inherit(AccessControlEntry parentAccessControlListEntry, java.util.HashMap<java.lang.Integer,java.lang.Integer> permissionsMapping)
boolean
isInherited()
void
removeInheritance()
protected void
serialize(AccessControlEntry aclEntry, java.lang.StringBuilder stringBuilder)
void
setImpliedPermissions(int[] permissionImplies)
void
setPermissions(Permissions permissions)
-
-
-
Field Detail
-
COPY_AS_INHERITED
public static final int COPY_AS_INHERITED
- See Also:
- Constant Field Values
-
COPY_AS_NOT_INHERITED
public static final int COPY_AS_NOT_INHERITED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AccessControlEntry
public AccessControlEntry(java.lang.String principalId, Permissions permissions, boolean inherited)
-
AccessControlEntry
public AccessControlEntry(AccessControlEntry parentAccessControlListEntry, int copyType, java.util.HashMap<java.lang.Integer,java.lang.Integer> permissionsMapping)
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
isInherited
public boolean isInherited()
-
getPermissions
public Permissions getPermissions()
-
setPermissions
public void setPermissions(Permissions permissions)
-
getPrincipalId
public java.lang.String getPrincipalId()
-
setImpliedPermissions
public void setImpliedPermissions(int[] permissionImplies)
-
inherit
public void inherit(AccessControlEntry parentAccessControlListEntry)
-
inherit
public void inherit(AccessControlEntry parentAccessControlListEntry, java.util.HashMap<java.lang.Integer,java.lang.Integer> permissionsMapping)
-
removeInheritance
public void removeInheritance()
-
checkPermission
public boolean checkPermission(IPermission permission)
-
hasDenyPermission
public boolean hasDenyPermission(IPermission permission)
Checks if this ACL Entry has the been denied the given permission.- Parameters:
permission
-- Returns:
-
serialize
protected void serialize(AccessControlEntry aclEntry, java.lang.StringBuilder stringBuilder)
-
deserialize
protected void deserialize(org.w3c.dom.Node aclEntryNode) throws PortalException
- Throws:
PortalException
-
clone
public AccessControlEntry clone() throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interfaceICloneableConfig<AccessControlEntry>
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
-