Distribution Targets
Distribution Target Classes
ESITarget
A distribution target represents a unique destination. Each destination is persisted in the Windchill database and ESITarget objects represent the persisted destinations. Class ESITarget is a subclass of wt.fc.Item and inherits the Windchill persistence and access control capabilities of the Item class (see the image ESITarget Objects and Windchill Organizations below). Besides, it implements the interface wt.type.Typed and wt.notify.Notifiable, so as to allow for creation of soft type extensions and to support object event notifications respectively.
ESITarget objects have seven modeled attributes. The name, number and description attributes are provided for the benefit of the Windchill ESI distribution target assignment user interface. The name attribute can contain a value up to 450 characters while the number attribute can contain a value upto 32 characters. The description attribute can contain a value up to 2048 characters in length. The name and number attributes are required. The description attribute may be null. Additionally, every ESITarget object must have a unique value for its number attribute in the database. The defaultForContext attribute indicates whether or not the given ESITarget object is the default one for the container that it is created in. If set to true, it indicates that the ESITarget object is the default one for the associated container; it is set to false by default. The status attribute indicates whether or not the given ESITarget object is active. The status values are defined by the class ESITargetStatusType, which is an extension of wt.fc.EnumeratedType. A value of active stored in the enumerated type indicates that the ESITarget object is active; a value of inactive indicates an inactive target, meaning it cannot participate in an ESI transaction. The status attribute is set to active by default. The taskURI attribute holds the path to the Info*Engine task that will be used for delivering the ESI response message to the required destination, viz., to the data response queue of the TIBCO EMS server. The attribute is set to com/ptc/windchill/esi/export/ExportToJMSQueue.xml by default. The responseMetaInfoPath attribute holds the path to the ESI response meta information file that determines the format of the response message that will be generated for the distribution target. This attribute is set to $CODEBAS $/com/ptc/windchill/esi/ESIResponseMetaInfo.xml by default. See section Modifying Windchill ESI Preferences for how this file may be modified to obtain customized versions of the response message.
Besides the above described modeled attributes, an ESITarget object has several soft attributes, whose values determine what data exactly will constitute the response message. For example, the attribute ESIPart_AlternateFlag when set to true will ensure that alternate parts associated with the part being published are processed while generating the response message for the distribution target. For a list of such attributes (that are relevant for a given business object type) and their descriptions, see sections Publishing CNs, Publishing BOMs, Publishing Parts, Publishing Process Plans and Publishing Resources.
In order that attributes that are specific to SAP may be stored on an ESITarget object, Windchill ESI provides a soft type extension that is identified by the type ESISAPTarget by default. This type allows for storing the following SAP specific attributes – Client, Plant and SystemID. The content of the <Destination> element that is sent with the ESI response is composed of the values of the SystemID and Client attributes while that of the <TargetID> element is composed of the values of the number and Plant attributes. The content for the said elements is fetched using the getDestinationId() and getTargetId() APIs of class ESITargetUtility respectively, described in section Establishing Distribution Target Assignment Classes.
* 
Besides the above said soft extension, Windchill ESI provides a few others to cater to certain other types of distribution targets such as Oracle Applications, a File, an E-mail address etc. And it is possible for a user to create his/her own customized soft extensions of ESITarget as well, using the Type and Attribute Management UI.
Windchill ESI provides a user interface for defining ESITarget objects – this may be accessed from the Manage Distribution UI option that appears on the Site > Utilities or the Organization > Utilities page.
* 
The ESITarget attributes appear with their display names (rather than with their internal names) in the user interface – for example., the responseMetaInfoPath attribute appears with the name ESI Response Meta Information File Path. For the most part, it should be fairly straightforward to determine what attribute exactly is referred to by a given display name.
Windchill ESI services also provide methods to:
Define ESITarget objects
Delete ESITarget objects
Associate ESITarget objects to WTOrganization objects
Remove the association between ESITarget objects and WTOrganization objects
All the above described modeled attributes have public setter and getter methods.
Refer to the Windchill release specific Java documentation for more details on available methods in the class.
* 
As for the attribute defaultForContext, the public getter method is named isDefaultForContext. It simply returns the value in the attribute.
ESITargetAssignmentLink
Distribution target assignment is accomplished by creating a persisted relationship between a Windchill persistable object and an ESITarget. ESITargetAssignmentLink objects represent those relationships. ESITargetAssignmentLink is a subclass of wc.fc.ObjectToObjectLink and inherits the persistent relationship capabilities of that class (see the figure Using a Windchill ESI Renderer).
ESITargetAssociation
Windchill ESI services methods often need to maintain the relationship between a Windchill Persistable object and an ESITarget temporarily. The relationship may be persisted in the database, but it need not be. The ESITargetAssociation interface provides the relationship management capability for Windchill ESI services methods. The methods do not need to know whether or not the relationship is persisted. Several of the publicly available methods of Windchill ESI services accept arguments which are collections of ESITargetAssociation objects. The methods often return a collection of ESITargetAssociation objects.
When relationships are known to be persisted, ESITargetAssignmentLink objects are created or obtained from the Windchill Persistent Object Manager (see the figure Distribution Target Assignment Objects).
ESIQueryTargetAssociation
When relationships are not known to be persistent, ESIQueryTargetAssociation objects are created by the caller of Windchill ESI services (see the figure Using a Windchill ESI Renderer Error! Reference source not found.). Several methods of the Windchill ESI Services API require arguments that are instances of ESITargetAssociation. The ESIQueryTargetAssociation class is provided as a convenience to objects that need to provide such arguments. The objects using ESIQueryTargetAssociation are not required to create any objects in the database.
Distribution Target Assignment Objects
這是否有幫助?