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. 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 ERP Connector distribution target assignment user interface. The name attribute can contain a value up to 450 characters while the number attribute can contain a value up to 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. The attribute is set to com/ptc/windchill/esi/export/ExportToFile.xml, com/ptc/windchill/esi/export/ExportToFTP.xml or to com/ptc/windchill/esi/export/ExportToSMTP.xml by default, according as the destination is a file, an FTP or an Email target. 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 $CODEBASE$/com/ptc/windchill/esi/ESIResponseMetaInfo.xml by default. See section Modify the ESI Response Meta Information File for how this file may be modified to obtain customized versions of the response message.
* 
By default, both the <Destination> and <TargetID> elements that are sent with the ESI response hold the number attribute of the applicable distribution target. 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 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 a given ERP Connector destination may be stored on an ESITarget object, ERP Connector provides three soft type extensions by default – viz., ESIFileTarget, ESIFTPTarget and ESIEmailTarget. See the ERP Connector online help for information on such attributes.
ERP Connector 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 > Utilitiespage.
* 
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 attributes and methods in the class.
* 
As for the attribute defaultForContext, the public getter method is named is DefaultForContext. 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). 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.
Was this helpful?