org.alfresco.repo.domain.hibernate
Class DbAccessControlListImpl

java.lang.Object
  extended by org.alfresco.repo.domain.hibernate.LifecycleAdapter
      extended by org.alfresco.repo.domain.hibernate.DbAccessControlListImpl
All Implemented Interfaces:
java.io.Serializable, DbAccessControlList, org.hibernate.classic.Lifecycle

public class DbAccessControlListImpl
extends LifecycleAdapter
implements DbAccessControlList, java.io.Serializable

The hibernate persisted class for node permission entries.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
 
Constructor Summary
DbAccessControlListImpl()
           
 
Method Summary
static DbAccessControlList createLayeredAcl(java.lang.Long indirectedAcl)
           
static DbAccessControlList find(org.hibernate.Session session)
           
 DbAccessControlListChangeSet getAclChangeSet()
          Get the change set
 java.lang.String getAclId()
          Get the ACL ID
 ACLType getAclType()
          Get the type for this ACL
 long getAclVersion()
          Get the ACL version
 DbAccessControlList getCopy(java.lang.Long parentAcl, ACLCopyMode mode)
           
 java.lang.Long getId()
          Get the long key
 java.lang.Long getInheritedAclId()
          Get the ACL inherited from nodes which have this ACL
 boolean getInherits()
          Get inheritance behaviour
 java.lang.Long getInheritsFrom()
          Get the ACL from which this one inherits
 boolean getRequiresVersion()
           
 java.lang.Long getVersion()
           
 boolean isLatest()
          Is this the latest version of the acl identified by the acl id string?
 boolean isVersioned()
          Is this ACL versioned - if not there will be no old versions of the ACL and the long id will remain unchanged.
 boolean onDelete(org.hibernate.Session session)
          Support cascade delete of ACLs from DM nodes (which cascade delete the ACL)
 void setAclChangeSet(DbAccessControlListChangeSet aclChangeSet)
          Set the change set
static void setAclDaoComponent(AclDaoComponent aclDaoComponent)
           
 void setAclId(java.lang.String aclId)
          Set the string ACL ID (not the auto generated long)
 void setAclType(ACLType aclType)
          Set the ACL Type
 void setAclVersion(long aclVersion)
          Set the ACL version (not the optimistic version used by hibernate)
 void setInheritedAclId(java.lang.Long inheritedAclId)
          Set the ACL that should be set when inheriting from this one.
 void setInherits(boolean inherits)
          Set inheritance behaviour
 void setInheritsFrom(java.lang.Long id)
          Set the ACL from which this one inherits
 void setLatest(boolean latest)
          Set if this ACL is the latest version of the ACL as identified by getAclId()
 void setRequiresVersion(boolean requiresVersion)
           
 void setVersioned(boolean versioned)
          Set if this ACL is versioned on write
 java.lang.String toString()
           
 
Methods inherited from class org.alfresco.repo.domain.hibernate.LifecycleAdapter
getSession, onLoad, onSave, onUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DbAccessControlListImpl

public DbAccessControlListImpl()
Method Detail

setAclDaoComponent

public static void setAclDaoComponent(AclDaoComponent aclDaoComponent)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

onDelete

public boolean onDelete(org.hibernate.Session session)
                 throws org.hibernate.CallbackException
Support cascade delete of ACLs from DM nodes (which cascade delete the ACL)

Specified by:
onDelete in interface org.hibernate.classic.Lifecycle
Overrides:
onDelete in class LifecycleAdapter
Returns:
Returns NO_VETO always
Throws:
org.hibernate.CallbackException

getId

public java.lang.Long getId()
Description copied from interface: DbAccessControlList
Get the long key

Specified by:
getId in interface DbAccessControlList
Returns:

getVersion

public java.lang.Long getVersion()
Specified by:
getVersion in interface DbAccessControlList
Returns:
Returns the version number for optimistic locking

getInherits

public boolean getInherits()
Description copied from interface: DbAccessControlList
Get inheritance behaviour

Specified by:
getInherits in interface DbAccessControlList
Returns:
Returns the inheritance status of this list

setInherits

public void setInherits(boolean inherits)
Description copied from interface: DbAccessControlList
Set inheritance behaviour

Specified by:
setInherits in interface DbAccessControlList
Parameters:
inherits - true to set the permissions to inherit

getAclId

public java.lang.String getAclId()
Description copied from interface: DbAccessControlList
Get the ACL ID

Specified by:
getAclId in interface DbAccessControlList
Returns:

setAclId

public void setAclId(java.lang.String aclId)
Description copied from interface: DbAccessControlList
Set the string ACL ID (not the auto generated long)

Specified by:
setAclId in interface DbAccessControlList

getAclType

public ACLType getAclType()
Description copied from interface: DbAccessControlList
Get the type for this ACL

Specified by:
getAclType in interface DbAccessControlList
Returns:

setAclType

public void setAclType(ACLType aclType)
Description copied from interface: DbAccessControlList
Set the ACL Type

Specified by:
setAclType in interface DbAccessControlList

getAclVersion

public long getAclVersion()
Description copied from interface: DbAccessControlList
Get the ACL version

Specified by:
getAclVersion in interface DbAccessControlList
Returns:

setAclVersion

public void setAclVersion(long aclVersion)
Description copied from interface: DbAccessControlList
Set the ACL version (not the optimistic version used by hibernate)

Specified by:
setAclVersion in interface DbAccessControlList

getInheritedAclId

public java.lang.Long getInheritedAclId()
Description copied from interface: DbAccessControlList
Get the ACL inherited from nodes which have this ACL

Specified by:
getInheritedAclId in interface DbAccessControlList
Returns:

setInheritedAclId

public void setInheritedAclId(java.lang.Long inheritedAclId)
Description copied from interface: DbAccessControlList
Set the ACL that should be set when inheriting from this one. This ACL does not contain any object specific settings.

Specified by:
setInheritedAclId in interface DbAccessControlList

isLatest

public boolean isLatest()
Description copied from interface: DbAccessControlList
Is this the latest version of the acl identified by the acl id string?

Specified by:
isLatest in interface DbAccessControlList
Returns:

setLatest

public void setLatest(boolean latest)
Description copied from interface: DbAccessControlList
Set if this ACL is the latest version of the ACL as identified by getAclId()

Specified by:
setLatest in interface DbAccessControlList

isVersioned

public boolean isVersioned()
Description copied from interface: DbAccessControlList
Is this ACL versioned - if not there will be no old versions of the ACL and the long id will remain unchanged. If an acl is versioned it can not be updated - a new copy has to be created,

Specified by:
isVersioned in interface DbAccessControlList
Returns:

setVersioned

public void setVersioned(boolean versioned)
Description copied from interface: DbAccessControlList
Set if this ACL is versioned on write

Specified by:
setVersioned in interface DbAccessControlList

getAclChangeSet

public DbAccessControlListChangeSet getAclChangeSet()
Description copied from interface: DbAccessControlList
Get the change set

Specified by:
getAclChangeSet in interface DbAccessControlList
Returns:

setAclChangeSet

public void setAclChangeSet(DbAccessControlListChangeSet aclChangeSet)
Description copied from interface: DbAccessControlList
Set the change set

Specified by:
setAclChangeSet in interface DbAccessControlList

find

public static DbAccessControlList find(org.hibernate.Session session)

getInheritsFrom

public java.lang.Long getInheritsFrom()
Description copied from interface: DbAccessControlList
Get the ACL from which this one inherits

Specified by:
getInheritsFrom in interface DbAccessControlList
Returns:

setInheritsFrom

public void setInheritsFrom(java.lang.Long id)
Description copied from interface: DbAccessControlList
Set the ACL from which this one inherits

Specified by:
setInheritsFrom in interface DbAccessControlList

getCopy

public DbAccessControlList getCopy(java.lang.Long parentAcl,
                                   ACLCopyMode mode)
Specified by:
getCopy in interface DbAccessControlList

createLayeredAcl

public static DbAccessControlList createLayeredAcl(java.lang.Long indirectedAcl)

getRequiresVersion

public boolean getRequiresVersion()
Specified by:
getRequiresVersion in interface DbAccessControlList

setRequiresVersion

public void setRequiresVersion(boolean requiresVersion)
Specified by:
setRequiresVersion in interface DbAccessControlList


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