|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.esi.tgt.ESITargetUtility
Supported API: true
Extendable: false
Nested Class Summary | |
private class |
ESITargetUtility.TargetCounter
A private class which determines the number of persistables associated with an ESITarget. |
Field Summary | |
private static String |
CLASSNAME
|
private static String |
ESITARGET_MAPFILE
|
private static String |
NULL_STRING
|
private static String |
RESOURCE
|
private TaskHelper |
taskHelper
|
private static String |
UFID_DELIMITER
|
private static String |
USED_RESOURCE
|
private static int |
VECTOR_SIZE_MULTIPLIER
|
Constructor Summary | |
ESITargetUtility()
|
Method Summary | |
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 |
assignTargets(Collection targetAssociations)
Given a collection of ESITargetAssociation objects, create an ESITargetAssignmentLink object for each entry in the collection that is not already persisted in the database. |
void |
assignTargets(Persistable object,
Group targets)
Given a Persistable object and an Infoengine group of ESITarget objects, create an ESITargetAssignmentLink for each unassigned ESITarget object in the group. |
void |
connectTargetToOrganization(ESITarget tgt,
WTOrganization org)
Creates an ESITargetAsssociationLink between an WTOrganization and an ESITarget. |
ESITarget |
createTarget(String name,
String description,
String system,
WTContainerRef containerRef)
Creates and persists an ESITarget based upon the following container hierarchy via looking up. |
void |
deleteESITarget(ESITarget tgt)
Deletes an ESITarget from the database. |
private Collection |
deleteExistingAssignments(Collection coll)
|
void |
deleteTargetAssociation(ESITargetAssignmentLink link)
Deletes the argument from the database. |
void |
disconnectTargetFromOrganization(ESITarget tgt,
WTOrganization org)
Deletes all ESITargetOrganizationLink objects between the target and the WTOrganization. |
Collection |
getOrganizationLinksForOrganizations(Collection organizations)
Given a collection of WTOrganizations, return a collection of ESITargetOrganizationLinks that have one of the WTOrganizations as a roleB object. |
Collection |
getOrganizationLinksForTargets(Collection targets)
Given a collection of ESITargets, return a collection of ESITargetOrganizationLink objects that have one of the ESITarget objects as a roleA object. |
private Collection |
getParts(String ufidString)
|
private Collection |
getPersistedAssocToRemove(Collection completeAssoc,
Collection assoc)
|
ESITarget |
getTarget(String id)
Returns the ESITarget for the given system resided in Site level (ie. |
ESITarget |
getTarget(String id,
WTContainerRef containerRef)
Returns a target for the given system and container or if parent containers contains the given system. |
Collection |
getTargetAssnsFromAssns(Collection associations)
Given a collection of ESITargetAssociations, returns a Collection of ESITargetAssociations that have been persisted. |
Collection |
getTargetAssnsFromAssns(Collection associations,
Persistable base)
Given a collection of ESITargetAssociations, returns a Collection of ESITargetAssociations that have been persisted. |
Collection |
getTargetAssnsFromObjects(Collection objects)
Returns a Collection of ESITargetAssociations that are associated with the objects in the argument collection. |
Collection |
getTargetAssnsFromObjects(Collection objects,
Persistable base)
Returns a Collection of ESITargetAssociations that are associated with the objects in the argument collection. |
Collection |
getTargetAssociations(Persistable object)
Returns a Collection of ESITargetAssociations that are associated with the argument. |
Collection |
getTargetAssociations(Persistable object,
Persistable base)
Returns a Collection of ESITargetAssociations that are associated with the argument. |
Group |
getTargetAssociations(String ufids,
String groupName)
Given a string of concatenated UFIDs, return the ESITarget objects that are associated with those objects. |
ESITarget |
newESITarget(String name,
String description,
String system)
Creates and saves ESITarget in Site level by default (ie. |
ESITarget |
newESITarget(String name,
String description,
String system,
WTContainerRef containerRef)
Creates and saves ESITarget in the given container. |
ESITargetAssignmentLink |
newESITargetAssignmentLink(Persistable persistable,
ESITarget target)
Returns an instance of ESITargetAssignmentLink. |
ESITargetOrganizationLink |
newESITargetOrganizationLink(WTOrganization org,
ESITarget target)
Returns an instance of ESITargetOrganizationLink. |
void |
removeTargetAssociations(Collection associations)
Deletes the ESITargetAssignments that are related to the objects in the argument. |
private void |
setAssignmentState(Group grp,
Collection pts,
Collection assns)
Given a collection of ESITargetAssociations, determines whether the every target in the collection is associated with each persistable in the collection.Uses the ESI mapper to create I*E elements from the ESITargets in the input collection. |
private void |
validateArgument(String arg,
String name)
Makes sure that a String is not null, not an empty string, and not all blanks. |
void |
validateDelete(ESITarget tgt)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final int VECTOR_SIZE_MULTIPLIER
private static final String NULL_STRING
private static final String UFID_DELIMITER
private static String ESITARGET_MAPFILE
private static String USED_RESOURCE
private TaskHelper taskHelper
Constructor Detail |
public ESITargetUtility()
Method Detail |
public final void adjustTargetAssignments(String ufids, 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 assignTargets(Persistable object, Group targets) throws WTException
object
- A Persistable object to be assigned to the unassigned targets.targets
- An Infoengine group of ESITarget objects to be assigned to the Persistable object, if these ESITarget objects are unassigned.
WTException
public final void assignTargets(Collection targetAssociations) throws WTException
targetAssociations
- A collection of ESITargetAssociations.
WTException
public final void connectTargetToOrganization(ESITarget tgt, WTOrganization org) throws WTException
tgt
- The ESITarget that is to be associated.org
- The WTOrganization that is to be associated.
WTException
public ESITarget createTarget(String name, String description, String system, WTContainerRef containerRef) throws ESIException
---Site ( ie. ExchangeContainer
)
--- Organization ( ie. OrgContainer
)
--- Application (ie. PDMLinkProduct
)
Supported API: true
name
- The name for representing ERP connection info on Windchill UI.description
- system
- The connection info for ERP system.containerRef
- The current container this ESI target will be resided.
ESIException
public final void deleteESITarget(ESITarget tgt) throws WTException
tgt
- The object to be deleted.
WTException
public final void deleteTargetAssociation(ESITargetAssignmentLink link) throws WTException
link
- The object to be deleted.
WTException
public final void disconnectTargetFromOrganization(ESITarget tgt, WTOrganization org) throws WTException
tgt
- The ESITarget that participates in the relationship.org
- The WTOrganizaion that participates in the relationship(s).
WTException
public final Collection getTargetAssociations(Persistable object) throws WTException
object
- The object whose target associations are to be queried
WTException
public final Collection getTargetAssociations(Persistable object, Persistable base) throws WTException
object
- The object of interest.base
- The object to pass to the TargetFinder initiator.
WTException
public final Group getTargetAssociations(String ufids, String groupName) throws WTException
ufids
- A concatenated list of UFIDs.groupName
- The name of the Info*Engine group to return.
WTException
public final Collection getTargetAssnsFromObjects(Collection objects) throws WTException
objects
- A collection of Persistables.
WTException
public final Collection getTargetAssnsFromObjects(Collection objects, Persistable base) throws WTException
objects
- A collection of Persistables.base
- The object to pass to the target finder.
WTException
public final Collection getTargetAssnsFromAssns(Collection associations) throws WTException
associations
- A collection of ESITargetAssociations
WTException
public final Collection getTargetAssnsFromAssns(Collection associations, Persistable base) throws WTException
associations
- A collection of ESITargetAssociationsbase
- The object to pass to the target finder.
WTException
public final ESITarget getTarget(String id) throws WTException
id
- The system attribute to find.
WTException
public final ESITarget getTarget(String id, WTContainerRef containerRef) throws WTException
id
- The system attribute to find.containerRef
- The container reference.
WTException
public final Collection getOrganizationLinksForTargets(Collection targets) throws WTException
targets
- A collection of ESITargets.
WTException
public final Collection getOrganizationLinksForOrganizations(Collection organizations) throws WTException
organizations
- A collection of WTOrganizations.
WTException
public final ESITarget newESITarget(String name, String description, String system) throws WTException
name
- The value for the ESITarget name attribute. Must not be null. May be up to 2048 characters long.description
- The value of the description attribute for the object to be created. May be null. May be up to 2048 characters long.system
- The value for the ESITarget system attribute. Must not be null. May be up to 2048 characters long. Must be unique in the database.
WTException
public final ESITarget newESITarget(String name, String description, String system, WTContainerRef containerRef) throws WTException
name
- The value for the ESITarget name attribute. Must not be null. May be up to 2048 characters long.description
- The value of the description attribute for the object to be created. May be null. May be up to 2048 characters long.system
- The value for the ESITarget system attribute. Must not be null. May be up to 2048 characters long. Must be unique in the database.containerRef
- The container reference.
WTException
public final ESITargetAssignmentLink newESITargetAssignmentLink(Persistable persistable, ESITarget target) throws WTException
persistable
- The object that is to be related to an ESI target.target
- The ESITarget that is to receive ESI releases of the object.
WTException
public final ESITargetOrganizationLink newESITargetOrganizationLink(WTOrganization org, ESITarget target) throws WTException
org
- The WTOrganization to associate.target
- The ESITarget to associate.
WTException
public final void removeTargetAssociations(Collection associations) throws WTException
associations
- A collection of ESITargetAssociation objects.
WTException
public final void validateDelete(ESITarget tgt) throws WTException
Supported API: false
tgt
- The ESITarget to evaluate.
WTException
private Collection getParts(String ufidString) throws WTException
WTException
private Collection deleteExistingAssignments(Collection coll) throws WTException
WTException
private void validateArgument(String arg, String name) throws MissingParameterException
arg
- The argument to validate.name
- The name to use if an error is discovered.
MissingParameterException
- Thrown if the argument is not valid.private void setAssignmentState(Group grp, Collection pts, Collection assns) throws WTException
grp
- The Info*Engine group that is to contain the output of the method.pts
- A collection of parts ufids. The size of this collection is the maximum size of
several collections created by this method.assns
- A collection of ESITargetAssociations that is to be processed.
WTException
- Thrown if any error occursprivate Collection getPersistedAssocToRemove(Collection completeAssoc, Collection assoc)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |