Class MDArtifact
- java.lang.Object
-
- org.apache.ivy.core.module.descriptor.AbstractArtifact
-
- org.apache.ivy.core.module.descriptor.MDArtifact
-
- All Implemented Interfaces:
Artifact,ExtendableItem
public class MDArtifact extends AbstractArtifact
-
-
Constructor Summary
Constructors Constructor Description MDArtifact(ModuleDescriptor md, java.lang.String name, java.lang.String type, java.lang.String ext)MDArtifact(ModuleDescriptor md, java.lang.String name, java.lang.String type, java.lang.String ext, boolean isMetadata)MDArtifact(ModuleDescriptor md, java.lang.String name, java.lang.String type, java.lang.String ext, java.net.URL url, java.util.Map<java.lang.String,java.lang.String> extraAttributes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConfiguration(java.lang.String conf)java.lang.String[]getConfigurations()Returns the list of configurations where this artifact is associated to.java.lang.StringgetExt()Retrieve the extension of the artifact.ArtifactRevisionIdgetId()Return the specific identifier of this artifact.ModuleRevisionIdgetModuleRevisionId()Returns the resolved module revision id for this artifactjava.lang.StringgetName()Return the name of the artifact, generally 'part' of the basename of the file.java.util.DategetPublicationDate()Returns the resolved publication date for this artifactjava.lang.StringgetType()Returns the type of the artifact, typically 'jar', 'source', 'javadoc', 'debian', ...java.net.URLgetUrl()Returns the url at which this artifact can be found independently of ivy configuration.booleanisMetadata()Returns true if this artifact represents a module metadata artifact, false if it's a published artifactstatic ArtifactnewIvyArtifact(ModuleDescriptor md)-
Methods inherited from class org.apache.ivy.core.module.descriptor.AbstractArtifact
equals, getAttribute, getAttributes, getExtraAttribute, getExtraAttributes, getQualifiedExtraAttributes, hashCode, toString
-
-
-
-
Constructor Detail
-
MDArtifact
public MDArtifact(ModuleDescriptor md, java.lang.String name, java.lang.String type, java.lang.String ext)
-
MDArtifact
public MDArtifact(ModuleDescriptor md, java.lang.String name, java.lang.String type, java.lang.String ext, boolean isMetadata)
-
MDArtifact
public MDArtifact(ModuleDescriptor md, java.lang.String name, java.lang.String type, java.lang.String ext, java.net.URL url, java.util.Map<java.lang.String,java.lang.String> extraAttributes)
-
-
Method Detail
-
newIvyArtifact
public static Artifact newIvyArtifact(ModuleDescriptor md)
-
getModuleRevisionId
public ModuleRevisionId getModuleRevisionId()
Description copied from interface:ArtifactReturns the resolved module revision id for this artifact- Returns:
- the resolved module revision id.
-
getPublicationDate
public java.util.Date getPublicationDate()
Description copied from interface:ArtifactReturns the resolved publication date for this artifact- Returns:
- the resolved publication date. Never null.
-
getId
public ArtifactRevisionId getId()
Description copied from interface:ArtifactReturn the specific identifier of this artifact.- Returns:
- the id of the artifact
-
getName
public java.lang.String getName()
Description copied from interface:ArtifactReturn the name of the artifact, generally 'part' of the basename of the file.- Returns:
- the name of the artifact. Never null.
-
getType
public java.lang.String getType()
Description copied from interface:ArtifactReturns the type of the artifact, typically 'jar', 'source', 'javadoc', 'debian', ...- Returns:
- the type of the artifact. Never null.
-
getExt
public java.lang.String getExt()
Description copied from interface:ArtifactRetrieve the extension of the artifact. The extension is without dot (ie. 'jar' and not '.jar')- Returns:
- the extension of the artifact. Never null.
-
getConfigurations
public java.lang.String[] getConfigurations()
Description copied from interface:ArtifactReturns the list of configurations where this artifact is associated to.- Returns:
- the list of configuration this artifact is associated to. Never null.
-
addConfiguration
public void addConfiguration(java.lang.String conf)
-
getUrl
public java.net.URL getUrl()
Description copied from interface:ArtifactReturns the url at which this artifact can be found independently of ivy configuration. This can be null (and is usually for standard artifacts)- Returns:
- url at which this artifact can be found independently of ivy configuration
-
isMetadata
public boolean isMetadata()
Description copied from interface:ArtifactReturns true if this artifact represents a module metadata artifact, false if it's a published artifact- Returns:
- true if this artifact represents a module metadata artifact, false if it's a published artifact
-
-