Class InterferenceDetectionHelper

java.lang.Object
com.ptc.wvs.server.publish.InterferenceDetectionHelper

public class InterferenceDetectionHelper extends Object
A all purpose class to support Interference Detection.

Supported API: true

Extendable: false
  • Method Details

    • getExistingInterferences

      public static WTKeyedMap getExistingInterferences(Collection<InterferenceInfo> _allInterferenceInfo, String shareName) throws WTException
      Given a collection of InterferenceInfo instances extracted from a interference XML report generated by a Creo View worker, find all matching existing Interference MarkUps. All iterations of the given Interference Detection Definition (IDD) that exist with the same case insensitive shareName.

      Supported API: true
      Parameters:
      _allInterferenceInfo - - A collection of "interference" meta data extracted from a interference XML report file generated by a Creo View worker in which a single InterferenceInfo represents a single interference.
      shareName - - The share name to use to find all Interference Detection Definitions iterations with that share name.
      Returns:
      Map<InterferenceInfo, MarkUp> - A map in which the key is an InterferenceInfo instance provided in the input collection and the value is an existing interference MarkUp that already exists in the system of which is linked to other report(s). If no existing interference markups are found in the system, an empty map will be returned.
      Throws:
      WTException - - Thrown if an unexpected error occurs.
    • getIDDsForSharedName

      public static WTHashSet getIDDsForSharedName(String shareName) throws WTException
      Find all Interference Detection Definitions (IDD) with the same case insensitive shareName.

      Supported API: true
      Parameters:
      shareName - - The share name to use to find all Interference Detection Definitions with that share name.
      Returns:
      WTHashSet - A set of ObjectReferences referring to Interference Detection Definitions having the given share name.
      Throws:
      WTException - - Thrown if an unexpected error occurs.
    • compareToExistingInterferences

      public static Map<InterferenceInfo,wt.viewmarkup.MarkUp> compareToExistingInterferences(Collection<InterferenceInfo> _allInterferenceInfo, WTCollection _existingInterferenceMarkups) throws WTException
      Given a collection of InterferenceInfo instances extracted from a Interference report XML generated by a Creo View worker, determine if any existing interference Markups are a match.

      Supported API: true
      Parameters:
      _allInterferenceInfo - - A collection of "interference" meta data extracted from a interference report XML file generated by a worker in which a single InterferenceInfo represents a single interference.
      _existingInterferenceMarkups - - A collection of existing interference Markups to compare against the given report of InterferenceInfo instances.
      Returns:
      A map where the key is one of the given InterferenceInfo instances and the value is a matching interference markup. If an InterferenceInfo doesn't have a match, it will not be returned in the map. If no matches are found, then an empty map will be returned.
      Throws:
      WTException - - Thrown if an unexpected error occurs.
    • isInterferenceDefinition

      public static boolean isInterferenceDefinition(Object _object)
      Determine if a given object is an Interference Definition.
      Parameters:
      _object - Object - An object to check.
      Returns:
      boolean - Returns true if the given object is an Interference Detection Definition.

      Supported API: true
    • getContainerReference

      public static WTContainerRef getContainerReference(WTDocument document)
      Gets the WTContainerRef from the passed in WTDocument
      Parameters:
      document - WTDocument used to get the container reference off of
      Returns:
      WTContainerRef of the passed in WTDocument

      Supported API: true
    • getContainer

      public static WTContainer getContainer(WTDocument document)
      Gets the WTContainer from the passed in WTDocument
      Parameters:
      document - WTDocument used to get the container reference off of
      Returns:
      WTContainer of the passed in WTDocument

      Supported API: true
    • getSearchCondition

      public static SearchCondition getSearchCondition(TypeIdentifier typeIdentifier) throws WTException
      Gets a SearchCondition for the TypeIdentifier passed in.
      Parameters:
      typeIdentifier - TypeIdentifier used to create the new SearchCondition with.
      Returns:
      A SearchCondition for a TypeIdendifier
      Throws:
      WTException - Thrown if the condition can not be created.

      Supported API: true
    • getSearchConditionExcludeDescendants

      public static SearchCondition getSearchConditionExcludeDescendants(TypeIdentifier typeIdentifier) throws WTException
      Gets a SearchCondition for the TypeIdentifier passed in excluding the descendants.
      Parameters:
      typeIdentifier - TypeIdentifier used to create the new SearchCondition with.
      Returns:
      A SearchCondition for a TypeIdendifier that excludes the descendants
      Throws:
      WTException - Thrown if the condition can not be created.

      Supported API: true
    • getNewContainerSpec

      public static ContainerSpec getNewContainerSpec() throws WTException
      Gets a new ContainerSpec
      Returns:
      A ContainerSpec
      Throws:
      WTException - If the ContainerSpec can not be created

      Supported API: true