public final class DefaultMetadata extends AbstractMetadata
Metadata.Nature
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
artifactId |
private java.io.File |
file |
private java.lang.String |
groupId |
private Metadata.Nature |
nature |
private java.util.Map<java.lang.String,java.lang.String> |
properties |
private java.lang.String |
type |
private java.lang.String |
version |
Constructor and Description |
---|
DefaultMetadata(java.lang.String type,
Metadata.Nature nature)
Creates a new metadata for the repository root with the specific type and nature.
|
DefaultMetadata(java.lang.String groupId,
java.lang.String type,
Metadata.Nature nature)
Creates a new metadata for the groupId level with the specific type and nature.
|
DefaultMetadata(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String type,
Metadata.Nature nature)
Creates a new metadata for the groupId:artifactId level with the specific type and nature.
|
DefaultMetadata(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String type,
Metadata.Nature nature)
Creates a new metadata for the groupId:artifactId:version level with the specific type and nature.
|
DefaultMetadata(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String type,
Metadata.Nature nature,
java.io.File file)
Creates a new metadata for the groupId:artifactId:version level with the specific type and nature.
|
DefaultMetadata(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String type,
Metadata.Nature nature,
java.io.File file,
java.util.Map<java.lang.String,java.lang.String> properties) |
DefaultMetadata(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String type,
Metadata.Nature nature,
java.util.Map<java.lang.String,java.lang.String> properties,
java.io.File file)
Creates a new metadata for the groupId:artifactId:version level with the specific type and nature.
|
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
emptify(java.lang.String str) |
java.lang.String |
getArtifactId()
Gets the artifact identifier of this metadata.
|
java.io.File |
getFile()
Gets the file of this metadata.
|
java.lang.String |
getGroupId()
Gets the group identifier of this metadata.
|
Metadata.Nature |
getNature()
Gets the nature of this metadata.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Gets the properties of this metadata.
|
java.lang.String |
getType()
Gets the type of the metadata, e.g.
|
java.lang.String |
getVersion()
Gets the version of this metadata.
|
copyProperties, equals, getProperty, hashCode, setFile, setProperties, toString
private final java.lang.String groupId
private final java.lang.String artifactId
private final java.lang.String version
private final java.lang.String type
private final Metadata.Nature nature
private final java.io.File file
private final java.util.Map<java.lang.String,java.lang.String> properties
public DefaultMetadata(java.lang.String type, Metadata.Nature nature)
type
- The type of the metadata, e.g. "maven-metadata.xml", may be null
.nature
- The nature of the metadata, must not be null
.public DefaultMetadata(java.lang.String groupId, java.lang.String type, Metadata.Nature nature)
groupId
- The group identifier to which this metadata applies, may be null
.type
- The type of the metadata, e.g. "maven-metadata.xml", may be null
.nature
- The nature of the metadata, must not be null
.public DefaultMetadata(java.lang.String groupId, java.lang.String artifactId, java.lang.String type, Metadata.Nature nature)
groupId
- The group identifier to which this metadata applies, may be null
.artifactId
- The artifact identifier to which this metadata applies, may be null
.type
- The type of the metadata, e.g. "maven-metadata.xml", may be null
.nature
- The nature of the metadata, must not be null
.public DefaultMetadata(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, Metadata.Nature nature)
groupId
- The group identifier to which this metadata applies, may be null
.artifactId
- The artifact identifier to which this metadata applies, may be null
.version
- The version to which this metadata applies, may be null
.type
- The type of the metadata, e.g. "maven-metadata.xml", may be null
.nature
- The nature of the metadata, must not be null
.public DefaultMetadata(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, Metadata.Nature nature, java.io.File file)
groupId
- The group identifier to which this metadata applies, may be null
.artifactId
- The artifact identifier to which this metadata applies, may be null
.version
- The version to which this metadata applies, may be null
.type
- The type of the metadata, e.g. "maven-metadata.xml", may be null
.nature
- The nature of the metadata, must not be null
.file
- The resolved file of the metadata, may be null
.public DefaultMetadata(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, Metadata.Nature nature, java.util.Map<java.lang.String,java.lang.String> properties, java.io.File file)
groupId
- The group identifier to which this metadata applies, may be null
.artifactId
- The artifact identifier to which this metadata applies, may be null
.version
- The version to which this metadata applies, may be null
.type
- The type of the metadata, e.g. "maven-metadata.xml", may be null
.nature
- The nature of the metadata, must not be null
.properties
- The properties of the metadata, may be null
if none.file
- The resolved file of the metadata, may be null
.DefaultMetadata(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, Metadata.Nature nature, java.io.File file, java.util.Map<java.lang.String,java.lang.String> properties)
private static java.lang.String emptify(java.lang.String str)
public java.lang.String getGroupId()
Metadata
null
.public java.lang.String getArtifactId()
Metadata
null
.public java.lang.String getVersion()
Metadata
null
.public java.lang.String getType()
Metadata
null
.public Metadata.Nature getNature()
Metadata
null
.public java.io.File getFile()
Metadata
null
if none.public java.util.Map<java.lang.String,java.lang.String> getProperties()
Metadata
null
.