com.ptc.windchill.esi.svc
Class StandardESIService

java.lang.Object
  extended bywt.services.StandardManager
      extended bycom.ptc.windchill.esi.svc.StandardESIService
All Implemented Interfaces:
ESIService, ESISvrService, Manager, NetFactor, Serializable

public final class StandardESIService
extends StandardManager
implements ESIService, ESISvrService, Serializable

StandardESIService is a concrete implementation of ESIService and ESISvrService.

Use the newStandardESIService static factory method(s), not the StandardESIService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String BOM_TYPEID
           
private static String CHANGE_TYPEID
           
private static String CLASSNAME
           
private static boolean ecnCentric
           
private static String ecnCentric_state
           
private static boolean enforceOrgs
           
private static HashMap esiLocaleMap
           
private static Locale esiTargetLocale
           
private static String NULL_STRING
           
private static String PART_TYPEID
           
private static String partCentric_state
           
private static String RESOURCE
           
static String SEPERATOR
           
private static ArrayList sl
           
private static String sourceLocales
           
private static String targetLocales
           
private static String team_template
           
private static boolean teamOverridden
           
private static ArrayList tl
           
private static String USED_RESOURCE
           
private static boolean wf_auto_launch
           
private static String wf_description
           
private static String wf_process_prefix
           
private static String wf_template
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardESIService()
           
 
Method Summary
private  void addRolePrincipalMaps(Role role, Team fromTeam, Team toTeam)
          For a given role , add all role-principal-maps from one team to another
 void adjustTargetAssignments(String ufids, Group targetInfo)
          Given a concatenated set of UFIDs (for WTParts) and a Collection of ESITarget UFIDs, make (or remove) any required assignments.
 void assignTarget(Persistable object, ESITarget target)
          Assign an object to an ESITarget for ESI target system destination determination.
 void assignTarget(Persistable object, Group targets)
          Assign an object to an Infoengine group of ESITarget objects for ESI target system destination determination.
private  String buildESIWfName(LifeCycleManaged anObject)
           
private static ArrayList buildLcList(String s, String delimiter)
           
 void connectTargetToOrganization(ESITarget tgt, WTOrganization org)
          Connects an ESITarget to a WTOrganization.

Delegates all work to an instance of ESITargetUtility.
protected  void copyAlternateItemGroup(WTPartSubstituteLink oldSubLink, WTPartSubstituteLink newSubLink)
           
private  void copyTargetAssignments(WTPart part, WTPart oldPart)
           
 ESITarget createTarget(String name, String description, String system)
          Creates an ESITarget from the arguments and saves the result in the database.
 ESITarget createTarget(String name, String description, String system, WTContainerRef containerRef)
          Creates and persists an ESITarget.
 void createTransaction(WTObject object)
          Creates and saves in the database a new ESITransaction that is linked to a WTObject.
private  Team deleteAllRolePrincipalMaps(Role role, Team toTeam)
          Delete all role-principal-maps from a team for a given role
 void deleteTarget(ESITarget tgt)
          Deletes an ESITarget from the database.
 void disconnectTargetFromOrganization(ESITarget tgt, WTOrganization org)
          Deletes the ESITargetOrganizationLink that connects an ESITarget object to a WTOrganization object.
 void dispatchVetoableEvent(String eventType, Persistable obj)
          Dispatches a ESIServiceEvent that includes a target object.
private  Persistable findAnObj(Class aClass, String attrName, String attrValue, WTContainerRef containerRef)
           
private  Persistable findAnObj(Class aClass, String attrName, String attrValue, WTContainerRef containerRef, boolean latest)
          Find an object.
 Collection findESITargets(Persistable anObject)
          Returns a collection of ESITargets for the given object.
 ReleaseActivity[] getActivities(String ufid)
          Given the UFID of an ESITransaction, returns an array of all of the ReleaseActivities associated with that ESITransaction.
 IeCollection getBOM(String objectID, boolean delta, boolean parts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String mulitLevel, boolean documents, String configSpec, String auth, String wcAdapter, String transactionID)
          getBOM RPC processor.
 String getConceptualClassname()
          Deprecated.  
 IeCollection getECN(String objectID, boolean delta, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String mulitLevel, boolean documents, String configSpec, String auth, String wcAdapter, String transactionID)
          getECN RPC processor.
 Group getHistory(String ufid, String groupOut)
          Returns a Group of mapped ReleaseActivity objects associated with the object identied by the argument.
private  Locale getLocale()
           
 IeCollection getPart(String objectID, boolean alternates, boolean documents, String auth, String wcAdapter, String transactionID)
          GetPart RPC processor.
 Group getReleaseActivities(String ufid)
          Returns an Info*Engine Group of mapped ESI ReleaseActivity objects given the ufid of an ESITransaction object.
 Group getReleaseActivitiesMessage(String ufid)
          Return an Info*Engine Group of mapped ReleaseActivityMessage object given the ufid of a ReleaseActivity object.
 ESITarget getTarget(String system)
          Return the ESI Target whose system attribute matches the argument.
 Group getTargetAssociations(String ufids, String groupName)
          Given a string of concatenated UFIDs, return the ESITarget objects that are associated with those objects.
 WTKeyedMap getTargets(WTCollection objects)
          Takes a WTCollection of persistables and returns a WTKeyedMap.
 Group getTargetsWithHistory(Collection objects)
          Returns an Info*Engine Group of mapped ESITargetHistory objects.
 Collection getTargetsWithHistory(Persistable object)
          Returns a Collection of ESITargetHistory objects.
 Group getTargetsWithHistory(String ufid)
          Returns an Info*Engine Group of mapped ESITargetHistory objects.
 ESITransaction getTransaction(String id)
          Return the ESITransaction whose idNumber attribute matches the argument.
 Group getTransactionLogMessage(String ufid)
          Returns an Info*Engine Group of mapped ESITransactionMessage object given the ufid of an ESITransaction object.
 Group getTransactions(Group elements)
          Returns an Info*Engine Group of ESITransaction objects that are associated with the objects in the argument.
private  String getUserName()
           
private  boolean hasRolePrincipalMaps(Role role, Team team)
           
 void hideTransaction(String ufid)
          Hide an ESITransaction from the user interface.
private static void initLocaleMaps()
           
private  boolean inSourceLocaleSet(Locale locale)
           
 boolean isInRelease(Persistable obj)
          Returns true if the given releasable object or any releasable iteration for the given master has been published to ERP .
private  boolean isLaunchable(LifeCycleManaged anObject, LifeCycleState state)
          Always call this method before calling launchWfProcess
 boolean isWfLaunched(LifeCycleManaged anObject)
          Check whether there is a workflow process with the status of OPEN_RUNNING for the given object.
 ESITargetAssociation latestExport(Persistable object, ESITarget target)
          Find the highest revision of an object that has been exported to an ESI target.
private  void launchWfProcess(LifeCycleManaged anObject)
           
static StandardESIService newStandardESIService()
          Default factory for the class.
private  void overrideRole(Role role, Team fromTeam, Team toTeam)
          Copy role-principal-maps from a team to another for a given role
protected  void performStartupProcess()
          Prepare the Windchill Service to begin operations.
private  TeamReference populateESITeam(TeamReference objtId, TeamReference esitId)
           
 void postEvent(String objectID, String transaction, boolean successful, String message)
          PostEvent RPC processor.
 void postResult(String objectID, String description, String txnID, boolean successful, boolean subtransaction, String targetSystem, String message, String timestamp, String action, String cls, String user)
          PostResult RPC processor.
private  void printTeam(TeamReference teamRef)
           
 void recordExport(String objectID, String targetSystem, String releaseClass)
          RecordExport RPC processor.
 void registerEvents(ManagerService ms)
          Register events with the passed ManagerService.
 void release(Persistable obj)
          Release a business object to ERP.
 void release(Persistable obj, String userName, Locale locale)
          Release a business object to ERP.
 void removeTargetAssignment(Group ufids)
          Deletes from the database the ESITargetAssignmentLink objects that are identified by the argument.
 void removeTargetAssignment(Persistable object, ESITarget target)
          Remove the relationship between an ESITarget and a persistable object.
 void removeTargetAssignment(String ufid)
          Deletes from the database the ESITargetAssignmentLink that is identified by the argument.
private  void synchESITransaction()
           
private  void validateDeletion(ESITarget tgt)
           
private  void validateDeletion(ESITransaction txn)
           
private  void validateDeletion(WTPart part)
           
private  boolean validateESITargetAssignments(WTChangeOrder2 chgOrder)
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

NULL_STRING

private static final String NULL_STRING
See Also:
Constant Field Values

SEPERATOR

public static final String SEPERATOR
See Also:
Constant Field Values

USED_RESOURCE

private static final String USED_RESOURCE
See Also:
Constant Field Values

wf_auto_launch

private static boolean wf_auto_launch

wf_template

private static String wf_template

wf_process_prefix

private static String wf_process_prefix

wf_description

private static String wf_description

ecnCentric

private static boolean ecnCentric

partCentric_state

private static String partCentric_state

ecnCentric_state

private static String ecnCentric_state

team_template

private static String team_template

teamOverridden

private static boolean teamOverridden

enforceOrgs

private static boolean enforceOrgs

sourceLocales

private static String sourceLocales

targetLocales

private static String targetLocales

esiLocaleMap

private static HashMap esiLocaleMap

sl

private static ArrayList sl

tl

private static ArrayList tl

esiTargetLocale

private static Locale esiTargetLocale

CHANGE_TYPEID

private static final String CHANGE_TYPEID
See Also:
Constant Field Values

BOM_TYPEID

private static final String BOM_TYPEID
See Also:
Constant Field Values

PART_TYPEID

private static final String PART_TYPEID
See Also:
Constant Field Values
Constructor Detail

StandardESIService

public StandardESIService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Prepare the Windchill Service to begin operations. This is a protected method that is called by the base class, StandardManager, start up processing. The method registers event listeners that:

Supported API: true

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

registerEvents

public void registerEvents(ManagerService ms)
Register events with the passed ManagerService.

Supported API: false

Specified by:
registerEvents in interface Manager
Overrides:
registerEvents in class StandardManager
Parameters:
ms -

dispatchVetoableEvent

public void dispatchVetoableEvent(String eventType,
                                  Persistable obj)
                           throws ESIException
Dispatches a ESIServiceEvent that includes a target object.

Supported API: false

Parameters:
eventType - The name of the ESIServiceEvent type.
obj - The target of the event.
Throws:
ESIException

newStandardESIService

public static StandardESIService newStandardESIService()
                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardESIService
Throws:
WTException

assignTarget

public void assignTarget(Persistable object,
                         Group targets)
                  throws ESITargetAssignmentException,
                         WTException
Assign an object to an Infoengine group of ESITarget objects for ESI target system destination determination. Delegates all work to an instance of ESITargetUtility.

Supported API: true

Specified by:
assignTarget in interface ESIService
Parameters:
object - The object to which the target is being assigned
targets - The Infoengine group of ESITarget objects to be assigned to the object argument.
Throws:
ESITargetAssignmentException
WTException

assignTarget

public void assignTarget(Persistable object,
                         ESITarget target)
                  throws ESITargetAssignmentException,
                         WTException
Assign an object to an ESITarget for ESI target system destination determination. Delegates all work to an instance of ESITargetUtility.

Supported API: true

Specified by:
assignTarget in interface ESIService
Parameters:
object - The object to which the target is being assigned
target - The ESITarget to be assigned to the object argument.
Throws:
ESITargetAssignmentException
WTException

connectTargetToOrganization

public void connectTargetToOrganization(ESITarget tgt,
                                        WTOrganization org)
                                 throws WTException
Connects an ESITarget to a WTOrganization.

Delegates all work to an instance of ESITargetUtility. The ESITargetUtility method is not implemented for ESI 7.0.

Supported API: false

Specified by:
connectTargetToOrganization in interface ESIService
Parameters:
tgt - The target to associate.
org - The WTOrganization to associate.
Throws:
WTException

createTarget

public ESITarget createTarget(String name,
                              String description,
                              String system)
                       throws WTException
Creates an ESITarget from the arguments and saves the result in the database. Delegates all work to an instance of ESITargetUtility.

Supported API: true

Specified by:
createTarget in interface ESIService
Parameters:
name - The value to supply to the ESITarget name attribute.
description - The value to supply to the ESITarget description attribute.
system - The value to supply to the ESITarget ssytem attribute.
Returns:
ESITarget
Throws:
WTException

createTarget

public ESITarget createTarget(String name,
                              String description,
                              String system,
                              WTContainerRef containerRef)
                       throws WTException
Creates and persists an ESITarget.

Supported API: true

Specified by:
createTarget in interface ESIService
Parameters:
name - The value to supply to the ESITarget name attribute.
description - The value to supply to the ESITarget description attribute.
system - The value to supply to the ESITarget system attribute.
containerRef - The current container ESI target resided.
Returns:
ESITarget
Throws:
WTException

createTransaction

public void createTransaction(WTObject object)
                       throws WTException
Creates and saves in the database a new ESITransaction that is linked to a WTObject. Delegates all work to an instance of ESITransactionUtility.

Supported API: false

Specified by:
createTransaction in interface ESIService
Parameters:
object - The primary business object associated with the ESI transaction.
Throws:
WTException

deleteTarget

public void deleteTarget(ESITarget tgt)
                  throws WTException
Deletes an ESITarget from the database. Delegates all work to an instance of ESITargetUtility.

Supported API: true

Specified by:
deleteTarget in interface ESIService
Parameters:
tgt - The object to be deleted.
Throws:
WTException

disconnectTargetFromOrganization

public void disconnectTargetFromOrganization(ESITarget tgt,
                                             WTOrganization org)
                                      throws WTException
Deletes the ESITargetOrganizationLink that connects an ESITarget object to a WTOrganization object. If either the ESITarget object or the WTOrganization are not persistent, the method throws a WTException.

Delegates all work to an instance of ESITargetUtility. The ESITargetUtility method is not implemented for ESI 7.0.

Supported API: false

Specified by:
disconnectTargetFromOrganization in interface ESIService
Parameters:
tgt - The ESITarget.
org - The WTOrganization.
Throws:
WTException

findESITargets

public Collection findESITargets(Persistable anObject)
                          throws ESIException,
                                 WTException
Returns a collection of ESITargets for the given object. If the object is a WTChangeOrder2, return the targets associated with the changeables on the change order.

Supported API: true

Specified by:
findESITargets in interface ESIService
Parameters:
anObject - The object whose ESITarget associations are to be found.
Returns:
Collection
Throws:
ESIException
WTException

getTarget

public ESITarget getTarget(String system)
                    throws WTException
Return the ESI Target whose system attribute matches the argument. Throw an ESIException if no matching ESITarget exists. Delegates all work to an instance of ESITargetUtility.

Supported API: true

Specified by:
getTarget in interface ESIService
Parameters:
system - The value of the ESITarget system attribute.
Returns:
ESITarget
Throws:
WTException

getTransaction

public ESITransaction getTransaction(String id)
                              throws WTException
Return the ESITransaction whose idNumber attribute matches the argument. Throw an ESIException if no matching transaction exists. Delegates all work to an instance of ESITransactionUtility.

Supported API: true

Specified by:
getTransaction in interface ESIService
Parameters:
id - The idNumber attribute value for and ESITransaction that is to be fetched.
Returns:
ESITransaction
Throws:
WTException

isWfLaunched

public boolean isWfLaunched(LifeCycleManaged anObject)
                     throws ESIException,
                            WTException
Check whether there is a workflow process with the status of OPEN_RUNNING for the given object.

Supported API: true

Specified by:
isWfLaunched in interface ESIService
Parameters:
anObject - The object whose workflow status is to be determined.
Returns:
boolean
Throws:
ESIException
WTException

isInRelease

public boolean isInRelease(Persistable obj)
                    throws ESIException,
                           WTException
Returns true if the given releasable object or any releasable iteration for the given master has been published to ERP . Otherwise returns false.

Supported API: true

Specified by:
isInRelease in interface ESIService
Parameters:
obj - The persistable object.
Returns:
boolean
Throws:
ESIException
WTException

release

public void release(Persistable obj)
             throws ESIException,
                    WTException
Release a business object to ERP.

Supported API: false

Specified by:
release in interface ESIService
Parameters:
obj - The releasable object. For r7.0 it should be WTPart , WTChangeOrder2.
Throws:
ESIException
WTException

release

public void release(Persistable obj,
                    String userName,
                    Locale locale)
             throws ESIException,
                    WTException
Release a business object to ERP.

Supported API: false

Specified by:
release in interface ESIService
Parameters:
obj - The releasable object. For r7.0 it should be WTPart , WTChangeOrder2.
userName - The user ID of the individual responsible for publishing the object.
locale - The locale to use for publishing the object.
Throws:
ESIException
WTException

removeTargetAssignment

public void removeTargetAssignment(Persistable object,
                                   ESITarget target)
                            throws WTException
Remove the relationship between an ESITarget and a persistable object. Delegates the deletion to an instance of ESITargetUtility.

Supported API: true

Specified by:
removeTargetAssignment in interface ESIService
Parameters:
object - The object whose target association is to be removed.
target - The ESITarget that is no longer to be associated with the persistable object in the object argument.
Throws:
WTException

removeTargetAssignment

public void removeTargetAssignment(String ufid)
                            throws WTException
Deletes from the database the ESITargetAssignmentLink that is identified by the argument. Delegates all work to an instance of ESITransactionUtility.

Supported API: true

Specified by:
removeTargetAssignment in interface ESIService
Parameters:
ufid - The UFID of an ESITargetAssignmentLink that is to be deleted.
Throws:
WTException

removeTargetAssignment

public void removeTargetAssignment(Group ufids)
                            throws WTException
Deletes from the database the ESITargetAssignmentLink objects that are identified by the argument. Delegates all work to an instance of ESITransactionUtility. Uses a database transaction so that all objects are deleted or none of them are.

Supported API: true

Specified by:
removeTargetAssignment in interface ESIService
Parameters:
ufids - An Info*Engine group of Element objects. Each element has an Att object that contains the UFID of an ESITargetAssignmentLink that is to be deleted.
Throws:
WTException

postResult

public void postResult(String objectID,
                       String description,
                       String txnID,
                       boolean successful,
                       boolean subtransaction,
                       String targetSystem,
                       String message,
                       String timestamp,
                       String action,
                       String cls,
                       String user)
                throws WTException
PostResult RPC processor. Delegates all work to an instance of ESITransactionUtility.

Supported API: true

Specified by:
postResult in interface ESISvrService
Parameters:
objectID - The identifier of the object being tracked.
description -
txnID - The ID of an existing transaction.
successful - Was the release a success?
subtransaction - Is this a transaction line item?
targetSystem - The name of the ESIOrganization where the object is being sent
message - An optional message
timestamp - The time when the activity was completed. Must be convertible to a java.sql.TimeStamp.
action - "added", "updated",or "deleted"
cls - The logical class of the object being tracked.
user - The user who creates the transaction.
Throws:
WTException

latestExport

public ESITargetAssociation latestExport(Persistable object,
                                         ESITarget target)
                                  throws WTException
Find the highest revision of an object that has been exported to an ESI target.

Supported API: true

Specified by:
latestExport in interface ESISvrService
Parameters:
object - The persistable whose release history is being interrogated.
target - The ESITarget of interest.
Returns:
ESITargetAssociation
Throws:
WTException

postEvent

public void postEvent(String objectID,
                      String transaction,
                      boolean successful,
                      String message)
               throws WTException
PostEvent RPC processor. Delegates all work to an instance of ESITransactionUtility.

Supported API: true

Specified by:
postEvent in interface ESISvrService
Parameters:
objectID - The id of the object whose event is being observed by Windchill event services.
transaction - the number of the transaction this event is related to.
successful - Was this transaction a success
message - a message that will be conveyed to the workflow which is waiting for this event.
Throws:
WTException

getPart

public IeCollection getPart(String objectID,
                            boolean alternates,
                            boolean documents,
                            String auth,
                            String wcAdapter,
                            String transactionID)
                     throws WTException
GetPart RPC processor. Defers all work to an instance of ESIPartUtility.

Supported API: true

Specified by:
getPart in interface ESISvrService
Parameters:
objectID - The UFID of the part that is desired.
alternates - true or false. If true, will return alternates parts for the part in question.
documents - true or false. If true, will return the documents for the part in question. If alternates is true, will return the documents for the alternate parts.
auth - This parameter contains authentication information from I*E.
wcAdapter - This parameter contains the name of the Windchill adapter.
transactionID - The TransactionID for this ObjectID.
Returns:
IeCollection
Throws:
WTException

getBOM

public IeCollection getBOM(String objectID,
                           boolean delta,
                           boolean parts,
                           boolean alternates,
                           boolean substitutes,
                           boolean referenceDesignators,
                           boolean lineNumbers,
                           String mulitLevel,
                           boolean documents,
                           String configSpec,
                           String auth,
                           String wcAdapter,
                           String transactionID)
                    throws WTException
getBOM RPC processor. Delegates all work to an instance of BOMUtility.

Supported API: true

Specified by:
getBOM in interface ESISvrService
Parameters:
objectID - UFID for a WTPart.
delta - If "true", returns only the changes since the last successful export. Default is "true".
parts - If "true", returns all related parts info regardless the type of part. Default is "false".
alternates - If "true", returns alternate part info, default is "false". Only operative if "Parts" = "true".
substitutes - If "true", returns substitute data
referenceDesignators - If "true", returns Reference Designator data.
lineNumbers - If "true", returns line numbers info, no line numbers info otherwise.
mulitLevel - The number of levels of BOM, default is 1.
documents - If "true", returns associated documents info, default is "false".Only operative if "Parts" = "true".
configSpec - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
auth - This parameter contains authentication information from I*E.
wcAdapter - This parameter contains the name of the Windchill adapter.
transactionID - The TransactionID of the ESITransaction that is related to this RPC request.
Returns:
IeCollection
Throws:
WTException

getECN

public IeCollection getECN(String objectID,
                           boolean delta,
                           boolean componentParts,
                           boolean alternates,
                           boolean substitutes,
                           boolean referenceDesignators,
                           boolean lineNumbers,
                           String mulitLevel,
                           boolean documents,
                           String configSpec,
                           String auth,
                           String wcAdapter,
                           String transactionID)
                    throws WTException
getECN RPC processor. Obtains a VdbBuilder from the VdbBuilder factory. Obtains a ChangeOrder2Renderer from the ChangeOrderRenderer factory. Provides the necessary data to the renderer from the arguments to this method. Invokes the render() method on the renderer. Returns the result of VdbBuilder asVDB().

Supported API: true

Specified by:
getECN in interface ESISvrService
Parameters:
objectID - The UFID of a WTChangeOrder2.
delta - If true, return only the objects that have changed since the last release of the changeables on the ECN.
componentParts - if true, invoke getPart for each BOM component.
alternates - If true, return the alternate parts for BOMs, parts and component parts.
substitutes - If "true", returns substitute data
referenceDesignators - If "true", returns Reference Designator data.
lineNumbers - If "true", returns line numbers info, no line numbers info otherwise.
mulitLevel - The number of levels of BOM, default is 1.
documents - If "true", returns associated documents info, default is "false".Only operative if "Parts" = "true".
configSpec - The Config Spec. value to use when navigating BOMs. See the Query-Tree Webject documentation for acceptable and default values.
auth - This parameter contains authentication information from I*E.
wcAdapter - This parameter contains the name of the Windchill adapter.
transactionID - The TransactionID for this ObjectID.
Returns:
IeCollection
Throws:
WTException

adjustTargetAssignments

public void adjustTargetAssignments(String ufids,
                                    Group targetInfo)
                             throws WTException
Given a concatenated set of UFIDs (for WTParts) and a Collection of ESITarget UFIDs, make (or remove) any required assignments.
Delegates all action to ESITransactionUtility.adjustTargetAssignments(String ufids, Group targetInfo)

Supported API: true

Specified by:
adjustTargetAssignments in interface ESISvrService
Parameters:
ufids - A concatenated list of UFIDs of the objects to operate on.
targetInfo - A collection of Info*Engine elements containing the UFIDs of the ESITargets to assign/remove and the operation to perform.
Throws:
WTException

getTargetAssociations

public Group getTargetAssociations(String ufids,
                                   String groupName)
                            throws WTException
Given a string of concatenated UFIDs, return the ESITarget objects that are associated with those objects. If the ESITarget is assigned to all of the objects identified by a UFID, indicate that it is a full assignment. Otherwise, indicate that the value is partial.
Delegates all work to ESITargetUtility.getTargetAssociations(String ufids, String groupName).

Supported API: true

Specified by:
getTargetAssociations in interface ESISvrService
Parameters:
ufids - A concatenated list of UFIDs.
groupName - The name of the Info*Engine group to return.
Returns:
Group
Throws:
WTException

getTargetsWithHistory

public Group getTargetsWithHistory(Collection objects)
                            throws WTException
Returns an Info*Engine Group of mapped ESITargetHistory objects. The ESITargetHistory objects contain the following:
The result is serialized by the ESI mapping routines to a group of Info*Engine Element objects.
All of the work is done by the ESITransactionUtility, which is called by this method.

Supported API: true

Specified by:
getTargetsWithHistory in interface ESISvrService
Parameters:
objects - The collection of objects of interest.
Returns:
Group
Throws:
WTException

getTargetsWithHistory

public Group getTargetsWithHistory(String ufid)
                            throws WTException
Returns an Info*Engine Group of mapped ESITargetHistory objects. The ESITargetHistory objects contain the following:
The result is serialized by the ESI mapping routines to a group of Info*Engine Element objects.
All of the work is done by the ESITransactionUtility, which is called by this method.

Supported API: true

Specified by:
getTargetsWithHistory in interface ESISvrService
Parameters:
ufid - The universal federation ID of the part to obtain.
Returns:
Group
Throws:
WTException

getTargetsWithHistory

public Collection getTargetsWithHistory(Persistable object)
                                 throws WTException
Returns a Collection of ESITargetHistory objects. The ESITargetHistory objects contain the following:
The result is serialized by the ESI mapping routines to a group of Info*Engine Element objects.
All of the work is done by the ESITransactionUtility, which is called by this method.

Supported API: true

Specified by:
getTargetsWithHistory in interface ESISvrService
Parameters:
object - The Persistable whose target assignments are to be queried.
Returns:
Collection
Throws:
WTException

getTargets

public WTKeyedMap getTargets(WTCollection objects)
                      throws WTException
Takes a WTCollection of persistables and returns a WTKeyedMap. The return map keyset is the input collection and the values are a WTCollection of ESITarget objects.
All of the work is done by the ESITransactionUtility, which is called by this method. Note that if no ESITarget objects are found for an input it will not be in the return map.

Supported API: true

Specified by:
getTargets in interface ESISvrService
Parameters:
objects - The Persistable whose target assignments are to be queried.
Returns:
WTKeyedMap
Throws:
WTException

getHistory

public Group getHistory(String ufid,
                        String groupOut)
                 throws WTException
Returns a Group of mapped ReleaseActivity objects associated with the object identied by the argument. This is the functional equivalent of getTargetsWithHistory() for objects that do not have ESITargetAssignmentLinks, but that do have ReleaseActivity associations. The method does the following:
  1. Obtains an instance of ESIObjectHistoryRenderer and an instance of ESIObjectHistoryBuilder from the ESIObjectHistoryRendererFactory
  2. Invokes the render() method on the renderer
  3. Returns the result of builder.getResult()


Supported API: true

Specified by:
getHistory in interface ESISvrService
Parameters:
ufid - The UFID of the object whose release activities are to be mapped.
groupOut - The name of the Info*Engine group to create when generating output.
Returns:
Group
Throws:
WTException

getActivities

public ReleaseActivity[] getActivities(String ufid)
                                throws WTException
Given the UFID of an ESITransaction, returns an array of all of the ReleaseActivities associated with that ESITransaction. Delegates implementation to ESITransactionUtility.

Supported API: true

Specified by:
getActivities in interface ESISvrService
Parameters:
ufid - The UFID of the Transaction of interest.
Returns:
ReleaseActivity[]
Throws:
WTException

hideTransaction

public void hideTransaction(String ufid)
                     throws WTException
Hide an ESITransaction from the user interface.

Supported API: true

Specified by:
hideTransaction in interface ESISvrService
Parameters:
ufid - The UFID of the transaction to hide.
Throws:
WTException

recordExport

public void recordExport(String objectID,
                         String targetSystem,
                         String releaseClass)
                  throws WTException
RecordExport RPC processor. This method identifies an object as published to an ESITarget.

Supported API: true

Specified by:
recordExport in interface ESISvrService
Parameters:
objectID - The UFID of the object to record the export for.
targetSystem - The system attribute value for the ESITarget where the object was sent.
releaseClass - The type of release activity.
Throws:
WTException

getReleaseActivities

public Group getReleaseActivities(String ufid)
                           throws WTException
Returns an Info*Engine Group of mapped ESI ReleaseActivity objects given the ufid of an ESITransaction object.

Supported API: true

Specified by:
getReleaseActivities in interface ESISvrService
Parameters:
ufid - The universal federation ID of the ESITransaction object.
Returns:
Group
Throws:
WTException

getTransactions

public Group getTransactions(Group elements)
                      throws WTException
Returns an Info*Engine Group of ESITransaction objects that are associated with the objects in the argument. The argument is an Info*Engine Group containing Elements that have been created by (or resemble the output of) a Query-Objects webject. Defers all work to an instance of ESITransactionUtility.

Supported API: true

Specified by:
getTransactions in interface ESISvrService
Parameters:
elements - An Info*Engine Group containing Elements that have been create by (or resemble the output of) a Query-Objects webject.
Returns:
Group
Throws:
WTException

getReleaseActivitiesMessage

public Group getReleaseActivitiesMessage(String ufid)
                                  throws WTException
Return an Info*Engine Group of mapped ReleaseActivityMessage object given the ufid of a ReleaseActivity object.

Supported API: true

Specified by:
getReleaseActivitiesMessage in interface ESISvrService
Parameters:
ufid - The universal federation ID of the ReleaseActivity object.
Returns:
Group
Throws:
WTException

getTransactionLogMessage

public Group getTransactionLogMessage(String ufid)
                               throws WTException
Returns an Info*Engine Group of mapped ESITransactionMessage object given the ufid of an ESITransaction object.

Supported API: true

Specified by:
getTransactionLogMessage in interface ESISvrService
Parameters:
ufid - The universal federation ID of the ESITransaction object.
Returns:
Group
Throws:
WTException

copyTargetAssignments

private void copyTargetAssignments(WTPart part,
                                   WTPart oldPart)
                            throws WTException
Throws:
WTException

validateDeletion

private void validateDeletion(ESITarget tgt)
                       throws WTException
Throws:
WTException

validateDeletion

private void validateDeletion(ESITransaction txn)
                       throws WTException
Throws:
WTException

validateDeletion

private void validateDeletion(WTPart part)
                       throws WTException
Throws:
WTException

launchWfProcess

private void launchWfProcess(LifeCycleManaged anObject)

findAnObj

private Persistable findAnObj(Class aClass,
                              String attrName,
                              String attrValue,
                              WTContainerRef containerRef,
                              boolean latest)
Find an object. If latest is true, the object is treated as Iterated, so attrName, containerRef, latest should be a UNIQUE constranit. Otherwise the object is treated as non-Iterated, so attrName, containerRef should be a UNIQUE constraint. Note:If containerRef is null, query is not container aware.

Parameters:
aClass - Mapped to the database table being queried
attrName - The attribute name as an identity of the object
attrValue - The value for that identity
containerRef -
latest -

findAnObj

private Persistable findAnObj(Class aClass,
                              String attrName,
                              String attrValue,
                              WTContainerRef containerRef)

isLaunchable

private boolean isLaunchable(LifeCycleManaged anObject,
                             LifeCycleState state)
                      throws ESIException
Always call this method before calling launchWfProcess

Parameters:
anObject - The object is going to be released via ESI.
state - The lifecycle state for the released object.
Returns:
Throws:
ESIException

buildESIWfName

private String buildESIWfName(LifeCycleManaged anObject)

copyAlternateItemGroup

protected void copyAlternateItemGroup(WTPartSubstituteLink oldSubLink,
                                      WTPartSubstituteLink newSubLink)

populateESITeam

private TeamReference populateESITeam(TeamReference objtId,
                                      TeamReference esitId)

overrideRole

private void overrideRole(Role role,
                          Team fromTeam,
                          Team toTeam)
                   throws WTException
Copy role-principal-maps from a team to another for a given role

Parameters:
role -
fromTeam -
toTeam -
Throws:
WTException

deleteAllRolePrincipalMaps

private Team deleteAllRolePrincipalMaps(Role role,
                                        Team toTeam)
                                 throws WTException
Delete all role-principal-maps from a team for a given role

Parameters:
role -
toTeam -
Throws:
WTException

addRolePrincipalMaps

private void addRolePrincipalMaps(Role role,
                                  Team fromTeam,
                                  Team toTeam)
                           throws WTException
For a given role , add all role-principal-maps from one team to another

Parameters:
role -
fromTeam -
toTeam -
Throws:
WTException

getUserName

private String getUserName()
                    throws WTException
Throws:
WTException

getLocale

private Locale getLocale()
                  throws WTException
Throws:
WTException

validateESITargetAssignments

private boolean validateESITargetAssignments(WTChangeOrder2 chgOrder)
                                      throws WTException
Throws:
WTException

hasRolePrincipalMaps

private boolean hasRolePrincipalMaps(Role role,
                                     Team team)
                              throws WTException
Throws:
WTException

printTeam

private void printTeam(TeamReference teamRef)

initLocaleMaps

private static void initLocaleMaps()

buildLcList

private static ArrayList buildLcList(String s,
                                     String delimiter)

inSourceLocaleSet

private boolean inSourceLocaleSet(Locale locale)

synchESITransaction

private void synchESITransaction()
                          throws ManagerException
Throws:
ManagerException