Enum Class ResourceType

java.lang.Object
java.lang.Enum<ResourceType>
com.sodius.oslc.core.process.model.ResourceType
All Implemented Interfaces:
Serializable, Comparable<ResourceType>, java.lang.constant.Constable

public enum ResourceType extends Enum<ResourceType>
Describes an OSLC resource type that can be the source or target of link types.
Since:
3.5.0
  • Enum Constant Details

    • ARCHITECTURE_RESOURCE

      public static final ResourceType ARCHITECTURE_RESOURCE
      Architecture Resource - http://open-services.net/ns/am#Resource, from Architecture Management domain.
    • CHANGE_REQUEST

      public static final ResourceType CHANGE_REQUEST
      Change Request - http://open-services.net/ns/cm#ChangeRequest, from Change Management domain.
    • CHANGE_SET

      public static final ResourceType CHANGE_SET
      Change Set - http://open-services.net/ns/config#ChangeSet, from Configuration Management domain.
    • DELIVERABLE

      public static final ResourceType DELIVERABLE
      Deliverable - http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/Deliverable, from Change Management domain.
      Since:
      4.0.0
    • REQUIREMENT

      public static final ResourceType REQUIREMENT
      Requirement - http://open-services.net/ns/rm#Requirement, from Requirement Management domain.
    • REQUIREMENT_COLLECTION

      public static final ResourceType REQUIREMENT_COLLECTION
      Requirement Collection - http://open-services.net/ns/rm#RequirementCollection, from Requirement Management domain.
    • TEST_CASE

      public static final ResourceType TEST_CASE
      Test Case - http://open-services.net/ns/qm#TestCase, from Quality Management domain.
    • TEST_EXECUTION_RECORD

      public static final ResourceType TEST_EXECUTION_RECORD
      Test Execution Record - http://open-services.net/ns/qm#TestExecutionRecord, from Quality Management domain.
    • TEST_PLAN

      public static final ResourceType TEST_PLAN
      Test Plan - http://open-services.net/ns/qm#TestPlan, from Quality Management domain.
    • TEST_RESULT

      public static final ResourceType TEST_RESULT
      Test Result - http://open-services.net/ns/qm#TestResult, from Quality Management domain.
    • TEST_SCRIPT

      public static final ResourceType TEST_SCRIPT
      Test Script - http://open-services.net/ns/qm#TestScript, from Quality Management domain.
  • Method Details

    • values

      public static ResourceType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ResourceType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • supportedValues

      public static Collection<ResourceType> supportedValues()
      Returns the resources types that are supported, the ones whose artifacts can be managed in the local application, as determined by ProcessScope.
      Returns:
      the supported resource types.
      See Also:
    • valueOf

      public static ResourceType valueOf(URI uri)
      Returns the resource type matching the given URI.
      Parameters:
      uri - the URI of a resource type.
      Returns:
      the corresponding resource type.
      Throws:
      IllegalArgumentException - if the URI does not match any resource type.
    • forDomain

      public static Collection<ResourceType> forDomain(Domain domain)
      Returns the collection of resource types defined by the given domain.

      This returned collection is not restricted to supported types only. Depending on the need, caller may filter the resulting collection with ProcessScope.contains(ResourceType).

      Parameters:
      domain - an OSLC domain
      Returns:
      the list of types defined in the given domain
    • getURI

      public URI getURI()
      Return the URI of the resource type, e.g. http://open-services.net/ns/cm#ChangeRequest
      Returns:
      the domain URI.
    • getDomain

      public Domain getDomain()
      Returns the domain defining this type.
      Returns:
      the domain defining this type.
    • getParent

      public Optional<ResourceType> getParent()
      Gets the optional parent type of this type.
      Returns:
      an empty Optional if this type has no parent; the contained reference otherwise.
    • getChildren

      public Collection<ResourceType> getChildren()
      Gets the children resource types of this type.
      Returns:
      children resource types of this type.
    • getTitle

      public String getTitle(List<Locale> locales)
      Returns the title of the resource type, e.g. "Change Request".
      Parameters:
      locales - the ordered languages of preference for the title, or an empty list to default to English.
      Returns:
      the resource type title.
    • isCompatibleWith

      public boolean isCompatibleWith(ResourceType resourceType)
      Determines whether this type is compatible with another ResourceType.
      Parameters:
      resourceType - the resource type to verify.
      Returns:
      true if resourceType is equal or parent/ancestor of this type; false otherwise.