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:


 <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 Details

    • newAssociationLink

      BinaryLink newAssociationLink(Persistable roleA, Persistable roleB) throws WTException
      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

      WTKeyedMap getAssociatedObjects(WTCollection targets) throws WTException
      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

      WTSet getExistingAssociations(WTCollection targets, Persistable source) throws WTException
      Given a list of targets and the source returns all the associated links.

      Supported API: true
      Parameters:
      targets - a collection of target objects
      source - 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