public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo, DependencyDescriptorMediator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CALLER_ALL_CONFIGURATION |
static java.lang.String |
DEFAULT_CONFIGURATION |
Modifier and Type | Method and Description |
---|---|
boolean |
canExclude()
Returns true if this descriptor contains any exclusion rule
|
boolean |
dependsOn(VersionMatcher matcher,
ModuleDescriptor md)
Returns true if the module described by this descriptor dependes directly upon the given
module descriptor
|
boolean |
doesExclude(java.lang.String[] moduleConfs,
ArtifactId artifactId)
Returns true if an exclude rule of this module attached to any of the given configurations
matches the given artifact id, and thus exclude it
|
Artifact[] |
getAllArtifacts()
Returns all artifacts of this module, excluding the artifact corresponding to the module
descriptor.
|
ModuleRules |
getAllDependencyDescriptorMediators()
Returns all the dependency descriptor mediators used by this
ModuleDescriptor , as an
instance of ModuleRules . |
ExcludeRule[] |
getAllExcludeRules()
Returns an array of all the exclude rules this module descriptor currently holds.
|
Artifact[] |
getArtifacts(java.lang.String conf) |
Configuration |
getConfiguration(java.lang.String confName) |
Configuration[] |
getConfigurations()
Returns all the configurations declared by this module as an array.
|
java.lang.String[] |
getConfigurationsNames() |
ConflictManager |
getConflictManager(ModuleId id)
Returns the conflict manager to use for the given ModuleId, or
null if no
specific conflict manager is associated with the given module id in this module descriptor. |
DependencyDescriptor[] |
getDependencies() |
java.lang.String |
getDescription() |
java.util.Map<java.lang.String,java.lang.String> |
getExtraAttributesNamespaces()
Returns the list of xml namespaces used by extra attributes, as Map from prefix to namespace
URIs.
|
java.util.Map<java.lang.String,java.lang.String> |
getExtraInfo()
Deprecated.
this method is not returning the full content of the extra info: to get the full
structure of the extra infos, use getExtraInfos()
|
ExtraInfoHolder |
getExtraInfoByTagName(java.lang.String tagName)
Returns first extrainfo matching with given tag name
|
java.lang.String |
getExtraInfoContentByTagName(java.lang.String tagName)
Returns content from first extrainfo matching with given tag name
|
java.util.List<ExtraInfoHolder> |
getExtraInfos()
Returns a list of extras infos (tag name, attributes and content).
|
java.lang.String |
getHomePage() |
ExtendsDescriptor[] |
getInheritedDescriptors()
Get the list of parent descriptors imported via an <extends> element.
|
long |
getLastModified() |
License[] |
getLicenses()
Returns the licenses of the module described by this descriptor
|
Artifact |
getMetadataArtifact()
Returns the Artifact representing this module descriptor itself.
|
ModuleRevisionId |
getModuleRevisionId() |
ModuleDescriptorParser |
getParser()
The ModuleDescriptorParser used to parse this module descriptor, null is no parser was used.
|
java.util.Date |
getPublicationDate()
May be
null if unknown in the descriptor itself. |
java.lang.String[] |
getPublicConfigurationsNames() |
ModuleRevisionId |
getResolvedModuleRevisionId()
The module revision id returned here is the resolved one, i.e.
|
java.util.Date |
getResolvedPublicationDate()
The publication date of the module revision should be the date at which it has been
published, i.e.
|
Resource |
getResource()
The resource being the source of this module descriptor, null if no resource corresponds to
this module descriptor
|
java.lang.String |
getStatus() |
boolean |
isDefault()
Returns true if this descriptor is a default one, i.e.
|
void |
setResolvedModuleRevisionId(ModuleRevisionId revId)
This method update the resolved module revision id
|
void |
setResolvedPublicationDate(java.util.Date publicationDate)
This method update the resolved publication date
|
void |
toIvyFile(java.io.File ivyFile)
Writes this module descriptor as an ivy file.
|
getAttribute, getAttributes, getExtraAttribute, getExtraAttributes, getQualifiedExtraAttributes
getRevision
mediate
static final java.lang.String DEFAULT_CONFIGURATION
static final java.lang.String CALLER_ALL_CONFIGURATION
boolean isDefault()
ModuleRevisionId getModuleRevisionId()
ModuleRevisionId getResolvedModuleRevisionId()
void setResolvedModuleRevisionId(ModuleRevisionId revId)
revId
- ExtendsDescriptor[] getInheritedDescriptors()
void setResolvedPublicationDate(java.util.Date publicationDate)
publicationDate
- java.lang.String getStatus()
java.util.Date getPublicationDate()
null
if unknown in the descriptor itself.null
when not knwon.java.util.Date getResolvedPublicationDate()
Configuration[] getConfigurations()
java.lang.String[] getConfigurationsNames()
java.lang.String[] getPublicConfigurationsNames()
Artifact[] getArtifacts(java.lang.String conf)
Artifact[] getAllArtifacts()
getMetadataArtifact()
DependencyDescriptor[] getDependencies()
boolean dependsOn(VersionMatcher matcher, ModuleDescriptor md)
md
- Configuration getConfiguration(java.lang.String confName)
confName
- ConflictManager getConflictManager(ModuleId id)
null
if no
specific conflict manager is associated with the given module id in this module descriptor.id
- License[] getLicenses()
java.lang.String getHomePage()
java.lang.String getDescription()
long getLastModified()
getLastModified
in interface ArtifactInfo
void toIvyFile(java.io.File ivyFile) throws java.text.ParseException, java.io.IOException
ivyFile
- the destination ivy filejava.text.ParseException
java.io.IOException
ModuleDescriptorParser getParser()
Resource getResource()
Artifact getMetadataArtifact()
Even though the module descriptor is never described as a published artifact of a module in the module descriptor itself, it is often useful to consider it as any other artifact of the module. This method allows to access to the Artifact object representing this module descriptor for this purpose.
boolean canExclude()
boolean doesExclude(java.lang.String[] moduleConfs, ArtifactId artifactId)
moduleConfs
- artifactId
- ExcludeRule[] getAllExcludeRules()
ExcludeRule
this module descriptor holdsModuleRules getAllDependencyDescriptorMediators()
ModuleDescriptor
, as an
instance of ModuleRules
.
All rules in the ModuleRules
object returned are DependencyDescriptorMediator
.
ModuleDescriptor
.java.util.Map<java.lang.String,java.lang.String> getExtraAttributesNamespaces()
The returned list is never null
, it is empty when no extra attribute is used or
if extra attributes are used without xml namespaces
@Deprecated java.util.Map<java.lang.String,java.lang.String> getExtraInfo()
java.util.List<ExtraInfoHolder> getExtraInfos()
java.lang.String getExtraInfoContentByTagName(java.lang.String tagName)
ExtraInfoHolder getExtraInfoByTagName(java.lang.String tagName)