com.ptc.windchill.enterprise.nativeapp.server
Class DefaultAttributeMapper

java.lang.Object
  extended bycom.ptc.windchill.enterprise.nativeapp.server.DefaultAttributeMapper
All Implemented Interfaces:
ApplicationAttributeMapperDelegate, Externalizable, Serializable

public class DefaultAttributeMapper
extends Object
implements ApplicationAttributeMapperDelegate, Externalizable

Added mainly to return a client configuration for the html client. The html client should not be using the other methods defined in this delegate.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
DefaultAttributeMapper()
           
 
Method Summary
 ClientConfiguration getClientConfiguration(Locale locale)
          Return the configuration information for this specific application.
 HashMap getObjectAttributes(WTObject object, Locale locale)
          From a WTObject return a Hashmap which contains the name value pairs of the attributes from the application and the values.
 HashMap getSpecificObjectAttributes(WTObject object, String[] attributeList, Locale locale)
          From a WTObject return a Hashmap which contains the name value pairs of the attributes from the application and the values.
 HashMap mapToApplicationNames(WTObject object, HashMap nameValueData)
          Pass in the HashMap of name/values of Windchill attributes and return the HashMap of the corresponding Application names to the values.
 HashMap mapToWindchillNames(WTObject object, HashMap nameValueData, Locale locale)
          Pass in the HashMap of name/values from the application attributes and return the HashMap of the corresponding Windchill names to the values.
 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(DefaultAttributeMapper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 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
Constructor Detail

DefaultAttributeMapper

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

getObjectAttributes

public HashMap getObjectAttributes(WTObject object,
                                   Locale locale)
                            throws WTException
From a WTObject return a Hashmap which contains the name value pairs of the attributes from the application and the values. These are not Windchill attribute names.

Supported API: false

Specified by:
getObjectAttributes in interface ApplicationAttributeMapperDelegate
Parameters:
object -
locale - The locale of the client, so that any attributes values that need to be processed for display can be handled.
Returns:
HashMap
Throws:
WTException

mapToWindchillNames

public HashMap mapToWindchillNames(WTObject object,
                                   HashMap nameValueData,
                                   Locale locale)
                            throws WTException
Pass in the HashMap of name/values from the application attributes and return the HashMap of the corresponding Windchill names to the values.

Supported API: false

Specified by:
mapToWindchillNames in interface ApplicationAttributeMapperDelegate
Parameters:
object - Soft type to use for the document.
nameValueData - Name value pairs of application attributes to map to Windchill name value pairs.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

mapToApplicationNames

public HashMap mapToApplicationNames(WTObject object,
                                     HashMap nameValueData)
                              throws WTException
Pass in the HashMap of name/values of Windchill attributes and return the HashMap of the corresponding Application names to the values.

Supported API: false

Specified by:
mapToApplicationNames in interface ApplicationAttributeMapperDelegate
Parameters:
object - Document object to use as soft type.
nameValueData - Name value pairs of Windchill attributes to map to application name value pairs.
Returns:
HashMap
Throws:
WTException

getClientConfiguration

public ClientConfiguration getClientConfiguration(Locale locale)
                                           throws WTException
Return the configuration information for this specific application.

Supported API: false

Specified by:
getClientConfiguration in interface ApplicationAttributeMapperDelegate
Parameters:
locale - Locale of the client.
Returns:
ClientConfiguration
Throws:
WTException

getSpecificObjectAttributes

public HashMap getSpecificObjectAttributes(WTObject object,
                                           String[] attributeList,
                                           Locale locale)
                                    throws WTException
From a WTObject return a Hashmap which contains the name value pairs of the attributes from the application and the values. These are not Windchill attribute names. This method accepts a list of attributes that are required and only returns those attributes.

Supported API: false

Specified by:
getSpecificObjectAttributes in interface ApplicationAttributeMapperDelegate
Parameters:
object -
attributeList - List of Windchill names for attributes to be returned. Some of these attributes are made up names to get at specific information that processing has been added to this method to handle.
locale - The locale of the client, so that any attributes values that need to be processed for display can be handled.
Returns:
HashMap
Throws:
WTException