Package wt.change2.flexible
Class FlexibleChangeHelper
java.lang.Object
wt.change2.flexible.FlexibleChangeHelper
Service support for flexible change associations.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumChange association modes: Legacy New FlexibleChangeItem objects are created with flexible attribute false. -
Method Summary
Modifier and TypeMethodDescriptionGet the change association mode (guaranteed non-null).static QuerySpecgetFlexibleChangeItemsQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType) Get query spec for flexible change items.static QuerySpecgetFlexibleChangeItemsQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) Get query spec for flexible change items.static QuerySpecgetFlexibleChangeItemsQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType) Get query spec for flexible change items.static QuerySpecgetFlexibleChangeItemsQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) Get query spec for flexible change items.static QuerySpecgetFlexibleChangeLinksQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType) Get query spec for flexible change links.static QuerySpecgetFlexibleChangeLinksQuerySpec(FlexibleChangeItem item, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) Get query spec for flexible change links.static QuerySpecgetFlexibleChangeLinksQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType) Get query spec for flexible change links.static QuerySpecgetFlexibleChangeLinksQuerySpec(WTCollection items, String otherSideRole, Boolean latest, TypeIdentifier linkType, Class<?> changeItemClass) Get query spec for flexible change links.static CompoundQuerySpecgetFlexibleChangeQuerySpec(FlexibleChangeItem changeItem, String otherSideRole, Boolean latest, TypeIdentifier linkType, boolean changeItemsOnly, Class<?> changeItemClass) Get query spec for flexible change items or change links depending on what is specified for the changeItemsOnly param.static CompoundQuerySpecgetFlexibleChangeQuerySpec(WTCollection changeItems, String otherSideRole, Boolean latest, TypeIdentifier linkType, boolean changeItemsOnly, Class<?> changeItemClass) Get query spec for flexible change items or change links depending on what is specified for the changeItemsOnly param.static Class<? extends FlexibleChangeLink>getLinkClass(TypeIdentifier linkType) Get flexible change link class associated with link type.static FlexibleChangeServiceGet the FlexibleChangeService object.static booleanisFlexible(ChangeItemIfc changeItem) Determine if change item uses flexible change associations.static booleanDetermine if Flexible mode is set.static booleanDetermine if Legacy mode is set.static booleanDetermine if Mixed mode is set.
-
Method Details
-
getService
Get the FlexibleChangeService object.
Supported API: true -
isLegacyMode
Determine if Legacy mode is set.
Supported API: true- Returns:
- Returns true if current change association mode is Legacy.
- Throws:
WTException- See Also:
-
isMixedMode
Determine if Mixed mode is set.
Supported API: true- Returns:
- Returns true if current change association mode is Mixed.
- Throws:
WTException- See Also:
-
isFlexibleMode
Determine if Flexible mode is set.
Supported API: true- Returns:
- Returns true if current change association mode is Flexible.
- Throws:
WTException- See Also:
-
isFlexible
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 linkschangeItemClass- 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 linkschangeItemClass- 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 WTExceptionGet the change association mode (guaranteed non-null).
Supported API: true- Throws:
WTException- See Also:
-