com.ptc.windchill.enterprise.change2.dataUtilities
Class ChangeLinkAttributeDataUtility

java.lang.Object
  extended by com.ptc.core.components.factory.AbstractDataUtility
      extended by com.ptc.windchill.enterprise.change2.dataUtilities.ChangeLinkAttributeDataUtility
All Implemented Interfaces:
com.ptc.core.components.descriptor.DataUtility

public class ChangeLinkAttributeDataUtility
extends com.ptc.core.components.factory.AbstractDataUtility

This class is used to process the change binary link attributes used by the various change clients. This includes the Inventory Disposition attributes. and the description attributes. The ReportedAgainst Quantity is also handled by this class.

Supported API: true

Extendable: true


Method Summary
 Object getDataValue(String component_id, Object datum, com.ptc.core.components.descriptor.ModelContext mc)
          Will retrieve a value from a binary link using the reference object as the source.
 String getLabel(String component_id, com.ptc.core.components.descriptor.ModelContext mc)
          Will retrieve the localized label of the attribute.
 void setModelData(String component_id, List objects, com.ptc.core.components.descriptor.ModelContext mc)
          Method to set the Model Data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDataValue

public Object getDataValue(String component_id,
                           Object datum,
                           com.ptc.core.components.descriptor.ModelContext mc)
                    throws WTException
Will retrieve a value from a binary link using the reference object as the source. This method assumes the setModelData() method has been called to initialize the data.

Supported API: true

Parameters:
component_id - One of the supported component_ids
datum - The object to use as the reference
mc - The current model context
Throws:
WTException

getLabel

public String getLabel(String component_id,
                       com.ptc.core.components.descriptor.ModelContext mc)
                throws WTException
Will retrieve the localized label of the attribute. If the attribute is one of the known attributes, the text will be obtained from the resource bundle.

Supported API: true

Overrides:
getLabel in class com.ptc.core.components.factory.AbstractDataUtility
Parameters:
component_id - The component ID to search the resource bundle for.
mc - The current model context.
Returns:
the label for the column.
Throws:
WTException

setModelData

public void setModelData(String component_id,
                         List objects,
                         com.ptc.core.components.descriptor.ModelContext mc)
                  throws WTException
Method to set the Model Data. This method will try and deterministically Build up a map of the attribute values such that they can be reused for additional attributes off the binary link.

Supported API: true

Overrides:
setModelData in class com.ptc.core.components.factory.AbstractDataUtility
Parameters:
component_id - The component id of the column/attribute
objects - The objects to retrieve the data for.
mc - The model context.
Throws:
WTException