org.apache.ivy.core.module.descriptor
Interface ModuleDescriptor

All Superinterfaces:
ExtendableItem
All Known Implementing Classes:
DefaultModuleDescriptor

public interface ModuleDescriptor
extends ExtendableItem

Author:
x.hanin

Field Summary
static java.lang.String CALLER_ALL_CONFIGURATION
           
static java.lang.String DEFAULT_CONFIGURATION
           
 
Method Summary
 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()
           
 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
 DependencyDescriptor[] getDependencies()
           
 java.lang.String getHomePage()
           
 long getLastModified()
           
 License[] getLicenses()
          Returns the licenses of the module described by this descriptor
 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. it is never a latest one.
 java.util.Date getResolvedPublicationDate()
          the publication date of the module revision should be the date at which it has been published, i.e. in general the date of any of its published artifacts, since all published artifact of a module should follow the same publishing cycle.
 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.
 
Methods inherited from interface org.apache.ivy.util.extendable.ExtendableItem
getAttribute, getAttributes, getExtraAttribute, getExtraAttributes, getStandardAttribute, getStandardAttributes
 

Field Detail

DEFAULT_CONFIGURATION

static final java.lang.String DEFAULT_CONFIGURATION
See Also:
Constant Field Values

CALLER_ALL_CONFIGURATION

static final java.lang.String CALLER_ALL_CONFIGURATION
See Also:
Constant Field Values
Method Detail

isDefault

boolean isDefault()
Returns true if this descriptor is a default one, i.e. one generated for a module not actually having one.

Returns:

getModuleRevisionId

ModuleRevisionId getModuleRevisionId()

getResolvedModuleRevisionId

ModuleRevisionId getResolvedModuleRevisionId()
The module revision id returned here is the resolved one, i.e. it is never a latest one. If the revision has not been resolved, a null revision should be returned by getRevision() of the returned ModuleRevisionId. This revision must be the same as the module descriptor resolved revision id unless no module descriptor is defined

Returns:

setResolvedModuleRevisionId

void setResolvedModuleRevisionId(ModuleRevisionId revId)
This method update the resolved module revision id

Parameters:
revId -

setResolvedPublicationDate

void setResolvedPublicationDate(java.util.Date publicationDate)
This method update the resolved publication date

Parameters:
publicationDate -

getStatus

java.lang.String getStatus()

getPublicationDate

java.util.Date getPublicationDate()
may be null if unknown in the descriptor itself

Returns:

getResolvedPublicationDate

java.util.Date getResolvedPublicationDate()
the publication date of the module revision should be the date at which it has been published, i.e. in general the date of any of its published artifacts, since all published artifact of a module should follow the same publishing cycle.


getConfigurations

Configuration[] getConfigurations()
Returns all the configurations declared by this module as an array. This array is never empty (a 'default' conf is assumed when none is declared in the ivy file)

Returns:
all the configurations declared by this module as an array.

getConfigurationsNames

java.lang.String[] getConfigurationsNames()

getPublicConfigurationsNames

java.lang.String[] getPublicConfigurationsNames()

getArtifacts

Artifact[] getArtifacts(java.lang.String conf)

getAllArtifacts

Artifact[] getAllArtifacts()

getDependencies

DependencyDescriptor[] getDependencies()

dependsOn

boolean dependsOn(VersionMatcher matcher,
                  ModuleDescriptor md)
Returns true if the module described by this descriptor dependes directly upon the given module descriptor

Parameters:
md -
Returns:

getConfiguration

Configuration getConfiguration(java.lang.String confName)
Parameters:
confName -
Returns:

getConflictManager

ConflictManager getConflictManager(ModuleId id)
Returns the conflict manager to use for the given ModuleId

Parameters:
id -
Returns:

getLicenses

License[] getLicenses()
Returns the licenses of the module described by this descriptor

Returns:

getHomePage

java.lang.String getHomePage()

getLastModified

long getLastModified()

toIvyFile

void toIvyFile(java.io.File ivyFile)
               throws java.text.ParseException,
                      java.io.IOException
Writes this module descriptor as an ivy file. If this descriptor was obtained through the parsing of an ivy file, it should keep the layout of the file the most possible similar to the original one.

Parameters:
ivyFile - the destination ivy file
Throws:
java.text.ParseException
java.io.IOException

getParser

ModuleDescriptorParser getParser()
The ModuleDescriptorParser used to parse this module descriptor, null is no parser was used.

Returns:

getResource

Resource getResource()
The resource being the source of this module descriptor, null if no resource corresponds to this module descriptor

Returns:

canExclude

boolean canExclude()
Returns true if this descriptor contains any exclusion rule

Returns:
true if this descriptor contains any exclusion rule

doesExclude

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

Parameters:
moduleConfs -
artifactId -
Returns:

getAllExcludeRules

ExcludeRule[] getAllExcludeRules()
Returns an array of all the exclude rules this module descriptor currently holds. Module Descriptor exclude rules are used to exclude (usually transitive) dependencies for the whole module.

Returns:
an array of ExcludeRule this module descriptor holds