Class FlexibleChangeHelper

java.lang.Object
wt.change2.flexible.FlexibleChangeHelper

public final class FlexibleChangeHelper extends Object
Service support for flexible change associations.

Supported API: true

Extendable: false
  • Method Details

    • getService

      public static FlexibleChangeService getService()
      Get the FlexibleChangeService object.

      Supported API: true
    • isLegacyMode

      public static boolean isLegacyMode() throws WTException
      Determine if Legacy mode is set.

      Supported API: true
      Returns:
      Returns true if current change association mode is Legacy.
      Throws:
      WTException
      See Also:
    • isMixedMode

      public static boolean isMixedMode() throws WTException
      Determine if Mixed mode is set.

      Supported API: true
      Returns:
      Returns true if current change association mode is Mixed.
      Throws:
      WTException
      See Also:
    • isFlexibleMode

      public static boolean isFlexibleMode() throws WTException
      Determine if Flexible mode is set.

      Supported API: true
      Returns:
      Returns true if current change association mode is Flexible.
      Throws:
      WTException
      See Also:
    • isFlexible

      public static boolean isFlexible(ChangeItemIfc changeItem)
      Determine if change item uses flexible change associations.

      Supported API: true
      Parameters:
      changeItem - Change item of interest.
      Returns:
      True if changeItem uses flexible associations, false if it uses legacy associations.
    • getLinkClass

      public static Class<? extends FlexibleChangeLink> getLinkClass(TypeIdentifier linkType) throws WTException
      Get flexible change link class associated with link type.

      Supported API: true
      Parameters:
      linkType - WCTypeIdentifier for flexible change link type.
      Returns:
      Class for link type (FlexibleChangeLink.class returned if type is null).
      Throws:
      WTException
    • getFlexibleChangeItemsQuerySpec

      public static QuerySpec getFlexibleChangeItemsQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) throws WTException
      Get query spec for flexible change items.

      Supported API: true
      Parameters:
      item - FlexibleChangeItem role object.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      changeItemClass - Filter the result to only include change items of this type (null for all types).
      Returns:
      QuerySpec to return latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeItemsQuerySpec

      public static QuerySpec getFlexibleChangeItemsQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType) throws WTException
      Get query spec for flexible change items.

      Supported API: true
      Parameters:
      item - FlexibleChangeItem role object.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      Returns:
      QuerySpec to return latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeItemsQuerySpec

      public static QuerySpec getFlexibleChangeItemsQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType) throws WTException
      Get query spec for flexible change items.

      Supported API: true
      Parameters:
      items - Collection of FlexibleChangeItem role objects.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      Returns:
      QuerySpec to return latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeItemsQuerySpec

      public static QuerySpec getFlexibleChangeItemsQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) throws WTException
      Get query spec for flexible change items.

      Supported API: true
      Parameters:
      item - FlexibleChangeItem role object.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      changeItemClass - Filter the result to only include change items of this type (null for all types).
      Returns:
      QuerySpec to return latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeLinksQuerySpec

      public static QuerySpec getFlexibleChangeLinksQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) throws WTException
      Get query spec for flexible change links.

      Supported API: true
      Parameters:
      item - FlexibleChangeItem role object.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      changeItemClass - Filter the result to only include links related to change items of this type (null for all types).
      Returns:
      QuerySpec to return links to latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeLinksQuerySpec

      public static QuerySpec getFlexibleChangeLinksQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType) throws WTException
      Get query spec for flexible change links.

      Supported API: true
      Parameters:
      item - FlexibleChangeItem role object.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      Returns:
      QuerySpec to return links to latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeLinksQuerySpec

      public static QuerySpec getFlexibleChangeLinksQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType) throws WTException
      Get query spec for flexible change links.

      Supported API: true
      Parameters:
      items - Collection of FlexibleChangeItem role objects.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      Returns:
      QuerySpec to return links to latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeLinksQuerySpec

      public static QuerySpec getFlexibleChangeLinksQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) throws WTException
      Get query spec for flexible change links.

      Supported API: true
      Parameters:
      items - Collection of FlexibleChangeItem role objects.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      changeItemClass - Filter the result to only include links related to change items of this type (null for all types).
      Returns:
      QuerySpec to return links to latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeQuerySpec

      public static CompoundQuerySpec getFlexibleChangeQuerySpec(FlexibleChangeItem changeItem, String otherSideRole, Boolean latest, TypeIdentifier linkType, boolean changeItemsOnly, Class<?> changeItemClass) throws WTException
      Get query spec for flexible change items or change links depending on what is specified for the changeItemsOnly param.

      Supported API: true
      Parameters:
      changeItem - FlexibleChangeItem role object.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      changeItemsOnly - True for returning only the change items, false for returning only the links
      changeItemClass - Filter the result to only include links related to change items of this type (null for all types).
      Returns:
      QuerySpec to return links to latest revisions of the other side role.
      Throws:
      WTException
    • getFlexibleChangeQuerySpec

      public static CompoundQuerySpec getFlexibleChangeQuerySpec(WTCollection changeItems, String otherSideRole, Boolean latest, TypeIdentifier linkType, boolean changeItemsOnly, Class<?> changeItemClass) throws WTException
      Get query spec for flexible change items or change links depending on what is specified for the changeItemsOnly param.

      Supported API: true
      Parameters:
      changeItems - Collection of FlexibleChangeItem role objects.
      otherSideRole - Other side role being queried (e.g., FlexibleChangeLink.PARENT_ROLE, FlexibleChangeLink.CHILD_ROLE).
      latest - True for returning only latest revisions, false for returning only non-latest revisions, and null for all revisions (only used for VersionableChangeItem classes).
      linkType - WCTypeIdentifier for flexible change link type to be queried (null for all types).
      changeItemsOnly - True for returning only the change items, false for returning only the links
      changeItemClass - Filter the result to only include links related to change items of this type (null for all types).
      Returns:
      QuerySpec to return links to latest revisions of the other side role.
      Throws:
      WTException
    • getChangeAssociationMode

      public static FlexibleChangeHelper.ChangeAssociationMode getChangeAssociationMode() throws WTException
      Get the change association mode (guaranteed non-null).

      Supported API: true
      Throws:
      WTException
      See Also: