|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ivy.core.module.descriptor.DefaultModuleDescriptor
public class DefaultModuleDescriptor
Field Summary |
---|
Fields inherited from interface org.apache.ivy.core.module.descriptor.ModuleDescriptor |
---|
CALLER_ALL_CONFIGURATION, DEFAULT_CONFIGURATION |
Constructor Summary | |
---|---|
DefaultModuleDescriptor(ModuleDescriptorParser parser,
Resource res)
IMPORTANT : at least call setModuleRevisionId and setResolvedPublicationDate with instances created by this constructor ! |
|
DefaultModuleDescriptor(ModuleRevisionId id,
java.lang.String status,
java.util.Date pubDate)
|
|
DefaultModuleDescriptor(ModuleRevisionId id,
java.lang.String status,
java.util.Date pubDate,
boolean isDefault)
|
Method Summary | |
---|---|
void |
addArtifact(java.lang.String conf,
Artifact artifact)
Artifact configurations are not used since added artifact may not be entirely completed, so its configurations data may not be accurate |
void |
addConfiguration(Configuration conf)
|
void |
addConflictManager(ModuleId moduleId,
PatternMatcher matcher,
ConflictManager manager)
regular expressions as explained in Pattern class may be used in ModuleId organisation and name |
void |
addDependency(DependencyDescriptor dependency)
|
void |
addExcludeRule(ExcludeRule rule)
|
void |
addLicense(License license)
|
boolean |
canExclude()
Returns true if this descriptor contains any exclusion rule |
void |
check()
Throws an exception if the module descriptor is inconsistent For the moment, only extended configurations existence is checked |
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[] moduleConfigurations,
ArtifactId artifactId)
only works when namespace is properly set. |
Artifact[] |
getAllArtifacts()
|
ExcludeRule[] |
getAllExcludeRules()
Returns an array of all the exclude rules this module descriptor currently holds. |
Artifact[] |
getArtifacts(java.lang.String conf)
|
java.lang.String |
getAttribute(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 |
getAttributes()
Returns a Map of all attributes of this extendable item, including standard and extra ones. |
Configuration |
getConfiguration(java.lang.String confName)
Returns the configuration object with the given name in the current module descriptor, null if not found. |
Configuration[] |
getConfigurations()
Returns all the configurations declared by this module as an array. |
java.lang.String[] |
getConfigurationsNames()
|
ConflictManager |
getConflictManager(ModuleId moduleId)
Returns the conflict manager to use for the given ModuleId |
DependencyDescriptor[] |
getDependencies()
|
ExcludeRule[] |
getExcludeRules(java.lang.String[] moduleConfigurations)
|
java.lang.String |
getExtraAttribute(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 |
getExtraAttributes()
Returns a Map of all extra attributes of this extendable item. |
java.lang.String |
getHomePage()
|
long |
getLastModified()
|
License[] |
getLicenses()
Returns the licenses of the module described by this descriptor |
ModuleRevisionId |
getModuleRevisionId()
|
Namespace |
getNamespace()
|
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 |
getStandardAttribute(java.lang.String attName)
Gets the value of a standard attribute Can be used only to access the value of a standard attribute (like organisation, revision), not an extra one |
java.util.Map |
getStandardAttributes()
Returns a Map of all standard attributes of this extendable item. |
java.lang.String |
getStatus()
|
boolean |
isDefault()
Returns true if this descriptor is a default one, i.e. |
boolean |
isMappingOverride()
|
boolean |
isNamespaceUseful()
|
static DefaultModuleDescriptor |
newBasicInstance(ModuleRevisionId mrid,
java.util.Date publicationDate)
|
static DefaultModuleDescriptor |
newCallerInstance(ModuleRevisionId[] mrid,
boolean transitive,
boolean changing)
|
static DefaultModuleDescriptor |
newCallerInstance(ModuleRevisionId mrid,
java.lang.String[] confs,
boolean transitive,
boolean changing)
|
static DefaultModuleDescriptor |
newDefaultInstance(ModuleRevisionId mrid)
|
static DefaultModuleDescriptor |
newDefaultInstance(ModuleRevisionId mrid,
DependencyArtifactDescriptor[] artifacts)
|
void |
setDefault(boolean b)
|
void |
setHomePage(java.lang.String homePage)
|
void |
setLastModified(long lastModified)
|
void |
setMappingOverride(boolean override)
|
void |
setModuleRevisionId(ModuleRevisionId revId)
|
void |
setNamespace(Namespace ns)
|
void |
setPublicationDate(java.util.Date publicationDate)
|
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 |
setStatus(java.lang.String status)
|
void |
toIvyFile(java.io.File destFile)
Writes this module descriptor as an ivy file. |
java.lang.String |
toString()
|
static ModuleDescriptor |
transformInstance(ModuleDescriptor md,
Namespace ns)
Transforms the given module descriptor of the given namespace and return a new module descriptor in the system namespace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultModuleDescriptor(ModuleRevisionId id, java.lang.String status, java.util.Date pubDate)
public DefaultModuleDescriptor(ModuleRevisionId id, java.lang.String status, java.util.Date pubDate, boolean isDefault)
public DefaultModuleDescriptor(ModuleDescriptorParser parser, Resource res)
Method Detail |
---|
public static DefaultModuleDescriptor newDefaultInstance(ModuleRevisionId mrid)
public static DefaultModuleDescriptor newCallerInstance(ModuleRevisionId mrid, java.lang.String[] confs, boolean transitive, boolean changing)
public static DefaultModuleDescriptor newCallerInstance(ModuleRevisionId[] mrid, boolean transitive, boolean changing)
public static DefaultModuleDescriptor newDefaultInstance(ModuleRevisionId mrid, DependencyArtifactDescriptor[] artifacts)
public static DefaultModuleDescriptor newBasicInstance(ModuleRevisionId mrid, java.util.Date publicationDate)
public static ModuleDescriptor transformInstance(ModuleDescriptor md, Namespace ns)
md
- ns
-
public boolean isDefault()
ModuleDescriptor
isDefault
in interface ModuleDescriptor
public void setPublicationDate(java.util.Date publicationDate)
public java.util.Date getPublicationDate()
ModuleDescriptor
getPublicationDate
in interface ModuleDescriptor
public void setResolvedPublicationDate(java.util.Date publicationDate)
ModuleDescriptor
setResolvedPublicationDate
in interface ModuleDescriptor
public java.util.Date getResolvedPublicationDate()
ModuleDescriptor
getResolvedPublicationDate
in interface ModuleDescriptor
public void setModuleRevisionId(ModuleRevisionId revId)
public void setResolvedModuleRevisionId(ModuleRevisionId revId)
ModuleDescriptor
setResolvedModuleRevisionId
in interface ModuleDescriptor
public void setStatus(java.lang.String status)
public void addDependency(DependencyDescriptor dependency)
public void addConfiguration(Configuration conf)
public void addArtifact(java.lang.String conf, Artifact artifact)
conf
- artifact
- public ModuleRevisionId getModuleRevisionId()
getModuleRevisionId
in interface ModuleDescriptor
public ModuleRevisionId getResolvedModuleRevisionId()
ModuleDescriptor
getResolvedModuleRevisionId
in interface ModuleDescriptor
public java.lang.String getStatus()
getStatus
in interface ModuleDescriptor
public Configuration[] getConfigurations()
ModuleDescriptor
getConfigurations
in interface ModuleDescriptor
public java.lang.String[] getConfigurationsNames()
getConfigurationsNames
in interface ModuleDescriptor
public java.lang.String[] getPublicConfigurationsNames()
getPublicConfigurationsNames
in interface ModuleDescriptor
public Configuration getConfiguration(java.lang.String confName)
getConfiguration
in interface ModuleDescriptor
public Artifact[] getArtifacts(java.lang.String conf)
getArtifacts
in interface ModuleDescriptor
public Artifact[] getAllArtifacts()
getAllArtifacts
in interface ModuleDescriptor
public DependencyDescriptor[] getDependencies()
getDependencies
in interface ModuleDescriptor
public boolean dependsOn(VersionMatcher matcher, ModuleDescriptor md)
ModuleDescriptor
dependsOn
in interface ModuleDescriptor
public void toIvyFile(java.io.File destFile) throws java.text.ParseException, java.io.IOException
ModuleDescriptor
toIvyFile
in interface ModuleDescriptor
destFile
- the destination ivy file
java.text.ParseException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public void setDefault(boolean b)
public void addConflictManager(ModuleId moduleId, PatternMatcher matcher, ConflictManager manager)
moduleId
- matcher
- resolverName
- public ConflictManager getConflictManager(ModuleId moduleId)
ModuleDescriptor
getConflictManager
in interface ModuleDescriptor
public void addLicense(License license)
public License[] getLicenses()
ModuleDescriptor
getLicenses
in interface ModuleDescriptor
public java.lang.String getHomePage()
getHomePage
in interface ModuleDescriptor
public void setHomePage(java.lang.String homePage)
public long getLastModified()
getLastModified
in interface ModuleDescriptor
public void setLastModified(long lastModified)
public Namespace getNamespace()
public boolean isNamespaceUseful()
public void setNamespace(Namespace ns)
public void check()
public void setMappingOverride(boolean override)
public boolean isMappingOverride()
public java.lang.String getAttribute(java.lang.String attName)
ExtendableItem
getAttribute
in interface ExtendableItem
attName
- the name of the attribute to get
public java.util.Map getAttributes()
ExtendableItem
getAttributes
in interface ExtendableItem
public java.lang.String getExtraAttribute(java.lang.String attName)
ExtendableItem
getExtraAttribute
in interface ExtendableItem
attName
- the name of the extra attribute to get
public java.util.Map getExtraAttributes()
ExtendableItem
getExtraAttributes
in interface ExtendableItem
public java.lang.String getStandardAttribute(java.lang.String attName)
ExtendableItem
getStandardAttribute
in interface ExtendableItem
attName
- the name of the standard attribute to get
public java.util.Map getStandardAttributes()
ExtendableItem
getStandardAttributes
in interface ExtendableItem
public ModuleDescriptorParser getParser()
ModuleDescriptor
getParser
in interface ModuleDescriptor
public Resource getResource()
ModuleDescriptor
getResource
in interface ModuleDescriptor
public void addExcludeRule(ExcludeRule rule)
public boolean canExclude()
ModuleDescriptor
canExclude
in interface ModuleDescriptor
public boolean doesExclude(java.lang.String[] moduleConfigurations, ArtifactId artifactId)
doesExclude
in interface ModuleDescriptor
public ExcludeRule[] getAllExcludeRules()
ModuleDescriptor
getAllExcludeRules
in interface ModuleDescriptor
ExcludeRule
this module descriptor holdspublic ExcludeRule[] getExcludeRules(java.lang.String[] moduleConfigurations)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |