com.ca.jcs
Class ObjectInfo

java.lang.Object
  extended by com.ca.jcs.ObjectInfo
All Implemented Interfaces:
Cloneable

public class ObjectInfo
extends Object
implements Cloneable

This class contains all the information important to the JCS framework for a target object, derived from its Distinguished Name (DN).


Constructor Summary
protected ObjectInfo()
          Use BaseConnector.createObjectInfo() instead.
 
Method Summary
 Object clone()
           
 ObjectInfo copy(Rdn newConnRdn)
          Clone this object info changing its most deeply nested rdn.
 void copyTo(ObjectInfo to)
          Copy the state of this object into to.
 Name getConnectorDn()
          Return connector-speak Distinguished Name (DN) for target object.
 String getConnectorNativeName()
           
 VirtualContainer getContainer()
           
 String getContainerName()
          Return Virtual Container name for target object, or null if not relevant.
 LdapDN getLdapDn()
          Return LDAP-speak Distinguished Name (DN) for target object.
 String getName()
          Return name of target object.
 MetaObjectClassMapping getObjectClassMapping()
          Return all information cached for target object's class.
 boolean isConnectorDnFromCache()
          True if connector DN came from cache, and therefore may be inaccurate.
 boolean isConnectorLevel()
          Returns true if target object is the connector itself, rather then a child object nested under it.
 boolean isContainerRef()
          Returns true if the target object is a "Virtual Container".
 boolean isRenamed()
          Used to flag original husk when an object's name is changed by doModifyRn(), effects subtle aspects of doDelete()'s behaviour when true (in particular associations based on keys other then the object's naming attribute - if such associations are supported, should not be cleaned up).
protected  void recalcNameFromConnectorDn(Name connectorDn)
          Recalculates object name based on connector DN.
 void setConnectorDn(Name connectorDn)
          Store provided connector-speak DN, paying particular attention to CachedLdapDN instances for which isConnectorDnFromCache() will return true.
 void setConnectorLevel(boolean connectorLevel)
           
 void setConnectorNativeName(String connectorNativeName)
          Some connectors have a string native representation which doesn't use DN syntax in which case this value can be used.
 void setContainer(VirtualContainer container)
           
 void setContainerName(String containerName)
           
 void setLdapDn(LdapDN ldapDn)
           
 void setName(String name)
           
 void setObjectClassMapping(MetaObjectClassMapping objectClassMapping)
           
 void setRenamed(boolean renamed)
           
 String toString()
          Returns string containing target object's class and name.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectInfo

protected ObjectInfo()
Use BaseConnector.createObjectInfo() instead.

Method Detail

isConnectorLevel

public boolean isConnectorLevel()
Returns true if target object is the connector itself, rather then a child object nested under it.


setConnectorLevel

public void setConnectorLevel(boolean connectorLevel)

getLdapDn

public LdapDN getLdapDn()
Return LDAP-speak Distinguished Name (DN) for target object.


setLdapDn

public void setLdapDn(LdapDN ldapDn)

getConnectorDn

public Name getConnectorDn()
Return connector-speak Distinguished Name (DN) for target object.


setConnectorDn

public void setConnectorDn(Name connectorDn)
Store provided connector-speak DN, paying particular attention to CachedLdapDN instances for which isConnectorDnFromCache() will return true.

Parameters:
connectorDn -

recalcNameFromConnectorDn

protected void recalcNameFromConnectorDn(Name connectorDn)
Recalculates object name based on connector DN. setConnectorDn automatically calls the implementation of this method so that the object name is synched up with the connector DN which may have had converters applied (and consequently changed) Can override in custom converters if automatic synching is not desired or different behavior is sought. Note that if overridden and super method not called the name of the object can start differing from its connector DN based on any converters that may have been applied.

Parameters:
connectorDn -

getConnectorNativeName

public String getConnectorNativeName()

setConnectorNativeName

public void setConnectorNativeName(String connectorNativeName)
Some connectors have a string native representation which doesn't use DN syntax in which case this value can be used. Defaults to getConnectorDn().toString() unless overridden. Also see BaseConnector.convertConnectorDNToNativeName(Name) which will need to be overridden when this method is.


isConnectorDnFromCache

public boolean isConnectorDnFromCache()
True if connector DN came from cache, and therefore may be inaccurate.


getName

public String getName()
Return name of target object.


setName

public void setName(String name)

getContainerName

public String getContainerName()
Return Virtual Container name for target object, or null if not relevant.


setContainerName

public void setContainerName(String containerName)

getObjectClassMapping

public MetaObjectClassMapping getObjectClassMapping()
Return all information cached for target object's class.


setObjectClassMapping

public void setObjectClassMapping(MetaObjectClassMapping objectClassMapping)

getContainer

public VirtualContainer getContainer()

setContainer

public void setContainer(VirtualContainer container)

isRenamed

public boolean isRenamed()
Used to flag original husk when an object's name is changed by doModifyRn(), effects subtle aspects of doDelete()'s behaviour when true (in particular associations based on keys other then the object's naming attribute - if such associations are supported, should not be cleaned up).


setRenamed

public void setRenamed(boolean renamed)

toString

public String toString()
Returns string containing target object's class and name.

Overrides:
toString in class Object

isContainerRef

public boolean isContainerRef()
Returns true if the target object is a "Virtual Container".


clone

public Object clone()
Overrides:
clone in class Object

copy

public ObjectInfo copy(Rdn newConnRdn)
                throws InvalidNameException
Clone this object info changing its most deeply nested rdn.

Throws:
InvalidNameException

copyTo

public void copyTo(ObjectInfo to)
Copy the state of this object into to.



Created 2011-07-14 13:27 EST