Group and Map Information Classes
Windchill ESI Group and Map Information
ESIGroupInfo
Several Windchill ESI services RPC responses are Info*Engine virtual database objects. The VDB objects are composed of Info*Engine group objects. ESIGroupInfo objects define characteristics of the group. The attributes are:
isUnchanged : boolean
If set to true, this group would be considered to hold only unchanged data. The value of the attribute helps ESI services determine whether or not the generated ESI response has only unchanged data.
logicalName : String
The logical name to be used by the clients of this object when obtaining the object from the Group Information Manager.
physicalName : String
The name to give the Info*Engine group this object describes. It is this name that will appear in the ESI response message for a given group.
releaseActivityNeeded : boolean
If the value is true, pending ReleaseActivity objects are created when the group's contents are processed by the VDB builder. The existence of the ReleaseActivity objects prevents Windchill ESI services from attempting multiple concurrent attempts to publish the same object.
releaseClass : String
The value to assign to the releaseClass attribute of each of the ReleaseActivity objects that are created when the group’s contents are processed.
mapInfos : HashMap<String, ESIMapInfo>
A HashMap of Strings representing object types as keys and the corresponding ESIMapInfo objects as values.
These attributes of the class have public getter methods. Additional public methods of the class:
ESIGroupInfo(logicalName : String, physicalName : String, mapInfo : ESIMapInfo, isReleaseActivityNeeded : boolean, releaseClass : String)
This constructor is currently not used.
ESIGroupInfo(logicalName : String, physicalName : String, mapInfos : HashMap<String, ESIMapInfo>, isReleaseActivityNeeded : boolean, releaseClass : String)
Creates a new ESIGroupInfo instance, setting the attributes to the input values.
getMapInfo(typedef : String) : ESIMapInfo
Returns the ESIMapInfo object corresponding to the input object type. Fetches the required output from the HashMap in mapInfos.
getMapSourceAttributes() : Collection
This method is currently not used.
getMapSourceAttributes(typedef : String) : Collection
Returns a collection of Strings that represent the names of source attributes for the input object type.
ESIGroupInfoManager
The ESIGroupInfoManager is a factory which creates ESIGroupInfo objects and makes them available to other objects. Implements the Singleton pattern to ensure that only one instance exists in a VM.
ESIGroupInfoManager()
The default constructor is declared as protected. This forces access to the constructor via the static method instance of the class. The constructor invokes buildTargetGroupMapInfo() to populate the HashMap in groupInfoTargetMap.
getGroupInfo(groupName : String) : ESIGroupInfo
Returns the ESIGroupInfo for the supplied group name. This method is currently not used.
getGroupInfo(groupName : String, target : ESITarget) : ESIGroupInfo
Returns the ESIGroupInfo object for the input group name and distribution target. Fetches the required output from the HashMap in groupInfoTargetMap.
* 
The HashMap in groupInfoTargetMap contains ESITargetResponseMetaInfo objects as keys and certain LinkedHashMap objects as values. Each LinkedHashMap object has group names as keys and ESIGroupInfo objects as values.
* 
ESITargetResponseMetaInfo is an inner class defined within ESIGroupInfoManager, having the ESITarget and the relevant ESI response meta information file path as its attributes. In essence, it represents a given ESITarget object, but since a user can modify the associated ESI response meta information file path any time, the class holds the target and its path together, thereby ensuring uniqueness of the key that is stored in groupInfoTargetMap.
getGroupInfos() : Collection
Returns an ordered collection of all ESIGroupInfo objects. This method is currently not used.
getGroupInfos(target : ESITarget) : Collection
Returns an ordered collection of all ESIGroupInfo objects for the input distribution target.
<<Static>> instance() : ESIGroupInfoManager
Gets the value of the _instance attribute. If the attribute is null, create an instance and store it in the attribute before returning its value.
getGroupInfo (groupName : String, contained : WTContained) : ESIGroupInfo
Returns the ESIGroupInfo object with the passed name and for the organization associated with the contained instance. This method is currently not used.
getGroupInfos (contained : WTContained) : Collection
Returns a collection of all the ESIGroupInfo objects that are applicable to the organization associated with the contained instance. This method is currently not used.
buildTargetGroupMapInfo() : void
Populates the HashMap in groupInfoTargetMap by invoking refreshTargetGroupMapInfo() for every active ESITarget object in the database.
refreshTargetGroupMapInfo(target : ESITarget) : boolean
Adds an entry to the HashMap in groupInfoTargetMap by parsing the contents of the ESI response meta information file that is referenced by the input distribution target. Returns a true if the file could be parsed successfully. A false is returned if some error was encountered while parsing the file.
clearTargetGroupMapInfo(target : ESITarget) : void
Removes the entry for the input distribution target from the HashMap in groupInfoTargetMap.
ESIMapInfo
Each ESIGroupInfo object contains a HashMap of Strings representing object types as keys and the corresponding ESIMapInfo objects as values. The ESIMapInfo object manages the relationship between the Info*Engine Group and the ESIMap that is used to format the contents of the Group.
* 
An ESIMapInfo object is created based on the contents of the relevant MapInformation element that is read in from the ESI response meta information file.
The object has the following attributes:
mapFileName : String
Given an ESIMapInfo object, the relevant ESIMap object may be fetched from the maps Hashtable of the ESIMapManager instance, using the value of this attribute as the key.
* 
This attribute holds the value of the XML attribute id of a Map element that is read from the ESI response meta information file.
elementMetaName : String
When mapping the object, a meta item named "com.infoengine.xml.esi" is to be created for the output I*E Element and assigned the value of this attribute. This causes the I*E SOAP servlet to render the output XML element with a name equal to the value of this attribute.
keyAttributes : String[]
The names of the key attributes used to filter out duplicates. If null, the elements are not filtered.
typedef : String
Holds a String that represents the object type. For e.g., the ESIMapInfo object for a WTPart may hold “wt.part.WTPart” for this attribute.
* 
The attributes mapFileName, elementMetaName, keyAttributes and typedef of the object are populated based on the contents of the XML elements mapRef, elementMetaName, keyAttribute and typedef respectively of the ESI response meta information file.
These attributes of the class have public getter methods. Addition public methods of the class:
ESIMapInfo(mapFileName : String, elementMetaName : String, keyAttributes : String[])
Only constructor for the object, ensures that the object is initialized properly.
getMap() : ESIMap
Returns the ESIMap identified by the value of the mapFileName attribute.
這是否有幫助?