org.alfresco.repo.domain.hibernate
Class AVMAccessControlListDAO

java.lang.Object
  extended by org.alfresco.repo.domain.hibernate.AVMAccessControlListDAO
All Implemented Interfaces:
AccessControlListDAO

public class AVMAccessControlListDAO
extends java.lang.Object
implements AccessControlListDAO

The AVM implementation for getting and setting ACLs.


Nested Class Summary
static class AVMAccessControlListDAO.Counter
          Simple counter
static class AVMAccessControlListDAO.CounterSet
          Counter for each type of ACL change
 
Constructor Summary
AVMAccessControlListDAO()
          Default constructory.
 
Method Summary
 void forceCopy(NodeRef nodeRef)
           
 DbAccessControlList getAccessControlList(NodeRef nodeRef)
          Get the ACL from a node.
 DbAccessControlList getAccessControlList(StoreRef storeRef)
           
 java.lang.Long getIndirectAcl(NodeRef nodeRef)
           
 java.lang.Long getInheritedAcl(NodeRef nodeRef)
           
 java.util.Map patchAcls()
           
 void setAccessControlList(NodeRef nodeRef, DbAccessControlList acl)
          Set the ACL on a node.
 void setAccessControlList(NodeRef nodeRef, java.lang.Long aclId)
          Set the ACL on a node.
 void setAccessControlList(StoreRef storeRef, DbAccessControlList acl)
           
 void setAclDaoComponent(AclDaoComponent aclDaoComponent)
          Set the ACL DAO component
 void setAvmRepository(AVMRepository repository)
          Set the AVM repository
 void setAvmService(AVMService avmService)
          Set the AVM service
 void setAvmSnapShotTriggeredIndexingMethodInterceptor(AVMSnapShotTriggeredIndexingMethodInterceptor avmSnapShotTriggeredIndexingMethodInterceptor)
           
 void setFixedAcls(AVMNodeDescriptor descriptor, java.lang.Long inheritFrom, java.lang.Long mergeFrom, java.util.List changes, org.alfresco.repo.domain.hibernate.AVMAccessControlListDAO.SetMode mode, boolean set, java.util.Map indirections)
          Support to set a shared ACL on a node and all of its children.
 void setHibernateSessionHelper(HibernateSessionHelper hibernateSessionHelper)
           
 java.util.List setInheritanceForChildren(NodeRef parent, java.lang.Long inheritFrom)
          Update inheritance
 void updateChangedAcls(NodeRef startingPoint, java.util.List changes)
          Update any associated ACLs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVMAccessControlListDAO

public AVMAccessControlListDAO()
Default constructory.

Method Detail

setAvmRepository

public void setAvmRepository(AVMRepository repository)
Set the AVM repository

Parameters:
repository -

setAvmService

public void setAvmService(AVMService avmService)
Set the AVM service

Parameters:
avmService -

setAclDaoComponent

public void setAclDaoComponent(AclDaoComponent aclDaoComponent)
Set the ACL DAO component

Parameters:
aclDaoComponent -

setAvmSnapShotTriggeredIndexingMethodInterceptor

public void setAvmSnapShotTriggeredIndexingMethodInterceptor(AVMSnapShotTriggeredIndexingMethodInterceptor avmSnapShotTriggeredIndexingMethodInterceptor)
Parameters:
avmSnapShotTriggeredIndexingMethodInterceptor -

setHibernateSessionHelper

public void setHibernateSessionHelper(HibernateSessionHelper hibernateSessionHelper)
Parameters:
hibernateSessionHelper -

getIndirectAcl

public java.lang.Long getIndirectAcl(NodeRef nodeRef)
Specified by:
getIndirectAcl in interface AccessControlListDAO

getInheritedAcl

public java.lang.Long getInheritedAcl(NodeRef nodeRef)
Specified by:
getInheritedAcl in interface AccessControlListDAO

getAccessControlList

public DbAccessControlList getAccessControlList(NodeRef nodeRef)
Get the ACL from a node.

Specified by:
getAccessControlList in interface AccessControlListDAO
Parameters:
nodeRef - The reference to the node.
Returns:
The ACL.
Throws:
InvalidNodeRefException

setAccessControlList

public void setAccessControlList(NodeRef nodeRef,
                                 DbAccessControlList acl)
Set the ACL on a node.

Specified by:
setAccessControlList in interface AccessControlListDAO
Parameters:
nodeRef - The reference to the node.
acl - The ACL.
Throws:
InvalidNodeRefException

setAccessControlList

public void setAccessControlList(NodeRef nodeRef,
                                 java.lang.Long aclId)
Description copied from interface: AccessControlListDAO
Set the ACL on a node.

Specified by:
setAccessControlList in interface AccessControlListDAO
Parameters:
nodeRef - The reference to the node.
aclId - The ID of the ACL entity.

updateChangedAcls

public void updateChangedAcls(NodeRef startingPoint,
                              java.util.List changes)
Description copied from interface: AccessControlListDAO
Update any associated ACLs

Specified by:
updateChangedAcls in interface AccessControlListDAO

forceCopy

public void forceCopy(NodeRef nodeRef)
Specified by:
forceCopy in interface AccessControlListDAO

setInheritanceForChildren

public java.util.List setInheritanceForChildren(NodeRef parent,
                                                java.lang.Long inheritFrom)
Description copied from interface: AccessControlListDAO
Update inheritance

Specified by:
setInheritanceForChildren in interface AccessControlListDAO
Returns:

setFixedAcls

public void setFixedAcls(AVMNodeDescriptor descriptor,
                         java.lang.Long inheritFrom,
                         java.lang.Long mergeFrom,
                         java.util.List changes,
                         org.alfresco.repo.domain.hibernate.AVMAccessControlListDAO.SetMode mode,
                         boolean set,
                         java.util.Map indirections)
Support to set a shared ACL on a node and all of its children.

Parameters:
descriptor - the descriptor
inheritFrom - the parent node's ACL
mergeFrom - the shared ACL, if already known. If null, will be retrieved / created lazily
changes - the list in which to record changes
mode - the mode
set - set the shared ACL on the parent ?
indirections - the indirections

patchAcls

public java.util.Map patchAcls()
Specified by:
patchAcls in interface AccessControlListDAO

getAccessControlList

public DbAccessControlList getAccessControlList(StoreRef storeRef)
Specified by:
getAccessControlList in interface AccessControlListDAO

setAccessControlList

public void setAccessControlList(StoreRef storeRef,
                                 DbAccessControlList acl)
Specified by:
setAccessControlList in interface AccessControlListDAO


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.