Class DefaultArtifact
java.lang.Object
org.apache.ivy.core.module.descriptor.AbstractArtifact
org.apache.ivy.core.module.descriptor.DefaultArtifact
- All Implemented Interfaces:
Artifact,ExtendableItem
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultArtifact(ArtifactRevisionId arid, Date publicationDate, URL url, boolean isMetadata) DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext) DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext, boolean isMetadata) DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext, URL url, Map<String, String> extraAttributes) DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext, Map<String, String> extraAttributes) -
Method Summary
Modifier and TypeMethodDescriptionstatic ArtifactcloneWithAnotherExt(Artifact artifact, String newExt) static ArtifactcloneWithAnotherMrid(Artifact artifact, ModuleRevisionId mrid) static ArtifactcloneWithAnotherName(Artifact artifact, String name) static ArtifactcloneWithAnotherType(Artifact artifact, String newType) static ArtifactcloneWithAnotherTypeAndExt(Artifact artifact, String newType, String newExt) String[]Returns the list of configurations where this artifact is associated to.getExt()Retrieve the extension of the artifact.getId()Return the specific identifier of this artifact.Returns the resolved module revision id for this artifactgetName()Return the name of the artifact, generally 'part' of the basename of the file.Returns the resolved publication date for this artifactgetType()Returns the type of the artifact, typically 'jar', 'source', 'javadoc', 'debian', ...getUrl()Returns the url at which this artifact can be found independently of ivy configuration.booleanReturns true if this artifact represents a module metadata artifact, false if it's a published artifactstatic ArtifactnewIvyArtifact(ModuleRevisionId mrid, Date pubDate) static ArtifactnewPomArtifact(ModuleRevisionId mrid, Date pubDate) Methods inherited from class org.apache.ivy.core.module.descriptor.AbstractArtifact
equals, getAttribute, getAttributes, getExtraAttribute, getExtraAttributes, getQualifiedExtraAttributes, hashCode, toString
-
Constructor Details
-
DefaultArtifact
public DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext) -
DefaultArtifact
public DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext, boolean isMetadata) -
DefaultArtifact
-
DefaultArtifact
-
DefaultArtifact
-
-
Method Details
-
newIvyArtifact
-
newPomArtifact
-
cloneWithAnotherExt
-
cloneWithAnotherType
-
cloneWithAnotherTypeAndExt
-
cloneWithAnotherName
-
cloneWithAnotherMrid
-
getModuleRevisionId
Description copied from interface:ArtifactReturns the resolved module revision id for this artifact- Returns:
- the resolved module revision id.
-
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.
-
getPublicationDate
Description copied from interface:ArtifactReturns the resolved publication date for this artifact- Returns:
- the resolved publication date. Never null.
-
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
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.
-
getId
Description copied from interface:ArtifactReturn the specific identifier of this artifact.- Returns:
- the id of the artifact
-
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.
-
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
-