|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ptc.windchill.esi.txn.ESITransactionUtility
public final class ESITransactionUtility
Provides common services which are not intended to be available to remote
consumers. This class is not thread-safe. A separate instance must
be created if multiple threads are to use the services of the class.
Supported API: true
Extendable: false
| Method Summary | |
|---|---|
void |
abortTransaction(Persistable obj)
Remove a transaction. |
void |
addTransactionMessage(ESITransaction txn,
String text,
boolean txnRequired)
Adds a message to an ESITransaction. |
void |
adjustTargetAssignments(String ufids,
com.infoengine.object.factory.Group targetInfo)
Given a concatenated set of UFIDs (for WTParts) and a Collection of ESITarget UFIDs, make (or remove) any required assignments. |
void |
createReleaseActivity(Persistable persistable,
String description,
ESITransaction transaction,
boolean successful,
ESITarget target,
String message,
String timestamp,
String action,
String cls,
String user)
Create and save a new ReleaseActivity from the arguments Supported API: true |
ESITransaction |
createTransaction(Persistable object)
Creates a new ESITransaction that is associated to the argument. |
ESITransaction |
createTransaction(Persistable object,
String userName)
Creates a new ESITransaction that is associated to the argument. |
void |
deleteTargetAssociation(ESITargetAssignmentLink link)
Removes the argument from the database. |
void |
deleteTargetAssociation(com.infoengine.object.factory.Group links)
Deletes from the database the ESITargetAssignmentLink objects that are identified by the argument. |
QueryResult |
findTransactions(Persistable obj)
Returns all ESITransactions for the given object. |
QueryResult |
findTransactions(Persistable obj,
String status)
Returns ESITransactions for the given object and status. |
Collection |
getActivities(ESITransaction txn,
String targetID)
Returns the ReleaseActivities associated with the ESITransaction and the Distribution Target in the argument. |
Collection |
getActivities(Persistable object)
This method will return a Collection of ReleaseActivities that are associated with the persisable object. |
Collection |
getActivities(String ufid)
Returns the ReleaseActivities associated with the ESITransaction identified by the UFID in the argument. |
Collection |
getAllActivities(Persistable object)
This method will return a Collection of ReleaseActivities that are associated with the persisable object. |
Collection |
getBOMActivities(Collection parts)
Given a collection of parts returns a collection of ReleaseActivity objects where the release activity represents a BOM, for any iterations of the part's part master. |
Eff[] |
getLatestExportedEffs(EffManagedVersion part,
ESITarget target)
Fetches the date, serial number and lot number effectivities associated with the given part that were last exported to the given target, stores them in an array of Eff instances and returns the array to the caller. |
Collection |
getLatestUnreleasedDocuments(Collection docs,
Collection targets)
Given a collection of WTDocuments and targets this method returns a collection of ESITargetAssocations for documents that have not been exported to that target. |
com.infoengine.object.factory.Group |
getReleaseActivities(String ufid)
Returns an Info*Engine Group of mapped ReleaseActivity objects given the ufid of the ESITransaction object. |
com.infoengine.object.factory.Group |
getReleaseActivitiesMessage(String ufid)
Returns an Info*Engine Group of mapped ReleaseActivityMessage object given the ufid of the ReleaseActivity object. |
com.infoengine.object.factory.Group |
getTargetsWithHistory(Collection objects)
Returns an Info*Engine Group of mapped ESITargetHistory objects. |
Collection |
getTargetsWithHistory(Persistable object)
Returns a Collection of ESITargetHistory objects. |
ESITransaction |
getTransaction(String number)
Return the ESITransaction object whose number matches the method argument. |
Collection |
getTransactionActivities(String id)
Return a collection ReleaseActivities associated with the ESITransaction identified by the argument. |
com.infoengine.object.factory.Group |
getTransactionLogMessage(String ufid)
Returns an Info*Engine Group of mapped ESITransactionMessage object given the ufid of the ESITransaction object. |
com.infoengine.object.factory.Group |
getTransactions(com.infoengine.object.factory.Group ufids)
Returns an Info*Engine Group of ESITransaction objects that are associated with the objects in the argument. |
boolean |
hasReleased(Persistable obj,
ESITarget target)
Check if the object has been released successfully for the given target. |
boolean |
hasTxFailed(Persistable obj)
Returns true if find a related transaction failed for a given object, otherwise return false. |
boolean |
hasTxSucceed(Persistable obj)
Returns true if find a transaction is SUCCEED for the given object, otherwise returns false. |
void |
hideTransaction(String ufid)
Hide an ESITransaction from the user interface. |
boolean |
isInRelease(Persistable obj)
This is to check if the releasable object is in ESI release . |
boolean |
isPartNewerThan(WTPart current,
WTPart other)
This method checks two different part versions and returns true if the current iteration is newer than the other version. |
boolean |
isPartReleaseNeeded(Collection assns)
Given a collection of ESITargetAssociations, returns true if any of the persistable objects have not been published to the ESI target identified in the target association. |
boolean |
isTxnPending(Persistable object)
Determines whether a transaction containing the argument is already active. |
boolean |
isTxPending(Persistable obj)
Returns true if ESI transaction for the given object is in pending status, otherwise return false. |
boolean |
isTxProcessing(Persistable obj)
Returns true if the ESI transaction is in processing for the given object, otherwise return false. |
Collection |
latestPartExport(Collection parts)
Returns a collection of ESITargetAssociations Supported API: true |
static void |
performStartupProcess()
Performs the necessary startup logic for the Transaction Utility. |
void |
postEvent(String objectID,
String transaction,
boolean isSuccessful,
String message)
Process postEvent RPC requests Supported API: true |
void |
postResult(String objectID,
String description,
String txnID,
boolean isSuccessful,
boolean isSubtran,
String targetSystem,
String message,
String timestamp,
String action,
String cls,
String user)
Process postResult RPC requests Supported API: true |
void |
recordExport(Persistable obj,
ESITarget org,
String releaseClass)
Mark a persistable as exported to an organization Supported API: true |
void |
removePending(ESITransaction txn)
Deletes all ReleaseActivities that have a status of PENDING and are associated with the argument. The method does not create a database transaction. |
void |
removeTransactionMessage(ESITransaction txn)
Removes any ESITransactionMessage that is associated with an ESITransaction. |
void |
updateTransaction(ESITransaction txn)
Save a transaction in the database Supported API: true |
void |
validateDelete(WTPart part)
Deprecated at X05/R8.0, replaced by by calling isInRelease
and referential integrity exception delegate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public final void abortTransaction(Persistable obj)
Note : This method can ONLY be called on
ESI workflow if any system errors (e.g. JMS server not available )
occured during release, means that unable to send messages to com.ptc.windchill.esi.Event
queue.
Supported API: true
obj -
public final void addTransactionMessage(ESITransaction txn,
String text,
boolean txnRequired)
throws WTException
txn - The transaction to which an message is to be added.text - The text of the message to add.txnRequired - Should this request be wrapped in a database transaction. Should be false if caller has started a transaction.
WTException
public final void adjustTargetAssignments(String ufids,
com.infoengine.object.factory.Group targetInfo)
throws WTException
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 final void createReleaseActivity(Persistable persistable,
String description,
ESITransaction transaction,
boolean successful,
ESITarget target,
String message,
String timestamp,
String action,
String cls,
String user)
throws WTException
persistable - The object being flagged as releaseddescription - A textual description of the release typetransaction - The transaction associated with this activity.successful - Was the transaction successful?target - The destination where this object was releasedmessage - An optional message to associate with the ReleaseActivitytimestamp - The time when the ReleaseActivity occurred. Must resolve to a java.sql.TimeStamp. If it doesn't the current time will be used.action - must be "create", "change", or "delete" (case insensitive)cls - The ESI logical class of the object being flaggeduser - The user who requested the activity
WTException
public final ESITransaction createTransaction(Persistable object)
throws WTException
object - The object that is to be associated with the ESITransaction.
WTException
public final ESITransaction createTransaction(Persistable object,
String userName)
throws WTException
object - The object that is to be associated with the ESITransaction.userName - The name of the user responsible for initiating the transaction.
WTException
public final void deleteTargetAssociation(ESITargetAssignmentLink link)
throws WTException
link - The ESITargetAssignmentLink that is to be deleted.
WTException
public final void deleteTargetAssociation(com.infoengine.object.factory.Group links)
throws WTException
links - 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 final QueryResult findTransactions(Persistable obj)
throws com.ptc.windchill.esi.utl.ESIException
obj -
com.ptc.windchill.esi.utl.ESIException
public final QueryResult findTransactions(Persistable obj,
String status)
throws com.ptc.windchill.esi.utl.ESIException
obj - status -
com.ptc.windchill.esi.utl.ESIException
public final Collection getActivities(String ufid)
throws WTException
ufid - The UFID of an ESITransaction.
WTException
public final Collection getActivities(Persistable object)
throws WTException
object - Persistable object whose history is to be retrieved.
WTException
public final Collection getAllActivities(Persistable object)
throws WTException
object - Persistable object whose history is to be retrieved.
WTException
public final Collection getBOMActivities(Collection parts)
throws WTException
parts - A collection of WTPart instances to examine.
WTException
public final Collection getLatestUnreleasedDocuments(Collection docs,
Collection targets)
throws WTException
docs - This is a collection of WTDocuments. The persistables must all be objects of the same class.targets - Collection of ESITargets associated with the documents.
WTException
public final com.infoengine.object.factory.Group getReleaseActivities(String ufid)
throws WTException
ufid - The ufid of the ESITransaction object.
WTException
public final com.infoengine.object.factory.Group getReleaseActivitiesMessage(String ufid)
throws WTException
ufid - ufid of the ReleaseActivity object.
WTException
public final com.infoengine.object.factory.Group getTargetsWithHistory(Collection objects)
throws WTException
objects - A collection of persistable objects. The objects must all be instances of the same class.
WTException
public final Collection getTargetsWithHistory(Persistable object)
throws WTException
object - The Persistable whose target assignments are to be queried.
WTException
public final ESITransaction getTransaction(String number)
throws WTException
number - The transaction number of the desired ESITransaction object.
WTException
public final com.infoengine.object.factory.Group getTransactions(com.infoengine.object.factory.Group ufids)
throws WTException
ufids - An Info*Engine Group containing Elements that have been create by (or resemble the output of) a Query-Objects webject.
WTException
public final Collection getTransactionActivities(String id)
throws WTException
id - the id of the transaction of interest.
WTException
public final com.infoengine.object.factory.Group getTransactionLogMessage(String ufid)
throws WTException
ufid - ufid of the ESITransaction object.
WTException
public final boolean hasReleased(Persistable obj,
ESITarget target)
throws com.ptc.windchill.esi.utl.ESIException
obj - target -
com.ptc.windchill.esi.utl.ESIException
public final boolean hasTxFailed(Persistable obj)
throws com.ptc.windchill.esi.utl.ESIException
obj -
com.ptc.windchill.esi.utl.ESIException
public final boolean hasTxSucceed(Persistable obj)
throws com.ptc.windchill.esi.utl.ESIException
obj -
com.ptc.windchill.esi.utl.ESIException
public final void hideTransaction(String ufid)
throws WTException
ufid -
WTException
public boolean isInRelease(Persistable obj)
throws com.ptc.windchill.esi.utl.ESIException
obj - The persistable object.
com.ptc.windchill.esi.utl.ESIException
public final boolean isPartNewerThan(WTPart current,
WTPart other)
current - current part iteration to testother - previous part iteration.
public final boolean isPartReleaseNeeded(Collection assns)
throws WTException
assns - A Collection of ESITargetAssociations.
WTException
public final boolean isTxPending(Persistable obj)
throws com.ptc.windchill.esi.utl.ESIException
obj -
com.ptc.windchill.esi.utl.ESIException
public final boolean isTxnPending(Persistable object)
throws WTException
object - The object of interest
WTException
public final boolean isTxProcessing(Persistable obj)
throws com.ptc.windchill.esi.utl.ESIException
obj -
com.ptc.windchill.esi.utl.ESIException
public final Collection latestPartExport(Collection parts)
throws WTException
parts - A collection of ESITargetAssociations with WTParts as the pesistable object.
WTException
public static void performStartupProcess()
throws WTException
WTException
public final void postEvent(String objectID,
String transaction,
boolean isSuccessful,
String message)
throws WTException
objectID - The object which is associated with the Windchill event that this RPC will create. It is expected to be the value supplied in the transaction - The transaction number that is associated with this eventisSuccessful - Did the request succeed?message - An optional message to pass to the Windchill workflow that is suspended and waiting for this event.
WTException
public final void postResult(String objectID,
String description,
String txnID,
boolean isSuccessful,
boolean isSubtran,
String targetSystem,
String message,
String timestamp,
String action,
String cls,
String user)
throws WTException
objectID - The UFID of the object being trackeddescription - A user-friendly description of the objecttxnID - The transaction number related to this requestisSuccessful - Did the request succeed?isSubtran - If false, this is the end of the transaction messages. If true, it is a transaction line item.targetSystem - The ESITarget system id associated with this request.message - An optional textual description. Generally used for error messages, but not restricted to errors.timestamp - Optional parameter. If supplied must be a string that can be converted to a java.sql.timestamp.action - The action that was requested. Must be one of the values defined by ReleaseActivityAction.cls - The ESI logical class of the object being tracked. This value came from the ESI RPC response that generated the ESI transaction.user - The user who requested the transaction.
WTException
public final void recordExport(Persistable obj,
ESITarget org,
String releaseClass)
throws WTException
obj - the object being flaggedorg - The ESIOrganization which received the objectreleaseClass - the type of release activity.
WTException
public final void removePending(ESITransaction txn)
throws WTException
txn - The ESITranaction that has completed.
WTException
public final void removeTransactionMessage(ESITransaction txn)
throws WTException
txn - The transaction from which all messages are to be removed.
WTException
public final void updateTransaction(ESITransaction txn)
throws WTException
txn - The transaction to be saved
WTException
public final void validateDelete(WTPart part)
throws WTException
isInRelease
and referential integrity exception delegate.
Throws an exception if the argument is not eligible to be deleted.
Supported API: true
part - The part to evaluate.
WTException
public final Collection getActivities(ESITransaction txn,
String targetID)
throws WTException
txn - An ESITransaction object.targetID - The System of an ESITrarget
WTException
public Eff[] getLatestExportedEffs(EffManagedVersion part,
ESITarget target)
throws WTException
part - WTPart instance for which to fetch the last exported date, serial number and lot number effectivitiestarget - ESITarget instance for which to fetch the last exported date, serial number and lot number effectivities
wt.util.WTException, - if thrown from latestEffExport()
WTException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||