wt.sandbox
Class InitialCheckinDataApplicator

java.lang.Object
  extended bywt.sandbox.InitialCheckinDataApplicator
All Implemented Interfaces:
Evolvable, Externalizable, Serializable

public class InitialCheckinDataApplicator
extends Object
implements Evolvable, Externalizable

Class responsible for applying InitialCheckinData to Versioned objects when called upon by SandboxService. Subclass this and InitialCheckinData to provide additional data to initial check-ins.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static InitialCheckinDataApplicator DEFAULT_INSTANCE
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
InitialCheckinDataApplicator()
           
 
Method Summary
protected  void apply(NetFactor nfObj, String beanPropertyName, Object beanPropertyValue)
          Internal utility for use by InitialCheckinDataApplicator and its subclasses to set bean properties on versioned object via Windchill Introspection and Java Reflection.
 void apply(WTKeyedMap initialCheckinToDataMap)
          Responsible for applying specified data to specified versions.
protected  void applyIdentityAttributes(WTKeyedMap initialCheckinToDataMap)
          Responsible for applying identity-related portions of specified data to specified versions.
static InitialCheckinDataApplicator getDefaultInstance()
          Returns a shared, default instance of this class.
protected  AdminDomainRef getDomain(InitialCheckinData data)
          Internal utility for use by InitialCheckinDataApplicator and its subclasses to derive the target administrative domain from an InitialCheckinData instance.
protected  Folder getFolder(InitialCheckinData data)
          Internal utility for use by InitialCheckinDataApplicator and its subclasses to derive the target folder domain from an InitialCheckinData instance (i.e.
protected  WTPrincipalReference getOrganizationReference(InitialCheckinData data)
          Internal utility for use by InitialCheckinDataApplicator and its subclasses to derive the target organization from an InitialCheckinData instance.
 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(InitialCheckinDataApplicator thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private static void validateInitialCheckinFolder(Object version, Folder folder)
           
 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, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

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

DEFAULT_INSTANCE

private static final InitialCheckinDataApplicator DEFAULT_INSTANCE
Constructor Detail

InitialCheckinDataApplicator

public InitialCheckinDataApplicator()
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(InitialCheckinDataApplicator 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

getDefaultInstance

public static InitialCheckinDataApplicator getDefaultInstance()
Returns a shared, default instance of this class.

Supported API: false

Returns:
InitialCheckinDataApplicator

apply

public void apply(WTKeyedMap initialCheckinToDataMap)
           throws WTException,
                  WTPropertyVetoException
Responsible for applying specified data to specified versions. Called by SandboxService to apply caller specified data to initial check-ins. This class implementation provides basic handling of data provided by InitialCheckinData class itself.

Supported API: false

Parameters:
initialCheckinToDataMap - map from initial check ins to corresponding InitialCheckinData objects
Throws:
WTException
WTPropertyVetoException

applyIdentityAttributes

protected void applyIdentityAttributes(WTKeyedMap initialCheckinToDataMap)
                                throws WTException,
                                       WTPropertyVetoException
Responsible for applying identity-related portions of specified data to specified versions. Called by apply().

Supported API: false

Parameters:
initialCheckinToDataMap - map from initial check ins to corresponding InitialCheckinData objects
Throws:
WTException
WTPropertyVetoException

apply

protected void apply(NetFactor nfObj,
                     String beanPropertyName,
                     Object beanPropertyValue)
              throws WTException,
                     WTPropertyVetoException
Internal utility for use by InitialCheckinDataApplicator and its subclasses to set bean properties on versioned object via Windchill Introspection and Java Reflection. This is especially helpful for some bean properties/attributes like name and number which are not introduced via a common interface.

Supported API: false

Parameters:
nfObj - object to apply new bean property value to
beanPropertyName - name of bean property to change
beanPropertyValue - new value of bean property to set
Throws:
WTException
WTPropertyVetoException

getDomain

protected AdminDomainRef getDomain(InitialCheckinData data)
                            throws WTException
Internal utility for use by InitialCheckinDataApplicator and its subclasses to derive the target administrative domain from an InitialCheckinData instance.

Parameters:
data - initial check-in data
Returns:
AdminDomainRef
Throws:
WTException

getFolder

protected Folder getFolder(InitialCheckinData data)
                    throws WTException
Internal utility for use by InitialCheckinDataApplicator and its subclasses to derive the target folder domain from an InitialCheckinData instance (i.e. in the case where InitialCheckinData.getFolder() returns null).

Parameters:
data - initial check-in data
Returns:
Folder
Throws:
WTException

getOrganizationReference

protected WTPrincipalReference getOrganizationReference(InitialCheckinData data)
                                                 throws WTException
Internal utility for use by InitialCheckinDataApplicator and its subclasses to derive the target organization from an InitialCheckinData instance.

Parameters:
data - initial check-in data
Returns:
WTPrincipalReference
Throws:
WTException

validateInitialCheckinFolder

private static void validateInitialCheckinFolder(Object version,
                                                 Folder folder)
                                          throws WTPropertyVetoException
Throws:
WTPropertyVetoException