Class AssociationType

  • All Implemented Interfaces:
    org.eclipse.lyo.oslc4j.core.model.IExtendedResource, org.eclipse.lyo.oslc4j.core.model.IResource

    @OslcNamespace("http://www.sodius.com/ns/process#")
    @OslcResourceShape(title="Association Type Resource Shape",
                       describes="http://www.sodius.com/ns/process#AssociationType")
    public class AssociationType
    extends org.eclipse.lyo.oslc4j.core.model.AbstractResource
    Describes a type of ProjectAreaAssociation.

    An association type gives access to a set of LinkTypes between 2 projects.

    Here is a link listing existing OSLC association types:

    • Jazz wiki: https://jazz.net/wiki/bin/view/Main/CALM2010LinkTypes

    The set of supported association types can be restricted to a subset using a ProcessScope instance, that all methods returning association types in this class will use.

    Since:
    1.3.0
    See Also:
    ProcessScope
    • Method Detail

      • getAssociationTypes

        public static Collection<AssociationType> getAssociationTypes​(HttpServletRequest request)
        Returns all supported association types.
        Parameters:
        request - the http request
        Returns:
        all supported association types.
      • forDomains

        public static Collection<AssociationType> forDomains​(URI localDomain,
                                                             URI friendDomain,
                                                             HttpServletRequest request)
        Returns the supported association types between the 2 given domains.
        Parameters:
        localDomain - the domain of the local project
        friendDomain - the domain of the friend's project
        request - the HttpServletRequest to retrieve the link types of the association type
        Returns:
        the supported association types
      • forIdentifier

        public static AssociationType forIdentifier​(String identifier,
                                                    HttpServletRequest request)
        Returns the association type for the given identifier.
        Parameters:
        identifier - the association type identifier
        request - the HttpServletRequest to retrieve the link types of the association type
        Returns:
        the association type
        Throws:
        IllegalArgumentException - if the given identifier is not a supported association type
      • getIdentifier

        @OslcPropertyDefinition("http://purl.org/dc/terms/identifier")
        @OslcName("identifier")
        public String getIdentifier()
      • setIdentifier

        public void setIdentifier​(String identifier)
      • getTitle

        @OslcPropertyDefinition("http://purl.org/dc/terms/title")
        @OslcName("title")
        public String getTitle()
      • setTitle

        public void setTitle​(String title)
      • getDirection

        @OslcPropertyDefinition("http://www.sodius.com/ns/process#associationDirection")
        @OslcName("associationDirection")
        public String getDirection()
      • setDirection

        public void setDirection​(String direction)
      • getSourceDomain

        @OslcPropertyDefinition("http://www.sodius.com/ns/process#sourceDomain")
        @OslcName("sourceDomain")
        public URI getSourceDomain()
      • setSourceDomain

        public void setSourceDomain​(URI sourceDomain)
      • getTargetDomain

        @OslcPropertyDefinition("http://www.sodius.com/ns/process#targetDomain")
        @OslcName("targetDomain")
        public URI getTargetDomain()
      • setTargetDomain

        public void setTargetDomain​(URI targetDomain)
      • getLinkTypes

        @OslcName("linkType")
        @OslcPropertyDefinition("http://www.sodius.com/ns/process#linkType")
        @OslcValueType(LocalResource)
        @OslcTitle("linkTypes")
        public LinkType[] getLinkTypes()
      • addLinkType

        public void addLinkType​(LinkType linkType)
      • setLinkTypes

        public void setLinkTypes​(LinkType[] linkTypes)