Enum LinkType
- java.lang.Object
-
- java.lang.Enum<LinkType>
-
- com.sodius.oslc.core.process.model.LinkType
-
- All Implemented Interfaces:
Serializable
,Comparable<LinkType>
public enum LinkType extends Enum<LinkType>
Describes a type of link between 2 OSLC resources.Link types are grouped by
AssociationType
.Here are some resources listing existing OSLC link types:
- Jazz wiki (association types): https://jazz.net/wiki/bin/view/Main/CALM2010LinkTypes
- Jazz wiki (CLM): https://jazz.net/wiki/bin/view/Deployment/IntegratingWithConfigurationManagementEnabledCLMApplications
- Jazz RM help page: https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.rational.rrm.help.doc/topics/r_rm_link_domains.html
The set of supported link types can be restricted to a subset using a
ProcessScope
instance, that all methods returning link types in this class will use.- Since:
- 1.7.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LinkType.Direction
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Collection<LinkType>
forAssociationType(AssociationType associationType)
Returns the supported link types for the given association type.static Collection<LinkType>
forDeliverableType(DeliverableType deliverableType)
Returns the supported link types matching the given deliverable type.static Collection<LinkType>
forPropertyDefinition(URI propertyDefinition)
Returns the supported link types for the given property definition.static Collection<LinkType>
forSourceRange(URI sourceRange)
Returns the supported link types for the given source range.AssociationType
getAssociationType()
Optional<LinkType>
getBacklink()
Optional<DeliverableType>
getDeliverableType()
Returns the link type's default deliverable type.static Optional<DeliverableType>
getDeliverableType(URI propertyDefinition)
Returns the link type default deliverable type for the given property definition.LinkType.Direction
getDirection()
static LinkType.Direction
getDirection(URI propertyDefinition)
Returns the link type direction for the given property definition.URI
getPropertyDefinition()
URI
getSourceRange()
URI
getTargetRange()
static String
getTitle(URI propertyDefinition, List<Locale> locales)
Returns the link type title for the given property definition.String
getTitle(List<Locale> locales)
static URI
getUsagePropertyDefinition(String usages)
Gets the property definition (URI) of anusages
value.boolean
isUserSelectable()
Determines whether the end-user must be offered to create a link of such type.static Collection<LinkType>
supportedValues()
Returns the link types that are supported, as determined byProcessScope
.static LinkType
valueOf(String name)
Returns the enum constant of this type with the specified name.static LinkType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TESTED_BY_TEST_CASE
public static final LinkType TESTED_BY_TEST_CASE
-
TESTS_CHANGE_REQUEST
public static final LinkType TESTS_CHANGE_REQUEST
-
BLOCKS_TEST_EXECUTION_RECORD
public static final LinkType BLOCKS_TEST_EXECUTION_RECORD
-
BLOCKED_BY_CHANGE_REQUEST
public static final LinkType BLOCKED_BY_CHANGE_REQUEST
-
AFFECTS_TEST_RESULT
public static final LinkType AFFECTS_TEST_RESULT
-
AFFECTED_BY_CHANGE_REQUEST
public static final LinkType AFFECTED_BY_CHANGE_REQUEST
-
RELATED_TEST_PLAN
public static final LinkType RELATED_TEST_PLAN
-
RELATED_CHANGE_REQUEST_TEST_PLAN
public static final LinkType RELATED_CHANGE_REQUEST_TEST_PLAN
-
RELATED_TEST_CASE
public static final LinkType RELATED_TEST_CASE
-
RELATED_CHANGE_REQUEST_TEST_CASE
public static final LinkType RELATED_CHANGE_REQUEST_TEST_CASE
-
RELATED_TEST_EXECUTION_RECORD
public static final LinkType RELATED_TEST_EXECUTION_RECORD
-
RELATED_CHANGE_REQUEST_TEST_EXECUTION_RECORD
public static final LinkType RELATED_CHANGE_REQUEST_TEST_EXECUTION_RECORD
-
RELATED_TEST_SCRIPT
public static final LinkType RELATED_TEST_SCRIPT
-
RELATED_CHANGE_REQUEST_TEST_SCRIPT
public static final LinkType RELATED_CHANGE_REQUEST_TEST_SCRIPT
-
VALIDATES_REQUIREMENT_TEST_CASE
public static final LinkType VALIDATES_REQUIREMENT_TEST_CASE
-
VALIDATED_BY_TEST_CASE
public static final LinkType VALIDATED_BY_TEST_CASE
-
VALIDATES_REQUIREMENT_COLLECTION
public static final LinkType VALIDATES_REQUIREMENT_COLLECTION
-
VALIDATED_BY_TEST_PLAN
public static final LinkType VALIDATED_BY_TEST_PLAN
-
VALIDATES_REQUIREMENT_TEST_SCRIPT
public static final LinkType VALIDATES_REQUIREMENT_TEST_SCRIPT
-
VALIDATED_BY_TEST_SCRIPT
public static final LinkType VALIDATED_BY_TEST_SCRIPT
-
VALIDATES_ARCHITECTURE_ELEMENT
public static final LinkType VALIDATES_ARCHITECTURE_ELEMENT
-
VALIDATED_BY
public static final LinkType VALIDATED_BY
-
IMPLEMENTS_REQUIREMENT
public static final LinkType IMPLEMENTS_REQUIREMENT
-
IMPLEMENTED_BY
public static final LinkType IMPLEMENTED_BY
-
AFFECTS_REQUIREMENT
public static final LinkType AFFECTS_REQUIREMENT
-
AFFECTED_BY
public static final LinkType AFFECTED_BY
-
TRACKS_REQUIREMENT
public static final LinkType TRACKS_REQUIREMENT
-
TRACKED_BY
public static final LinkType TRACKED_BY
-
TRACKS_CHANGE_SET
public static final LinkType TRACKS_CHANGE_SET
Links a change request to a requirement change set, to control the authorization of the changes delivery. This link type has no opposite link type, the remote server is discovering its incoming links using an OSLC query.- Since:
- 3.3.1
-
RELATED_CHANGE_REQUEST
public static final LinkType RELATED_CHANGE_REQUEST
-
AFFECTS_PLAN_ITEM
public static final LinkType AFFECTS_PLAN_ITEM
-
AFFECTED_BY_DEFECT
public static final LinkType AFFECTED_BY_DEFECT
-
TRACKED_WORK_ITEM
public static final LinkType TRACKED_WORK_ITEM
- Since:
- 1.9.0
-
TRACKS_WORK_ITEM
public static final LinkType TRACKS_WORK_ITEM
- Since:
- 1.9.0
-
ELABORATED_BY_ARCHITECTURE_ELEMENT
public static final LinkType ELABORATED_BY_ARCHITECTURE_ELEMENT
-
ELABORATES
public static final LinkType ELABORATES
-
DERIVES
public static final LinkType DERIVES
-
REFINE
public static final LinkType REFINE
-
SATISFY
public static final LinkType SATISFY
-
TRACE
public static final LinkType TRACE
-
CONSTRAINS
public static final LinkType CONSTRAINS
-
CONSTRAINED_BY
public static final LinkType CONSTRAINED_BY
-
DECOMPOSES
public static final LinkType DECOMPOSES
-
DECOMPOSED_BY
public static final LinkType DECOMPOSED_BY
-
SPECIFIES
public static final LinkType SPECIFIES
-
SPECIFIED_BY
public static final LinkType SPECIFIED_BY
-
SATISFIES_RM
public static final LinkType SATISFIES_RM
-
SATISFIED_BY
public static final LinkType SATISFIED_BY
-
ELABORATES_RM
public static final LinkType ELABORATES_RM
-
ELABORATED_BY
public static final LinkType ELABORATED_BY
-
-
Method Detail
-
values
public static LinkType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LinkType c : LinkType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LinkType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
supportedValues
public static Collection<LinkType> supportedValues()
Returns the link types that are supported, as determined byProcessScope
.- Returns:
- the supported link types.
- Since:
- 1.9.0
- See Also:
ProcessScope
-
forAssociationType
public static Collection<LinkType> forAssociationType(AssociationType associationType)
Returns the supported link types for the given association type.- Parameters:
associationType
- the association type- Returns:
- the supported link types
-
forSourceRange
public static Collection<LinkType> forSourceRange(URI sourceRange)
Returns the supported link types for the given source range.- Parameters:
sourceRange
- the source range (e.g:OslcCm.TYPE_CHANGE_REQUEST
,OslcAm.TYPE_AMRESOURCE
,OslcRm.TYPE_REQUIREMENT
...)- Returns:
- the supported link types
-
forPropertyDefinition
public static Collection<LinkType> forPropertyDefinition(URI propertyDefinition)
Returns the supported link types for the given property definition.- Parameters:
propertyDefinition
- the link type property definition- Returns:
- the corresponding link types
-
forDeliverableType
public static Collection<LinkType> forDeliverableType(DeliverableType deliverableType)
Returns the supported link types matching the given deliverable type.- Parameters:
deliverableType
- the deliverable type to match- Returns:
- the supported link types
- Since:
- 1.8.0
-
getDirection
public static LinkType.Direction getDirection(URI propertyDefinition)
Returns the link type direction for the given property definition.Note that while a property definition may have several corresponding link types, they will always be in the same direction.
- Parameters:
propertyDefinition
- the link type property definition- Returns:
- the link type direction
-
getDeliverableType
public static Optional<DeliverableType> getDeliverableType(URI propertyDefinition)
Returns the link type default deliverable type for the given property definition.Deliverable types only apply to link types between a CM resource and another configurable domain (AM, QM, RM...). Other link types will return an empty optional.
- Parameters:
propertyDefinition
- the link type property definition- Returns:
- the link type default deliverable type
- Since:
- 1.8.0
-
getTitle
public static String getTitle(URI propertyDefinition, List<Locale> locales)
Returns the link type title for the given property definition.Note that while a property definition may have several corresponding link types, they will always have the same title.
- Parameters:
propertyDefinition
- the link type property definitionlocales
- the locales preferences to translate the title- Returns:
- the link type title
-
getUsagePropertyDefinition
public static URI getUsagePropertyDefinition(String usages)
Gets the property definition (URI) of anusages
value. A usage is commonly sent by ELM applications when opening a selection/creation dialog, to inform the remote application of the link type the dialog was opened for. It consists of a prefixed link type property, such asoslc_cm:relatedChangeRequest
.- Parameters:
usages
- the usages value.- Returns:
- the corresponding URI.
- Throws:
IllegalArgumentException
- ifusages
cannot be resolved to a valid instance of this class.
-
getAssociationType
public AssociationType getAssociationType()
-
getPropertyDefinition
public URI getPropertyDefinition()
-
getSourceRange
public URI getSourceRange()
-
getTargetRange
public URI getTargetRange()
-
getDirection
public LinkType.Direction getDirection()
-
getDeliverableType
public Optional<DeliverableType> getDeliverableType()
Returns the link type's default deliverable type.Deliverable types only apply to link types between a CM resource and another configurable domain (AM, QM, RM...). Other link types will return an empty optional.
- Returns:
- the link type's default deliverable type
- Since:
- 1.8.0
-
isUserSelectable
public boolean isUserSelectable()
Determines whether the end-user must be offered to create a link of such type. Most of the link types can be initiated by the end-user on his local resource, but some can only be created from the opposite bound, typically thetracksChangeSet
one.- Returns:
true
if the end-user can create such link on his local resource,false
otherwise.- Since:
- 3.3.1
-
-