Package org.fedoraproject.xmvn.artifact
Interface Artifact
-
- All Known Implementing Classes:
DefaultArtifact
public interface ArtifactAn 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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_EXTENSIONDefault artifact extension, used if no explicit extension is specified.static java.lang.StringDEFAULT_VERSIONDefault artifact version, used if no explicit version is specified.static java.lang.StringMF_KEY_ARTIFACTIDstatic java.lang.StringMF_KEY_CLASSIFIERstatic java.lang.StringMF_KEY_EXTENSIONstatic java.lang.StringMF_KEY_GROUPIDstatic java.lang.StringMF_KEY_VERSION
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetArtifactId()Get artifact identifier of this artifact.java.lang.StringgetClassifier()Get classifier of this artifact.java.lang.StringgetExtension()Get extension of this artifact.java.lang.StringgetGroupId()Get group identifier of this artifact.java.nio.file.PathgetPath()Get local path of artifact file ornullif artifact is not resolved (doesn't have associated artifact file).java.lang.StringgetVersion()Get version of this artifact.ArtifactsetPath(java.nio.file.Path path)Set artifact path.ArtifactsetVersion(java.lang.String version)Set artifact version.
-
-
-
Field Detail
-
DEFAULT_EXTENSION
static final java.lang.String DEFAULT_EXTENSION
Default artifact extension, used if no explicit extension is specified.- See Also:
- Constant Field Values
-
DEFAULT_VERSION
static final java.lang.String DEFAULT_VERSION
Default artifact version, used if no explicit version is specified.- See Also:
- Constant Field Values
-
MF_KEY_GROUPID
static final java.lang.String MF_KEY_GROUPID
- See Also:
- Constant Field Values
-
MF_KEY_ARTIFACTID
static final java.lang.String MF_KEY_ARTIFACTID
- See Also:
- Constant Field Values
-
MF_KEY_EXTENSION
static final java.lang.String MF_KEY_EXTENSION
- See Also:
- Constant Field Values
-
MF_KEY_CLASSIFIER
static final java.lang.String MF_KEY_CLASSIFIER
- See Also:
- Constant Field Values
-
MF_KEY_VERSION
static final java.lang.String MF_KEY_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGroupId
java.lang.String getGroupId()
Get group identifier of this artifact.- Returns:
- artifact group identifier, never
null.
-
getArtifactId
java.lang.String getArtifactId()
Get artifact identifier of this artifact.- Returns:
- artifact identifier, never
null.
-
getExtension
java.lang.String getExtension()
Get extension of this artifact.- Returns:
- artifact extension, never
null.
-
getClassifier
java.lang.String getClassifier()
Get classifier of this artifact.- Returns:
- artifact classifier, never
null.
-
getVersion
java.lang.String getVersion()
Get version of this artifact.- Returns:
- artifact version, never
null.
-
getPath
java.nio.file.Path getPath()
Get local path of artifact file ornullif artifact is not resolved (doesn't have associated artifact file).- Returns:
- artifact file path, can be
null.
-
setVersion
Artifact setVersion(java.lang.String version)
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
Artifact setPath(java.nio.file.Path path)
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
-
-