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 ObjectgetArtifact()Gets the native artifact.Optional<ArtifactTypeMapping>getArtifactTypeMapping()Gets the correspondingartifact type mapping(if any) of theapplication type.StringgetId()Gets the artifact identifier.LinkgetResource()Gets the artifact resource.Collection<URI>getResourceTypes()Gets the types of the artifact.StringgetType()Gets the artifact type.static ApplicationArtifactof(Object artifact, URI uri, String id, String type, String title)Builds an instance from an application native artifact and a given type.static ApplicationArtifactof(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 ApplicationArtifactof(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.static ApplicationArtifactof(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.StringtoString()
-
-
-
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.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 isnull.- 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-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.
-
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 correspondingartifact type mapping(if any) of theapplication type.- Returns:
- the corresponding
ArtifactTypeMappingoftype. - Since:
- 3.8.0
-
getResource
public Link getResource()
Gets the artifact resource.- Returns:
- the artifact resource.
-
-