Package wt.impact
Class ImpactHelper
java.lang.Object
wt.impact.ImpactHelper
Helper for working with impact associations and for using the ImpactService.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic WTContainerRefgetContainerRefFromObject(Object container) Get organization or site container reference from an object.static StringGet association ID for impact associations.static ImpactServiceGet the implemented wt.impact.ImpactService object.static Set<TypeIdentifier>getSubTypes(TypeIdentifier rootTypeId, boolean onlyInstantiable, WTContainerRef containerRef) Get sub-types of a root type.static Set<TypeIdentifier>getSubTypes(Collection<TypeIdentifier> rootTypeIds, boolean onlyInstantiable, WTContainerRef containerRef) Get sub-types of a collection of root types.static final TypeIdentifiergetTypeIdentifier(Object object) Wrapped for testing purposes.
-
Method Details
-
getService
Get the implemented wt.impact.ImpactService object.
Supported API: true -
getImpactAssociationId
Get association ID for impact associations.
Supported API: true -
getTypeIdentifier
Wrapped for testing purposes.
Supported API: true- Throws:
WTException- See Also:
-
getSubTypes
public static Set<TypeIdentifier> getSubTypes(TypeIdentifier rootTypeId, boolean onlyInstantiable, WTContainerRef containerRef) throws WTException Get sub-types of a root type.
Supported API: true- Parameters:
rootTypeId- Root TypeIdentifier object.onlyInstantiable- True to return only instantiable types, false to return both instantiable and non-instantiable.containerRef- Reference to site (ExchangeContainer) or organization (OrgContainer).- Returns:
- Set of TypeIdentifier objects for all sub-types (guaranteed non-null, may be empty). Will include rootTypeId if it is instantiable or if onlyInstantiable is false.
- Throws:
WTException
-
getSubTypes
public static Set<TypeIdentifier> getSubTypes(Collection<TypeIdentifier> rootTypeIds, boolean onlyInstantiable, WTContainerRef containerRef) throws WTException Get sub-types of a collection of root types.
Supported API: true- Parameters:
rootTypeId- Collection of root TypeIdentifier objects.onlyInstantiable- True to return only instantiable types, false to return both instantiable and non-instantiable.containerRef- Reference to site (ExchangeContainer) or organization (OrgContainer).- Returns:
- Set of TypeIdentifier objects for all sub-types of all rootTypeIds (guaranteed non-null, may be empty). Will include rootTypeIds if they are instantiable or if onlyInstantiable is false.
- Throws:
WTException
-
getContainerRefFromObject
Get organization or site container reference from an object.
Supported API: true- Parameters:
container- WTContained or WTContainerRef object used to derive the association rule's organization or site context.- Returns:
- Organization reference if object is contained in an organization, PDM or project container, site reference if object is contained directly in the site container or if it could not be determined (guaranteed non-null).
- Throws:
WTException
-