public class Artifact extends Object implements Comparable<Artifact>
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_ALIAS
Can be used in artifact metadata to specify an alias.
|
static String |
KEY_FEATURE_ORIGINS |
static String |
KEY_START_ORDER
This key might be used by bundles to define the start order.
|
| Constructor and Description |
|---|
Artifact(ArtifactId id)
Construct a new artifact
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Artifact o) |
Artifact |
copy(ArtifactId id)
Create a copy of the artifact with a different id
|
boolean |
equals(Object obj) |
Set<ArtifactId> |
getAliases(boolean includeMain)
Obtain the alias or aliases for the artifact.
|
ArtifactId[] |
getFeatureOrigins() |
ArtifactId |
getId()
Get the id of the artifact.
|
Map<String,String> |
getMetadata()
Get the metadata of the artifact.
|
int |
getStartOrder()
Get the start order of the artifact.
|
int |
hashCode() |
void |
setFeatureOrigins(ArtifactId... featureOrigins) |
void |
setStartOrder(int startOrder)
Set the start order of the artifact
This is a convenience method which sets the value of the property named
#KEY_START_ORDER from the metadata. |
String |
toString() |
public static final String KEY_ALIAS
public static final String KEY_START_ORDER
public static final String KEY_FEATURE_ORIGINS
public Artifact(ArtifactId id)
id - The id of the artifact.IllegalArgumentException - If id is null.public ArtifactId getId()
public Map<String,String> getMetadata()
public Set<ArtifactId> getAliases(boolean includeMain)
includeMain - Whether to include the main ID in the result.public int getStartOrder()
#KEY_START_ORDER from the metadata.0 is returned.NumberFormatException - If the stored metadata is not a numberIllegalStateException - If the stored metadata is a negative numberpublic void setStartOrder(int startOrder)
#KEY_START_ORDER from the metadata.startOrder - The start orderIllegalArgumentException - If the number is negativepublic ArtifactId[] getFeatureOrigins()
public void setFeatureOrigins(ArtifactId... featureOrigins)
public int compareTo(Artifact o)
compareTo in interface Comparable<Artifact>public Artifact copy(ArtifactId id)
id - The new idCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.