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
ConstructorDescriptionDefaultArtifact
(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 Artifact
cloneWithAnotherExt
(Artifact artifact, String newExt) static Artifact
cloneWithAnotherMrid
(Artifact artifact, ModuleRevisionId mrid) static Artifact
cloneWithAnotherName
(Artifact artifact, String name) static Artifact
cloneWithAnotherType
(Artifact artifact, String newType) static Artifact
cloneWithAnotherTypeAndExt
(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.boolean
Returns true if this artifact represents a module metadata artifact, false if it's a published artifactstatic Artifact
newIvyArtifact
(ModuleRevisionId mrid, Date pubDate) static Artifact
newPomArtifact
(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:Artifact
Returns the resolved module revision id for this artifact- Returns:
- the resolved module revision id.
-
getName
Description copied from interface:Artifact
Return 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:Artifact
Returns the resolved publication date for this artifact- Returns:
- the resolved publication date. Never null.
-
getType
Description copied from interface:Artifact
Returns the type of the artifact, typically 'jar', 'source', 'javadoc', 'debian', ...- Returns:
- the type of the artifact. Never null.
-
getExt
Description copied from interface:Artifact
Retrieve 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:Artifact
Return the specific identifier of this artifact.- Returns:
- the id of the artifact
-
getConfigurations
Description copied from interface:Artifact
Returns 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:Artifact
Returns 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:Artifact
Returns 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
-