Class ApplicationArtifact


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

      • 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.5.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.
      • getResourceType

        public Optional<ResourceType> getResourceType()
        Gets the corresponding OSLC type (if any) of the application type.
        Returns:
        the corresponding OSLC type of type.
        Since:
        3.5.0
      • getResource

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