Interface AssociationDelegate
- All Known Implementing Classes:
DescribedByLinkAssocationDelegate,PassiveLinkAssociationDelegate,ReferencedByLinkAssociationDelegate
public interface AssociationDelegate
This delegate is used to determine the appropriate association link to create
or to retrieve the appropriated associated objects. A specific delegate is
selected based on the registered selector type registered in
service.properties.
For example to register a implement delegate:
The following is used to call the registered association delegate:
Extendable: true
Supported API: true
For example to register a implement delegate:
<Service context="default" name="com.ptc.windchill.enterprise.associations.AssociationDelegate">
<Option serviceClass="path.ImplementedAssocationDelegate"
selector="some_selector"
requestor="null"
cardinality="duplicate"/>
</Service>
The following is used to call the registered association delegate:
AssociationDelegate delegate = (AssociationDelegate)DefaultServiceProvider.getService(AssociationDelegate.class, some_selector);
Extendable: true
Supported API: true
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetAssociatedObjects(WTCollection targets) Given a collection of target objects returns a map of the target objects and the associated source objects.Class<?>Get association link class type returned by this delegate
Supported API: truegetExistingAssociations(WTCollection targets, Persistable source) Given a list of targets and the source returns all the associated links.newAssociationLink(Persistable roleA, Persistable roleB) Given a role A object and a role B object creates the appropriate association link.
-
Method Details
-
newAssociationLink
Given a role A object and a role B object creates the appropriate association link.
Supported API: true- Parameters:
roleA-roleB-- Returns:
- a association link
- Throws:
WTException
-
getAssociatedObjects
Given a collection of target objects returns a map of the target objects and the associated source objects.
Supported API: true- Parameters:
targets- a collection of target objects- Returns:
- a map of the target objects and the associated source objects
- Throws:
WTException
-
getExistingAssociations
Given a list of targets and the source returns all the associated links.
Supported API: true- Parameters:
targets- a collection of target objectssource- the source object- Returns:
- a set of link objects for the targets that are associated to the source object.
- Throws:
WTException
-
getAssociationLinkType
Class<?> getAssociationLinkType()Get association link class type returned by this delegate
Supported API: true
-