wt.fc
Class IdentificationObject

java.lang.Object
  extended bywt.fc.IdentificationObject
All Implemented Interfaces:
Externalizable, NetFactor, Serializable
Direct Known Subclasses:
ArchiveIdentity, CabinetIdentity, ChangeIdentificationObject, ContainerTeamIdentity, DataFormatIdentity, DataMaintRecordIdentity, DerivedImageIdentity, EffConfigurationItemIdentificationObject, EPMDocumentMasterIdentity, EPMWorkspaceIdentity, ESITargetIdentity, LifeCycleTemplateIdentity, LifeCycleTemplateMasterIdentity, ManagedBaselineIdentity, NamedObjectIdentity, ProductInstanceIdentificationObject, ProjectIdentity, PromotionIdentificationObject, ReportTemplateIdentification, SubFolderIdentity, SubFolderLinkIdentity, TeamDistributionListIdentity, TeamIdentity, TeamTemplateIdentity, TransferFilterIdentity, TransferPolicyIdentity, TransferSpecIdentity, WfProcessTemplateIdentity, WfProcessTemplateMasterIdentity, WTContainerIdentity, WTContainerTemplateMasterIdentity, WTDocumentMasterIdentity, WTPartMasterIdentity, WTUnitMasterIdentity

public abstract class IdentificationObject
extends Object
implements NetFactor, Externalizable

The IdentificationObject is an abstract class that encapsulates information about the identity of a single class or a set of classes. It contains methods to store, change and delete associated semantic key. It also provides default implementations for all but two methods: 'setToObject' and 'getIdentity'. The default methods use a default semantic key class. A customized semantic key class can be implemented by (1) subclassing the semantic key class; overriding the methods that access the default semantic key (changeStoredKey, storeKey, deleteKey).

Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static ApplicationContextServices delegateFactory
           
static long EXTERNALIZATION_VERSION_UID
           
private static String KEY_CLASS_NAME
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
IdentificationObject()
           
 
Method Summary
protected  void changeIdentity(Identified obj)
          Updates the identity of the object passed as argument with the identity held in the object.
 void checkIdentity(Identified obj)
          Performs validation of the identity that depends only on the object own attributes.
protected  SemanticKey createKey(String identity)
           
 ClassInfo getClassInfo()
          Returns the ClassInfo object for this class.
private static ApplicationContextServices getDelegateFactory()
           
abstract  String getIdentity()
          Constructs and returns a string representing the object's identity.
private  IdentificationObjectNamespaceDelegate[] getIONDelegates()
           
protected  String getKeyClassName()
          Creates a name for the uniqueness constraint.
protected  SemanticKey getSemanticKey(UniquelyIdentified obj)
          Gets the SemanticKey to store for this identification object and UniquelyIdentified object.
protected  void initialize(Identified obj)
          Initializes objects created by new-factory methods.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(IdentificationObject thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
protected  void setAdditionalKeyAttributes(SemanticKey key)
           
protected abstract  void setToObject(Identified obj)
          Updates the identity of the object passed as argument with the identity held in the object.
 String toString()
          Returns the conceptual (modeled) name for the class.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.NetFactor
getConceptualClassname
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

KEY_CLASS_NAME

private static final String KEY_CLASS_NAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

delegateFactory

private static ApplicationContextServices delegateFactory
Constructor Detail

IdentificationObject

public IdentificationObject()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(IdentificationObject thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

toString

public String toString()
Returns the conceptual (modeled) name for the class.

Supported API: false

Returns:
String

getClassInfo

public ClassInfo getClassInfo()
                       throws WTIntrospectionException
Returns the ClassInfo object for this class.

Supported API: false

Specified by:
getClassInfo in interface NetFactor
Returns:
ClassInfo
Throws:
WTIntrospectionException

changeIdentity

protected void changeIdentity(Identified obj)
                       throws WTException
Updates the identity of the object passed as argument with the identity held in the object.

Supported API: false

Parameters:
obj -
Throws:
WTException

checkIdentity

public void checkIdentity(Identified obj)
                   throws WTException
Performs validation of the identity that depends only on the object own attributes. This kind of validation includes syntactical identity validation and inter-attribute constraints.

Supported API: false

Parameters:
obj -
Throws:
WTException

getKeyClassName

protected String getKeyClassName()
Creates a name for the uniqueness constraint. The default implementation uses the name of the class, which makes it inappropriate for uniqueness constraints spanning several classes.

Supported API: false

Returns:
String

getIdentity

public abstract String getIdentity()
Constructs and returns a string representing the object's identity. This is an abstract method that must be implemented by classes extending the IdentifiactionObject class. A straightforward way of build a string representation of the identity is to concatenate the attributes that constitute the identity, using an appropriate separator.

Supported API: false

Returns:
String

initialize

protected void initialize(Identified obj)
                   throws WTException
Initializes objects created by new-factory methods.

Supported API: false

Parameters:
obj -
Throws:
WTException

setToObject

protected abstract void setToObject(Identified obj)
                             throws WTException
Updates the identity of the object passed as argument with the identity held in the object.

Supported API: false

Parameters:
obj -
Throws:
WTException

getSemanticKey

protected SemanticKey getSemanticKey(UniquelyIdentified obj)
                              throws WTException
Gets the SemanticKey to store for this identification object and UniquelyIdentified object.

Supported API: false

Parameters:
obj -
Returns:
SemanticKey
Throws:
WTException

getDelegateFactory

private static ApplicationContextServices getDelegateFactory()

getIONDelegates

private IdentificationObjectNamespaceDelegate[] getIONDelegates()

setAdditionalKeyAttributes

protected void setAdditionalKeyAttributes(SemanticKey key)
                                   throws WTException
Throws:
WTException

createKey

protected SemanticKey createKey(String identity)
                         throws WTException
Throws:
WTException