|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
com.ptc.windchill.esi.svc.StandardESIService
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final String NULL_STRING
public static final String SEPERATOR
private static final String USED_RESOURCE
private static boolean wf_auto_launch
private static String wf_template
private static String wf_process_prefix
private static String wf_description
private static boolean ecnCentric
private static String partCentric_state
private static String ecnCentric_state
private static String team_template
private static boolean teamOverridden
private static boolean enforceOrgs
private static String sourceLocales
private static String targetLocales
private static HashMap esiLocaleMap
private static ArrayList sl
private static ArrayList tl
private static Locale esiTargetLocale
private static final String CHANGE_TYPEID
private static final String BOM_TYPEID
private static final String PART_TYPEID
Constructor Detail |
public StandardESIService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
public void registerEvents(ManagerService ms)
registerEvents
in interface Manager
registerEvents
in class StandardManager
ms
- public void dispatchVetoableEvent(String eventType, Persistable obj) throws ESIException
eventType
- The name of the ESIServiceEvent type.obj
- The target of the event.
ESIException
public static StandardESIService newStandardESIService() throws WTException
WTException
public void assignTarget(Persistable object, Group targets) throws ESITargetAssignmentException, WTException
assignTarget
in interface ESIService
object
- The object to which the target is being assignedtargets
- The Infoengine group of ESITarget objects to be assigned to the object argument.
ESITargetAssignmentException
WTException
public void assignTarget(Persistable object, ESITarget target) throws ESITargetAssignmentException, WTException
assignTarget
in interface ESIService
object
- The object to which the target is being assignedtarget
- The ESITarget to be assigned to the object argument.
ESITargetAssignmentException
WTException
public void connectTargetToOrganization(ESITarget tgt, WTOrganization org) throws WTException
connectTargetToOrganization
in interface ESIService
tgt
- The target to associate.org
- The WTOrganization to associate.
WTException
public ESITarget createTarget(String name, String description, String system) throws WTException
createTarget
in interface ESIService
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.
WTException
public ESITarget createTarget(String name, String description, String system, WTContainerRef containerRef) throws WTException
createTarget
in interface ESIService
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.
WTException
public void createTransaction(WTObject object) throws WTException
createTransaction
in interface ESIService
object
- The primary business object associated with the ESI transaction.
WTException
public void deleteTarget(ESITarget tgt) throws WTException
deleteTarget
in interface ESIService
tgt
- The object to be deleted.
WTException
public void disconnectTargetFromOrganization(ESITarget tgt, WTOrganization org) throws WTException
disconnectTargetFromOrganization
in interface ESIService
tgt
- The ESITarget.org
- The WTOrganization.
WTException
public Collection findESITargets(Persistable anObject) throws ESIException, WTException
findESITargets
in interface ESIService
anObject
- The object whose ESITarget associations are to be found.
ESIException
WTException
public ESITarget getTarget(String system) throws WTException
getTarget
in interface ESIService
system
- The value of the ESITarget system attribute.
WTException
public ESITransaction getTransaction(String id) throws WTException
getTransaction
in interface ESIService
id
- The idNumber attribute value for and ESITransaction that is to be fetched.
WTException
public boolean isWfLaunched(LifeCycleManaged anObject) throws ESIException, WTException
isWfLaunched
in interface ESIService
anObject
- The object whose workflow status is to be determined.
ESIException
WTException
public boolean isInRelease(Persistable obj) throws ESIException, WTException
isInRelease
in interface ESIService
obj
- The persistable object.
ESIException
WTException
public void release(Persistable obj) throws ESIException, WTException
release
in interface ESIService
obj
- The releasable object. For r7.0 it should be WTPart , WTChangeOrder2.
ESIException
WTException
public void release(Persistable obj, String userName, Locale locale) throws ESIException, WTException
release
in interface ESIService
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.
ESIException
WTException
public void removeTargetAssignment(Persistable object, ESITarget target) throws WTException
removeTargetAssignment
in interface ESIService
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.
WTException
public void removeTargetAssignment(String ufid) throws WTException
removeTargetAssignment
in interface ESIService
ufid
- The UFID of an ESITargetAssignmentLink that is to be deleted.
WTException
public void removeTargetAssignment(Group ufids) throws WTException
removeTargetAssignment
in interface ESIService
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.
WTException
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
in interface ESISvrService
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 sentmessage
- An optional messagetimestamp
- 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.
WTException
public ESITargetAssociation latestExport(Persistable object, ESITarget target) throws WTException
latestExport
in interface ESISvrService
object
- The persistable whose release history is being interrogated.target
- The ESITarget of interest.
WTException
public void postEvent(String objectID, String transaction, boolean successful, String message) throws WTException
postEvent
in interface ESISvrService
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 successmessage
- a message that will be conveyed to the workflow which is waiting for this event.
WTException
public IeCollection getPart(String objectID, boolean alternates, boolean documents, String auth, String wcAdapter, String transactionID) throws WTException
getPart
in interface ESISvrService
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.
WTException
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
in interface ESISvrService
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 datareferenceDesignators
- 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.
WTException
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
in interface ESISvrService
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 datareferenceDesignators
- 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.
WTException
public void adjustTargetAssignments(String ufids, Group targetInfo) throws WTException
adjustTargetAssignments
in interface ESISvrService
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.
WTException
public Group getTargetAssociations(String ufids, String groupName) throws WTException
getTargetAssociations
in interface ESISvrService
ufids
- A concatenated list of UFIDs.groupName
- The name of the Info*Engine group to return.
WTException
public Group getTargetsWithHistory(Collection objects) throws WTException
getTargetsWithHistory
in interface ESISvrService
objects
- The collection of objects of interest.
WTException
public Group getTargetsWithHistory(String ufid) throws WTException
getTargetsWithHistory
in interface ESISvrService
ufid
- The universal federation ID of the part to obtain.
WTException
public Collection getTargetsWithHistory(Persistable object) throws WTException
getTargetsWithHistory
in interface ESISvrService
object
- The Persistable whose target assignments are to be queried.
WTException
public WTKeyedMap getTargets(WTCollection objects) throws WTException
getTargets
in interface ESISvrService
objects
- The Persistable whose target assignments are to be queried.
WTException
public Group getHistory(String ufid, String groupOut) throws WTException
getHistory
in interface ESISvrService
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.
WTException
public ReleaseActivity[] getActivities(String ufid) throws WTException
getActivities
in interface ESISvrService
ufid
- The UFID of the Transaction of interest.
WTException
public void hideTransaction(String ufid) throws WTException
hideTransaction
in interface ESISvrService
ufid
- The UFID of the transaction to hide.
WTException
public void recordExport(String objectID, String targetSystem, String releaseClass) throws WTException
recordExport
in interface ESISvrService
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.
WTException
public Group getReleaseActivities(String ufid) throws WTException
getReleaseActivities
in interface ESISvrService
ufid
- The universal federation ID of the ESITransaction object.
WTException
public Group getTransactions(Group elements) throws WTException
getTransactions
in interface ESISvrService
elements
- An Info*Engine Group containing Elements that have been create by (or resemble the output of) a Query-Objects webject.
WTException
public Group getReleaseActivitiesMessage(String ufid) throws WTException
getReleaseActivitiesMessage
in interface ESISvrService
ufid
- The universal federation ID of the ReleaseActivity object.
WTException
public Group getTransactionLogMessage(String ufid) throws WTException
getTransactionLogMessage
in interface ESISvrService
ufid
- The universal federation ID of the ESITransaction object.
WTException
private void copyTargetAssignments(WTPart part, WTPart oldPart) throws WTException
WTException
private void validateDeletion(ESITarget tgt) throws WTException
WTException
private void validateDeletion(ESITransaction txn) throws WTException
WTException
private void validateDeletion(WTPart part) throws WTException
WTException
private void launchWfProcess(LifeCycleManaged anObject)
private Persistable findAnObj(Class aClass, String attrName, String attrValue, WTContainerRef containerRef, boolean latest)
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.
aClass
- Mapped to the database table being queriedattrName
- The attribute name as an identity of the objectattrValue
- The value for that identitycontainerRef
- latest
- private Persistable findAnObj(Class aClass, String attrName, String attrValue, WTContainerRef containerRef)
private boolean isLaunchable(LifeCycleManaged anObject, LifeCycleState state) throws ESIException
launchWfProcess
anObject
- The object is going to be released via ESI.state
- The lifecycle state for the released object.
ESIException
private String buildESIWfName(LifeCycleManaged anObject)
protected void copyAlternateItemGroup(WTPartSubstituteLink oldSubLink, WTPartSubstituteLink newSubLink)
private TeamReference populateESITeam(TeamReference objtId, TeamReference esitId)
private void overrideRole(Role role, Team fromTeam, Team toTeam) throws WTException
role
- fromTeam
- toTeam
-
WTException
private Team deleteAllRolePrincipalMaps(Role role, Team toTeam) throws WTException
role
- toTeam
-
WTException
private void addRolePrincipalMaps(Role role, Team fromTeam, Team toTeam) throws WTException
role
- fromTeam
- toTeam
-
WTException
private String getUserName() throws WTException
WTException
private Locale getLocale() throws WTException
WTException
private boolean validateESITargetAssignments(WTChangeOrder2 chgOrder) throws WTException
WTException
private boolean hasRolePrincipalMaps(Role role, Team team) throws WTException
WTException
private void printTeam(TeamReference teamRef)
private static void initLocaleMaps()
private static ArrayList buildLcList(String s, String delimiter)
private boolean inSourceLocaleSet(Locale locale)
private void synchESITransaction() throws ManagerException
ManagerException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |