Package org.fedoraproject.xmvn.artifact
Interface Artifact
- All Known Implementing Classes:
DefaultArtifact
public interface Artifact
An abstract entity uniquely identified by its coordinates – group identifier, artifact identifier, extension,
classifier and version, with optionally associated artifact file.
Artifact objects are immutable – all methods which modify artifact return a new object and keep the original unmodified.
- Author:
- Mikolaj Izdebski
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Default artifact extension, used if no explicit extension is specified.static final String
Default artifact version, used if no explicit version is specified.static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionGet artifact identifier of this artifact.Get classifier of this artifact.Get extension of this artifact.Get group identifier of this artifact.getPath()
Get local path of artifact file ornull
if artifact is not resolved (doesn't have associated artifact file).Get version of this artifact.Set artifact path.setVersion
(String version) Set artifact version.
-
Field Details
-
DEFAULT_EXTENSION
Default artifact extension, used if no explicit extension is specified.- See Also:
-
DEFAULT_VERSION
Default artifact version, used if no explicit version is specified.- See Also:
-
MF_KEY_GROUPID
- See Also:
-
MF_KEY_ARTIFACTID
- See Also:
-
MF_KEY_EXTENSION
- See Also:
-
MF_KEY_CLASSIFIER
- See Also:
-
MF_KEY_VERSION
- See Also:
-
-
Method Details
-
getGroupId
String getGroupId()Get group identifier of this artifact.- Returns:
- artifact group identifier, never
null
.
-
getArtifactId
String getArtifactId()Get artifact identifier of this artifact.- Returns:
- artifact identifier, never
null
.
-
getExtension
String getExtension()Get extension of this artifact.- Returns:
- artifact extension, never
null
.
-
getClassifier
String getClassifier()Get classifier of this artifact.- Returns:
- artifact classifier, never
null
.
-
getVersion
String getVersion()Get version of this artifact.- Returns:
- artifact version, never
null
.
-
getPath
Path getPath()Get local path of artifact file ornull
if artifact is not resolved (doesn't have associated artifact file).- Returns:
- artifact file path, can be
null
.
-
setVersion
Set artifact version.Since artifacts are immutable, this method returns a new object and leaves the original unmodified.
- Parameters:
version
- the new artifact version to set- Returns:
- copy of artifact with the new version set
-
setPath
Set artifact path.Since artifacts are immutable, this method returns a new object and leaves the original unmodified.
- Parameters:
path
- the new artifact path to set- Returns:
- copy of artifact with the new path set
-