com.ptc.windchill.esi.svc
Class ESIServiceFwd

java.lang.Object
  extended bycom.ptc.windchill.esi.svc.ESIServiceFwd
All Implemented Interfaces:
ESIService, RemoteAccess, Serializable

public class ESIServiceFwd
extends Object
implements RemoteAccess, ESIService, Serializable

Defines the ESI methods that are available to remote clients.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
ESIServiceFwd()
           
 
Method Summary
 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.
 void connectTargetToOrganization(ESITarget tgt, WTOrganization org)
          Connects an ESITarget to a WTOrganization.

Delegates all work to an instance of ESITargetUtility.
 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.
 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.
 Collection findESITargets(Persistable anObject)
          Returns a collection of ESITargets for the given object.
private static Manager getManager()
           
 ESITarget getTarget(String system)
          Return the ESI Target whose system attribute matches the argument.
 ESITransaction getTransaction(String id)
          Return the ESITransaction whose idNumber attribute matches the argument.
 boolean isInRelease(Persistable obj)
          Returns true if the given releasable object or any releasable iteration for the given master has been published to ERP .
 boolean isWfLaunched(LifeCycleManaged anObject)
          Check whether there is a workflow process with the status of OPEN_RUNNING for the given object.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

ESIServiceFwd

public ESIServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
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: false

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: false

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: false

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: false

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: false

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: false

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: false

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: false

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: false

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: false

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: false

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: false

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: false

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