com.atlassian.bamboo.security.acegi.acls
Class HibernateObjectIdentityImpl

java.lang.Object
  extended by com.atlassian.bamboo.security.acegi.acls.HibernateObjectIdentityImpl
All Implemented Interfaces:
java.io.Serializable, org.acegisecurity.acls.objectidentity.ObjectIdentity

public class HibernateObjectIdentityImpl
extends java.lang.Object
implements org.acegisecurity.acls.objectidentity.ObjectIdentity

See Also:
Serialized Form

Nested Class Summary
static class HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy
          Order is important in case multiple permission checked at once.
 
Constructor Summary
HibernateObjectIdentityImpl(java.lang.Class javaType, java.io.Serializable identifier)
           
HibernateObjectIdentityImpl(java.lang.Class javaType, java.io.Serializable identifier, HibernateObjectIdentityImpl ancestorIdentity)
           
HibernateObjectIdentityImpl(java.lang.Object object)
          Creates the ObjectIdentityImpl based on the passed object instance.
HibernateObjectIdentityImpl(java.lang.String javaType, java.io.Serializable identifier)
           
 
Method Summary
 boolean equals(java.lang.Object arg0)
          Important so caching operates properly.
 HibernateObjectIdentityImpl getAncestorIdentity()
           
 HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy getAncestorPermissionCheckPolicy(java.lang.Iterable<org.acegisecurity.acls.Permission> permissions)
           
 HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy getAncestorPermissionCheckPolicy(org.acegisecurity.acls.Permission permission)
           
 HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy getAncestorPermissionCheckPolicy(org.acegisecurity.acls.Permission[] permissions)
           
 java.io.Serializable getIdentifier()
           
 java.lang.Class getJavaType()
           
 int hashCode()
          Important so caching operates properly.
 void setAncestorPermissionCheckPolicy(org.acegisecurity.acls.Permission permission, HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy policy)
           
 void setIdentifier(java.io.Serializable identifier)
           
 void setJavaType(java.lang.Class javaType)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HibernateObjectIdentityImpl

public HibernateObjectIdentityImpl(java.lang.String javaType,
                                   @NotNull
                                   java.io.Serializable identifier)

HibernateObjectIdentityImpl

public HibernateObjectIdentityImpl(@NotNull
                                   java.lang.Class javaType,
                                   @NotNull
                                   java.io.Serializable identifier)

HibernateObjectIdentityImpl

public HibernateObjectIdentityImpl(@NotNull
                                   java.lang.Class javaType,
                                   @NotNull
                                   java.io.Serializable identifier,
                                   @Nullable
                                   HibernateObjectIdentityImpl ancestorIdentity)

HibernateObjectIdentityImpl

public HibernateObjectIdentityImpl(@NotNull
                                   java.lang.Object object)
                            throws org.acegisecurity.acls.IdentityUnavailableException
Creates the ObjectIdentityImpl based on the passed object instance. The passed object must provide a getId() method, otherwise an exception will be thrown. The object passed will be considered the javaType, so if more control is required, an alternate constructor should be used instead.

Parameters:
object - the domain object instance to create an identity for
Throws:
org.acegisecurity.acls.IdentityUnavailableException - if identity could not be extracted
Method Detail

equals

public boolean equals(java.lang.Object arg0)
Important so caching operates properly.

Considers an object of the same class equal if it has the same classname and id properties.

Specified by:
equals in interface org.acegisecurity.acls.objectidentity.ObjectIdentity
Overrides:
equals in class java.lang.Object
Parameters:
arg0 - object to compare
Returns:
true if the presented object matches this object

getIdentifier

public java.io.Serializable getIdentifier()
Specified by:
getIdentifier in interface org.acegisecurity.acls.objectidentity.ObjectIdentity

getJavaType

public java.lang.Class getJavaType()
Specified by:
getJavaType in interface org.acegisecurity.acls.objectidentity.ObjectIdentity

setJavaType

public void setJavaType(java.lang.Class javaType)

setIdentifier

public void setIdentifier(java.io.Serializable identifier)

getAncestorIdentity

@Nullable
public HibernateObjectIdentityImpl getAncestorIdentity()

setAncestorPermissionCheckPolicy

public void setAncestorPermissionCheckPolicy(@NotNull
                                             org.acegisecurity.acls.Permission permission,
                                             @NotNull
                                             HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy policy)

getAncestorPermissionCheckPolicy

public HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy getAncestorPermissionCheckPolicy(@NotNull
                                                                                                  org.acegisecurity.acls.Permission permission)

getAncestorPermissionCheckPolicy

public HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy getAncestorPermissionCheckPolicy(@Nullable
                                                                                                  org.acegisecurity.acls.Permission[] permissions)

getAncestorPermissionCheckPolicy

public HibernateObjectIdentityImpl.AncestorPermissionCheckPolicy getAncestorPermissionCheckPolicy(@NotNull
                                                                                                  java.lang.Iterable<org.acegisecurity.acls.Permission> permissions)

hashCode

public int hashCode()
Important so caching operates properly.

Specified by:
hashCode in interface org.acegisecurity.acls.objectidentity.ObjectIdentity
Overrides:
hashCode in class java.lang.Object
Returns:
the hash

toString

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


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.