lumis.util.security.acl
Class AccessControlList

Package class diagram package AccessControlList
java.lang.Object
  extended by lumis.util.security.acl.AccessControlList
All Implemented Interfaces:
Cloneable, ICloneableConfig<AccessControlList>

public class AccessControlList
extends Object
implements ICloneableConfig<AccessControlList>

Value class for Access Control Lists

Since:
4.0.7

Field Summary
static int REMOVE_INHERIT_COPY_PERMISSIONS
           
static int REMOVE_INHERIT_REMOVE_PERMISSIONS
           
 
Constructor Summary
AccessControlList(String id, AccessControlEntry[] accessControlEntries, boolean inheriting)
           
AccessControlList(String id, AccessControlEntry[] accessControlEntries, boolean inheriting, String parentId)
          Creates a new access control list with the data given.
 
Method Summary
 boolean checkPermission(Collection<String> principalIds, IPermission permission)
          Checks if any of the given principlas have access to the given permission.
 AccessControlList clone()
           
 void deserialize(Node accessControlListNode)
           
 AccessControlEntry[] getEntries()
           
 AccessControlEntry getEntry(String entryId)
           
 String getId()
           
 String getParentId()
           
 void inherit(AccessControlList parentAccessControlList)
           
 void inherit(AccessControlList parentAccessControlList, HashMap<Integer,Integer> permissionsMapping)
           
 boolean isInheriting()
           
 void removeInheritance(int removeType)
           
 void serialize(AccessControlList accessControlList, OutputStream outputStream)
           
 void setImpliedPermissions(int[] permissionImplies)
           
 void setInheriting(boolean inheriting)
           
 void setParentId(String parentId)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOVE_INHERIT_COPY_PERMISSIONS

public static final int REMOVE_INHERIT_COPY_PERMISSIONS
See Also:
Constant Field Values

REMOVE_INHERIT_REMOVE_PERMISSIONS

public static final int REMOVE_INHERIT_REMOVE_PERMISSIONS
See Also:
Constant Field Values
Constructor Detail

AccessControlList

public AccessControlList(String id,
                         AccessControlEntry[] accessControlEntries,
                         boolean inheriting)

AccessControlList

public AccessControlList(String id,
                         AccessControlEntry[] accessControlEntries,
                         boolean inheriting,
                         String parentId)
Creates a new access control list with the data given.

The parentACL is not currently read from parentId. It is filled only when inherit(lumis.util.security.acl.AccessControlList) method is called. On the inherit(lumis.util.security.acl.AccessControlList) method, the parentId is also filled.

Method Detail

getId

public String getId()

isInheriting

public boolean isInheriting()

setInheriting

public void setInheriting(boolean inheriting)

getParentId

public String getParentId()

setParentId

public void setParentId(String parentId)

getEntry

public AccessControlEntry getEntry(String entryId)

getEntries

public AccessControlEntry[] getEntries()

setImpliedPermissions

public void setImpliedPermissions(int[] permissionImplies)

inherit

public void inherit(AccessControlList parentAccessControlList)

inherit

public void inherit(AccessControlList parentAccessControlList,
                    HashMap<Integer,Integer> permissionsMapping)

removeInheritance

public void removeInheritance(int removeType)

checkPermission

public boolean checkPermission(Collection<String> principalIds,
                               IPermission permission)
Checks if any of the given principlas have access to the given permission. If any of the principals are explicitly "denied" permission, this method returns false. Otherwise if any of the principals have access to the given permission, this method returns true.

Parameters:
principalIds -
permission -
Returns:

serialize

public void serialize(AccessControlList accessControlList,
                      OutputStream outputStream)
               throws PortalException
Throws:
PortalException

deserialize

public void deserialize(Node accessControlListNode)
                 throws PortalException
Throws:
PortalException

clone

public AccessControlList clone()
                        throws CloneNotSupportedException
Specified by:
clone in interface ICloneableConfig<AccessControlList>
Overrides:
clone in class Object
Throws:
CloneNotSupportedException


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.