Package org.apache.ivy.ant
Class IvyPublish.PublishArtifact
- java.lang.Object
-
- org.apache.ivy.ant.IvyPublish.PublishArtifact
-
- All Implemented Interfaces:
Artifact,ExtendableItem,org.apache.tools.ant.DynamicAttribute
- Enclosing class:
- IvyPublish
public class IvyPublish.PublishArtifact extends java.lang.Object implements Artifact, org.apache.tools.ant.DynamicAttribute
-
-
Constructor Summary
Constructors Constructor Description PublishArtifact()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAttribute(java.lang.String attName)Gets the value of an attribute Can be used to access the value of a standard attribute (like organisation, revision) or of an extra attribute.java.util.Map<java.lang.String,java.lang.String>getAttributes()Returns a Map of all attributes of this extendable item, including standard and extra ones.java.lang.String[]getConfigurations()Returns the list of configurations where this artifact is associated to.java.lang.StringgetExt()Retrieve the extension of the artifact.java.lang.StringgetExtraAttribute(java.lang.String attName)Gets the value of an extra attribute Can be used only to access the value of an extra attribute, not a standard one (like organisation, revision)java.util.Map<java.lang.String,java.lang.String>getExtraAttributes()Returns a Map of all extra attributes of this extendable item.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.util.Map<java.lang.String,java.lang.String>getQualifiedExtraAttributes()Returns a Map of all extra attributes of this extendable item.java.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 artifactvoidsetDynamicAttribute(java.lang.String name, java.lang.String value)voidsetExt(java.lang.String ext)voidsetName(java.lang.String name)voidsetType(java.lang.String type)
-
-
-
Method Detail
-
getConfigurations
public java.lang.String[] getConfigurations()
Description copied from interface:ArtifactReturns the list of configurations where this artifact is associated to.- Specified by:
getConfigurationsin interfaceArtifact- Returns:
- the list of configuration this artifact is associated to. 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')
-
getId
public ArtifactRevisionId getId()
Description copied from interface:ArtifactReturn the specific identifier of this artifact.
-
getModuleRevisionId
public ModuleRevisionId getModuleRevisionId()
Description copied from interface:ArtifactReturns the resolved module revision id for this artifact- Specified by:
getModuleRevisionIdin interfaceArtifact- Returns:
- the resolved module revision id.
-
getName
public java.lang.String getName()
Description copied from interface:ArtifactReturn the name of the artifact, generally 'part' of the basename of the file.
-
getPublicationDate
public java.util.Date getPublicationDate()
Description copied from interface:ArtifactReturns the resolved publication date for this artifact- Specified by:
getPublicationDatein interfaceArtifact- Returns:
- the resolved publication date. Never null.
-
getType
public java.lang.String getType()
Description copied from interface:ArtifactReturns the type of the artifact, typically 'jar', 'source', 'javadoc', 'debian', ...
-
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)
-
setExt
public void setExt(java.lang.String ext)
-
setName
public void setName(java.lang.String name)
-
setType
public void setType(java.lang.String type)
-
getAttribute
public java.lang.String getAttribute(java.lang.String attName)
Description copied from interface:ExtendableItemGets the value of an attribute Can be used to access the value of a standard attribute (like organisation, revision) or of an extra attribute.- Specified by:
getAttributein interfaceExtendableItem- Parameters:
attName- the name of the attribute to get- Returns:
- the value of the attribute, null if the attribute doesn't exist
-
getAttributes
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Description copied from interface:ExtendableItemReturns a Map of all attributes of this extendable item, including standard and extra ones. The Map keys are attribute names as Strings, and values are corresponding attribute values (as String too). Extra attributes are included in unqualified form only.- Specified by:
getAttributesin interfaceExtendableItem- Returns:
- A Map instance containing all the attributes and their values.
-
getExtraAttribute
public java.lang.String getExtraAttribute(java.lang.String attName)
Description copied from interface:ExtendableItemGets the value of an extra attribute Can be used only to access the value of an extra attribute, not a standard one (like organisation, revision)- Specified by:
getExtraAttributein interfaceExtendableItem- Parameters:
attName- the name of the extra attribute to get. This name can be either qualified or unqualified.- Returns:
- the value of the attribute, null if the attribute doesn't exist
-
getExtraAttributes
public java.util.Map<java.lang.String,java.lang.String> getExtraAttributes()
Description copied from interface:ExtendableItemReturns a Map of all extra attributes of this extendable item. The Map keys are unqualified attribute names as Strings, and values are corresponding attribute values (as String too)- Specified by:
getExtraAttributesin interfaceExtendableItem- Returns:
- A Map instance containing all the extra attributes and their values.
- See Also:
ExtendableItem.getQualifiedExtraAttributes()
-
getQualifiedExtraAttributes
public java.util.Map<java.lang.String,java.lang.String> getQualifiedExtraAttributes()
Description copied from interface:ExtendableItemReturns a Map of all extra attributes of this extendable item.The Map keys are qualified attribute names as Strings, and values are corresponding attribute values (as String too).
An attribute name is qualified with a namespace exactly the same way xml attributes are qualified. Thus qualified attribute names are of the form
prefix:name- Specified by:
getQualifiedExtraAttributesin interfaceExtendableItem- Returns:
- A Map instance containing all the extra attributes and their values.
- See Also:
ExtendableItem.getExtraAttributes()
-
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- Specified by:
isMetadatain interfaceArtifact- Returns:
- true if this artifact represents a module metadata artifact, false if it's a published artifact
-
setDynamicAttribute
public void setDynamicAttribute(java.lang.String name, java.lang.String value)- Specified by:
setDynamicAttributein interfaceorg.apache.tools.ant.DynamicAttribute
-
-