Package com.sodius.oslc.server.process
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getArtifact()
Gets the native artifact.Optional<ArtifactTypeMapping>
getArtifactTypeMapping()
Gets the correspondingartifact type mapping
(if any) of theapplication type
.String
getId()
Gets the artifact identifier.Link
getResource()
Gets the artifact resource.Optional<URI>
getResourceType()
Gets the corresponding OSLC type (if any) of theapplication type
.String
getType()
Gets the artifact type.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.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.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.String
toString()
-
-
-
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 isnull
.
-
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-applicationtype
.- Returns:
- the corresponding instance.
- Throws:
NullPointerException
- if any parameter isnull
.- Since:
- 3.5.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-applicationtype
.- Returns:
- the corresponding instance.
- Throws:
NullPointerException
- if any parameter isnull
.- 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.
-
getResourceType
public Optional<URI> getResourceType()
Gets the corresponding OSLC type (if any) of theapplication type
.- Returns:
- the corresponding OSLC type of
type
. - Since:
- 3.8.0
-
getArtifactTypeMapping
public Optional<ArtifactTypeMapping> getArtifactTypeMapping()
Gets the correspondingartifact type mapping
(if any) of theapplication type
.- Returns:
- the corresponding
ArtifactTypeMapping
oftype
. - Since:
- 3.8.0
-
getResource
public Link getResource()
Gets the artifact resource.- Returns:
- the artifact resource.
-
-