org.springframework.security.acl.basic
Class NamedEntityObjectIdentity

java.lang.Object
  extended by org.springframework.security.acl.basic.NamedEntityObjectIdentity
All Implemented Interfaces:
java.io.Serializable, AclObjectIdentity

Deprecated. Use new spring-security-acl module instead

public class NamedEntityObjectIdentity
extends java.lang.Object
implements AclObjectIdentity

Simple implementation of AclObjectIdentity.

Uses Strings to store the identity of the domain object instance. Also offers a constructor that uses reflection to build the identity information.

See Also:
Serialized Form

Constructor Summary
NamedEntityObjectIdentity(java.lang.Object object)
          Deprecated. Creates the NamedEntityObjectIdentity based on the passed object instance.
NamedEntityObjectIdentity(java.lang.String classname, java.lang.String id)
          Deprecated.  
 
Method Summary
 boolean equals(java.lang.Object arg0)
          Deprecated. Important so caching operates properly.
 java.lang.String getClassname()
          Deprecated. Indicates the classname portion of the object identity.
 java.lang.String getId()
          Deprecated. Indicates the instance identity portion of the object identity.
 int hashCode()
          Deprecated. Important so caching operates properly.
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedEntityObjectIdentity

public NamedEntityObjectIdentity(java.lang.String classname,
                                 java.lang.String id)
Deprecated. 

NamedEntityObjectIdentity

public NamedEntityObjectIdentity(java.lang.Object object)
                          throws java.lang.IllegalAccessException,
                                 java.lang.reflect.InvocationTargetException
Deprecated. 
Creates the NamedEntityObjectIdentity based on the passed object instance. The passed object must provide a getId() method, otherwise an exception will be thrown.

Parameters:
object - the domain object instance to create an identity for
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException
Method Detail

equals

public boolean equals(java.lang.Object arg0)
Deprecated. 
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 AclObjectIdentity
Overrides:
equals in class java.lang.Object
Parameters:
arg0 - object to compare
Returns:
true if the presented object matches this object

getClassname

public java.lang.String getClassname()
Deprecated. 
Indicates the classname portion of the object identity.

Returns:
the classname (never null)

getId

public java.lang.String getId()
Deprecated. 
Indicates the instance identity portion of the object identity.

Returns:
the instance identity (never null)

hashCode

public int hashCode()
Deprecated. 
Important so caching operates properly.

Specified by:
hashCode in interface AclObjectIdentity
Overrides:
hashCode in class java.lang.Object
Returns:
the hash of the classname and id

toString

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