|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor
public class DefaultDependencyDescriptor
This class can be used as the default implementation for DependencyDescriptor. It implements required methods and enables to fill dependency information with the addDependencyConfiguration method.
| Constructor Summary | |
|---|---|
DefaultDependencyDescriptor(ModuleDescriptor md,
ModuleRevisionId mrid,
boolean force,
boolean changing,
boolean transitive)
|
|
DefaultDependencyDescriptor(ModuleDescriptor md,
ModuleRevisionId mrid,
ModuleRevisionId dynamicConstraint,
boolean force,
boolean changing,
boolean transitive)
|
|
DefaultDependencyDescriptor(ModuleRevisionId mrid,
boolean force)
|
|
DefaultDependencyDescriptor(ModuleRevisionId mrid,
boolean force,
boolean changing)
|
|
| Method Summary | |
|---|---|
void |
addDependencyArtifact(java.lang.String masterConf,
DependencyArtifactDescriptor dad)
|
void |
addDependencyConfiguration(java.lang.String masterConf,
java.lang.String depConf)
|
void |
addExcludeRule(java.lang.String masterConf,
ExcludeRule rule)
|
void |
addIncludeRule(java.lang.String masterConf,
IncludeRule rule)
|
DependencyDescriptor |
asSystem()
|
boolean |
canExclude()
Returns true if this descriptor contains any exclusion rule |
DependencyDescriptor |
clone(ModuleRevisionId revision)
Clones current dependency descriptor with another revision. |
boolean |
doesExclude(java.lang.String[] moduleConfigurations,
ArtifactId artifactId)
only works when namespace is properly set. |
DependencyArtifactDescriptor[] |
getAllDependencyArtifacts()
|
ExcludeRule[] |
getAllExcludeRules()
|
IncludeRule[] |
getAllIncludeRules()
|
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. |
DependencyArtifactDescriptor[] |
getDependencyArtifacts(java.lang.String moduleConfiguration)
|
DependencyArtifactDescriptor[] |
getDependencyArtifacts(java.lang.String[] moduleConfigurations)
|
java.lang.String[] |
getDependencyConfigurations(java.lang.String moduleConfiguration)
|
java.lang.String[] |
getDependencyConfigurations(java.lang.String[] moduleConfigurations)
|
java.lang.String[] |
getDependencyConfigurations(java.lang.String moduleConfiguration,
java.lang.String requestedConfiguration)
Return the dependency configurations mapped to the given moduleConfiguration, actually resolved because of the given requestedConfiguration Usually requestedConfiguration and moduleConfiguration are the same, except when a conf extends another, then the moduleConfiguration is the configuration currently resolved (the extended one), and requestedConfiguration is the one actually requested initially (the extending one). |
ModuleId |
getDependencyId()
|
ModuleRevisionId |
getDependencyRevisionId()
Returns the constraint on dependency this descriptor represents. |
ModuleRevisionId |
getDynamicConstraintDependencyRevisionId()
Returns the dynamic constraint on dependency this descriptor represents. |
ExcludeRule[] |
getExcludeRules(java.lang.String moduleConfiguration)
|
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. |
IncludeRule[] |
getIncludeRules(java.lang.String moduleConfiguration)
|
IncludeRule[] |
getIncludeRules(java.lang.String[] moduleConfigurations)
|
java.lang.String[] |
getModuleConfigurations()
|
Namespace |
getNamespace()
|
ModuleRevisionId |
getParentRevisionId()
|
java.util.Map |
getQualifiedExtraAttributes()
Returns a Map of all extra attributes of this extendable item. |
ModuleRevisionId |
getSourceModule()
|
boolean |
isChanging()
Used to indicate that this dependency is a changing one. |
boolean |
isForce()
Used to indicate that this revision must be used in case of conflicts, independently of conflicts manager. |
boolean |
isTransitive()
|
protected static java.lang.String |
replaceFallbackConfigurationPattern(java.util.regex.Pattern pattern,
java.lang.String conf,
java.lang.String moduleConfiguration)
Replaces fallback patterns with correct values if fallback pattern exists. |
protected static java.lang.String |
replaceSelfFallbackPattern(java.lang.String conf,
java.lang.String moduleConfiguration)
|
protected static java.lang.String |
replaceThisFallbackPattern(java.lang.String conf,
java.lang.String requestedConfiguration)
|
java.lang.String |
toString()
|
static DependencyDescriptor |
transformInstance(DependencyDescriptor dd,
Namespace ns)
Transforms the given dependency descriptor of the given namespace and return a new dependency descriptor in the system namespace. |
static DefaultDependencyDescriptor |
transformInstance(DependencyDescriptor dd,
NamespaceTransformer t,
boolean fromSystem)
Transforms a dependency descriptor using the given transformer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultDependencyDescriptor(ModuleDescriptor md,
ModuleRevisionId mrid,
boolean force,
boolean changing,
boolean transitive)
public DefaultDependencyDescriptor(ModuleRevisionId mrid,
boolean force)
public DefaultDependencyDescriptor(ModuleRevisionId mrid,
boolean force,
boolean changing)
public DefaultDependencyDescriptor(ModuleDescriptor md,
ModuleRevisionId mrid,
ModuleRevisionId dynamicConstraint,
boolean force,
boolean changing,
boolean transitive)
| Method Detail |
|---|
public static DependencyDescriptor transformInstance(DependencyDescriptor dd,
Namespace ns)
dd - ns -
public static DefaultDependencyDescriptor transformInstance(DependencyDescriptor dd,
NamespaceTransformer t,
boolean fromSystem)
dd - t -
public ModuleId getDependencyId()
getDependencyId in interface DependencyDescriptorpublic ModuleRevisionId getDependencyRevisionId()
DependencyDescriptor
getDependencyRevisionId in interface DependencyDescriptorpublic ModuleRevisionId getDynamicConstraintDependencyRevisionId()
DependencyDescriptor
getDynamicConstraintDependencyRevisionId in interface DependencyDescriptorpublic java.lang.String[] getModuleConfigurations()
getModuleConfigurations in interface DependencyDescriptorpublic java.lang.String[] getDependencyConfigurations(java.lang.String moduleConfiguration)
getDependencyConfigurations in interface DependencyDescriptor
public java.lang.String[] getDependencyConfigurations(java.lang.String moduleConfiguration,
java.lang.String requestedConfiguration)
getDependencyConfigurations in interface DependencyDescriptor
protected static java.lang.String replaceSelfFallbackPattern(java.lang.String conf,
java.lang.String moduleConfiguration)
protected static java.lang.String replaceThisFallbackPattern(java.lang.String conf,
java.lang.String requestedConfiguration)
protected static java.lang.String replaceFallbackConfigurationPattern(java.util.regex.Pattern pattern,
java.lang.String conf,
java.lang.String moduleConfiguration)
pattern - pattern to look forconf - configuration mapping from dependency elementmoduleConfiguration - module's configuration to use for replacement
public java.lang.String[] getDependencyConfigurations(java.lang.String[] moduleConfigurations)
getDependencyConfigurations in interface DependencyDescriptorpublic DependencyArtifactDescriptor[] getDependencyArtifacts(java.lang.String moduleConfiguration)
getDependencyArtifacts in interface DependencyDescriptorpublic IncludeRule[] getIncludeRules(java.lang.String moduleConfiguration)
getIncludeRules in interface DependencyDescriptorpublic ExcludeRule[] getExcludeRules(java.lang.String moduleConfiguration)
getExcludeRules in interface DependencyDescriptorpublic DependencyArtifactDescriptor[] getDependencyArtifacts(java.lang.String[] moduleConfigurations)
getDependencyArtifacts in interface DependencyDescriptorpublic IncludeRule[] getIncludeRules(java.lang.String[] moduleConfigurations)
getIncludeRules in interface DependencyDescriptorpublic ExcludeRule[] getExcludeRules(java.lang.String[] moduleConfigurations)
getExcludeRules in interface DependencyDescriptorpublic DependencyArtifactDescriptor[] getAllDependencyArtifacts()
getAllDependencyArtifacts in interface DependencyDescriptorpublic IncludeRule[] getAllIncludeRules()
getAllIncludeRules in interface DependencyDescriptorpublic ExcludeRule[] getAllExcludeRules()
getAllExcludeRules in interface DependencyDescriptor
public void addDependencyConfiguration(java.lang.String masterConf,
java.lang.String depConf)
public void addDependencyArtifact(java.lang.String masterConf,
DependencyArtifactDescriptor dad)
public void addIncludeRule(java.lang.String masterConf,
IncludeRule rule)
public void addExcludeRule(java.lang.String masterConf,
ExcludeRule rule)
public boolean doesExclude(java.lang.String[] moduleConfigurations,
ArtifactId artifactId)
doesExclude in interface DependencyDescriptorpublic boolean canExclude()
canExclude in interface DependencyDescriptorpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isForce()
DependencyDescriptor
isForce in interface DependencyDescriptorpublic ModuleRevisionId getParentRevisionId()
getParentRevisionId in interface DependencyDescriptorpublic boolean isChanging()
DependencyDescriptor
isChanging in interface DependencyDescriptorpublic boolean isTransitive()
isTransitive in interface DependencyDescriptorpublic Namespace getNamespace()
getNamespace in interface DependencyDescriptorpublic java.lang.String getAttribute(java.lang.String attName)
ExtendableItem
getAttribute in interface ExtendableItemattName - the name of the attribute to get
public java.util.Map getAttributes()
ExtendableItem
getAttributes in interface ExtendableItempublic java.lang.String getExtraAttribute(java.lang.String attName)
ExtendableItem
getExtraAttribute in interface ExtendableItemattName - the name of the extra attribute to get. This name can be either qualified or
unqualified.
public java.util.Map getExtraAttributes()
ExtendableItem
getExtraAttributes in interface ExtendableItemExtendableItem.getQualifiedExtraAttributes()public java.util.Map getQualifiedExtraAttributes()
ExtendableItemThe 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
getQualifiedExtraAttributes in interface ExtendableItemExtendableItem.getExtraAttributes()public DependencyDescriptor asSystem()
asSystem in interface DependencyDescriptorpublic ModuleRevisionId getSourceModule()
getSourceModule in interface InheritableItempublic DependencyDescriptor clone(ModuleRevisionId revision)
DependencyDescriptor
clone in interface DependencyDescriptorrevision - the revision of the cloned dependency descriptor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||