Class ApplicationArtifact

java.lang.Object
com.sodius.oslc.server.process.ApplicationArtifact

public class ApplicationArtifact extends Object
An application native artifact wrapper.
Since:
3.1.0
  • Method Details

    • of

      public static ApplicationArtifact of(Object artifact, URI uri, String id, String type, String title)
      Builds an instance from an application native artifact and a given type.
      Parameters:
      artifact - the application native artifact.
      uri - the artifact URI.
      id - the artifact identifier.
      type - the given type, not necessarily a fully qualified class name. This type is whatever the product applications decide to classify their native artifacts.
      title - the artifact title.
      Returns:
      the corresponding instance.
      Throws:
      NullPointerException - if any parameter is null.
    • of

      public static ApplicationArtifact of(Object artifact, URI uri, String id, String type, String title, ResourceType resourceType)
      Builds an instance from an application native artifact and a given type.
      Parameters:
      artifact - the application native artifact.
      uri - the artifact URI.
      id - the artifact identifier.
      type - the given type, not necessarily a fully qualified class name. This type is whatever the product applications decide to classify their native artifacts.
      title - the artifact title.
      resourceType - the corresponding OSLC type of the native-application type.
      Returns:
      the corresponding instance.
      Throws:
      NullPointerException - if any parameter is null.
      Since:
      3.13.0
    • of

      public static ApplicationArtifact of(Object artifact, URI uri, String id, String type, String title, List<ResourceType> resourceTypes)
      Builds an instance from an application native artifact and a given list of types.
      Parameters:
      artifact - the application native artifact.
      uri - the artifact URI.
      id - the artifact identifier.
      type - the given type, not necessarily a fully qualified class name. This type is whatever the product applications decide to classify their native artifacts.
      title - the artifact title.
      resourceTypes - the list of types of the artifact.
      Returns:
      the corresponding instance.
      Throws:
      NullPointerException - if any parameter is null.
      Since:
      3.13.0
    • of

      public static ApplicationArtifact of(Object artifact, URI uri, String id, String type, String title, ArtifactTypeMapping typeMapping)
      Builds an instance from an application native artifact and a given type with mapping.
      Parameters:
      artifact - the application native artifact.
      uri - the artifact URI.
      id - the artifact identifier.
      type - the given type, not necessarily a fully qualified class name. This type is whatever the product applications decide to classify their native artifacts.
      title - the artifact title.
      typeMapping - the artifact type mapping of the native-application type.
      Returns:
      the corresponding instance.
      Throws:
      NullPointerException - if any parameter is null.
      Since:
      3.8.0
    • getId

      public String getId()
      Gets the artifact identifier.
      Returns:
      the artifact identifier.
    • getArtifact

      public Object getArtifact()
      Gets the native artifact.
      Returns:
      native artifact.
    • getType

      public String getType()
      Gets the artifact type. This type is not necessarily a fully qualified class name; it can be whatever the product application decided to classify its native artifacts.
      Returns:
      the artifact type.
    • getResourceTypes

      public Collection<URI> getResourceTypes()
      Gets the types of the artifact.
      Returns:
      the types (OSLC or not) of the artifact.
      Since:
      3.13.0
    • getArtifactTypeMapping

      public Optional<ArtifactTypeMapping> getArtifactTypeMapping()
      Gets the corresponding artifact type mapping (if any) of the application type.
      Returns:
      the corresponding ArtifactTypeMapping of type.
      Since:
      3.8.0
    • getResource

      public Link getResource()
      Gets the artifact resource.
      Returns:
      the artifact resource.
    • toString

      public String toString()
      Overrides:
      toString in class Object