Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.jayasoft.ivy
Class DefaultDependencyDescriptor

    java.lang.Object
      fr.jayasoft.ivy.DefaultDependencyDescriptor

All Implemented Interfaces:
  DependencyDescriptor

public class DefaultDependencyDescriptor
extends java.lang.Object
implements DependencyDescriptor

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.

Author:
  Xavier Hanin

Constructor Summary
`DefaultDependencyDescriptor(DependencyDescriptor dd, java.lang.String revision)`
`DefaultDependencyDescriptor(ModuleDescriptor md, ModuleRevisionId mrid, boolean force, boolean changing, boolean transitive)`
`DefaultDependencyDescriptor(ModuleRevisionId mrid, boolean force)`
`DefaultDependencyDescriptor(ModuleRevisionId mrid, boolean force, boolean changing)`

Method Summary
`void` | `addDependencyArtifactExcludes(java.lang.String masterConf, DependencyArtifactDescriptor dad)`
`void` | `addDependencyArtifactIncludes(java.lang.String masterConf, DependencyArtifactDescriptor dad)`
`void` | `addDependencyConfiguration(java.lang.String masterConf, java.lang.String depConf)`
`void` | `addExtends(java.lang.String conf)`
`boolean` | `canExclude()` Returns true if this descriptor contains any exclusion rule
`boolean` | `doesExclude(java.lang.String[] moduleConfigurations, ArtifactId artifactId)` only works when namespace is properly set.
`DependencyArtifactDescriptor[]` | `getAllDependencyArtifactsExcludes()`
`DependencyArtifactDescriptor[]` | `getAllDependencyArtifactsIncludes()`
`DependencyArtifactDescriptor[]` | `getDependencyArtifactsExcludes(java.lang.String moduleConfiguration)`
`DependencyArtifactDescriptor[]` | `getDependencyArtifactsExcludes(java.lang.String[] moduleConfigurations)`
`DependencyArtifactDescriptor[]` | `getDependencyArtifactsIncludes(java.lang.String moduleConfiguration)`
`DependencyArtifactDescriptor[]` | `getDependencyArtifactsIncludes(java.lang.String[] moduleConfigurations)`
`java.lang.String[]` | `getDependencyConfigurations(java.lang.String moduleConfiguration)`
`java.lang.String[]` | `getDependencyConfigurations(java.lang.String[] moduleConfigurations)`
`ModuleId` | `getDependencyId()`
`ModuleRevisionId` | `getDependencyRevisionId()`
`java.lang.String[]` | `getModuleConfigurations()`
`Namespace` | `getNamespace()`
`ModuleRevisionId` | `getParentRevisionId()`
`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()`
`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)` 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

### DefaultDependencyDescriptor

    public DefaultDependencyDescriptor(DependencyDescriptor dd,
                                       java.lang.String revision)

### DefaultDependencyDescriptor

    public DefaultDependencyDescriptor(ModuleDescriptor md,
                                       ModuleRevisionId mrid,
                                       boolean force,
                                       boolean changing,
                                       boolean transitive)

### DefaultDependencyDescriptor

    public DefaultDependencyDescriptor(ModuleRevisionId mrid,
                                       boolean force)

### DefaultDependencyDescriptor

    public DefaultDependencyDescriptor(ModuleRevisionId mrid,
                                       boolean force,
                                       boolean changing)

Method Detail

### transformInstance

    public 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. Note that exclude rules are not converted in system namespace, because they aren't transformable (the name space hasn't the ability to convert regular expressions). However, method doesExclude will work with system artifacts.

  Parameters:
    `ns` -
  Returns:

### transformInstance

    public static DefaultDependencyDescriptor transformInstance(DependencyDescriptor dd,
                                                                NamespaceTransformer t)

  Transforms a dependency descriptor using the given transformer. Note that no namespace info will be attached to the transformed dependency descriptor, so calling doesExclude is not recommended (doesExclude only works when namespace is properly set)

  Parameters:
    `dd` -
    `t` -
  Returns:

### getDependencyId

    public ModuleId getDependencyId()

  Specified by:
    `getDependencyId` in interface `DependencyDescriptor`

### getDependencyRevisionId

    public ModuleRevisionId getDependencyRevisionId()

  Specified by:
    `getDependencyRevisionId` in interface `DependencyDescriptor`

### getModuleConfigurations

    public java.lang.String[] getModuleConfigurations()

  Specified by:
    `getModuleConfigurations` in interface `DependencyDescriptor`

### getDependencyConfigurations

    public java.lang.String[] getDependencyConfigurations(java.lang.String moduleConfiguration)

  Specified by:
    `getDependencyConfigurations` in interface `DependencyDescriptor`

### getDependencyConfigurations

    public java.lang.String[] getDependencyConfigurations(java.lang.String[] moduleConfigurations)

  Specified by:
    `getDependencyConfigurations` in interface `DependencyDescriptor`

### getDependencyArtifactsIncludes

    public DependencyArtifactDescriptor[] getDependencyArtifactsIncludes(java.lang.String moduleConfiguration)

  Specified by:
    `getDependencyArtifactsIncludes` in interface `DependencyDescriptor`

### getDependencyArtifactsExcludes

    public DependencyArtifactDescriptor[] getDependencyArtifactsExcludes(java.lang.String moduleConfiguration)

  Specified by:
    `getDependencyArtifactsExcludes` in interface `DependencyDescriptor`

### getDependencyArtifactsIncludes

    public DependencyArtifactDescriptor[] getDependencyArtifactsIncludes(java.lang.String[] moduleConfigurations)

  Specified by:
    `getDependencyArtifactsIncludes` in interface `DependencyDescriptor`

### getDependencyArtifactsExcludes

    public DependencyArtifactDescriptor[] getDependencyArtifactsExcludes(java.lang.String[] moduleConfigurations)

  Specified by:
    `getDependencyArtifactsExcludes` in interface `DependencyDescriptor`

### getAllDependencyArtifactsIncludes

    public DependencyArtifactDescriptor[] getAllDependencyArtifactsIncludes()

  Specified by:
    `getAllDependencyArtifactsIncludes` in interface `DependencyDescriptor`

### getAllDependencyArtifactsExcludes

    public DependencyArtifactDescriptor[] getAllDependencyArtifactsExcludes()

  Specified by:
    `getAllDependencyArtifactsExcludes` in interface `DependencyDescriptor`

### addDependencyConfiguration

    public void addDependencyConfiguration(java.lang.String masterConf,
                                           java.lang.String depConf)

### addDependencyArtifactIncludes

    public void addDependencyArtifactIncludes(java.lang.String masterConf,
                                              DependencyArtifactDescriptor dad)

### addDependencyArtifactExcludes

    public void addDependencyArtifactExcludes(java.lang.String masterConf,
                                              DependencyArtifactDescriptor dad)

### doesExclude

    public boolean doesExclude(java.lang.String[] moduleConfigurations,
                               ArtifactId artifactId)

  only works when namespace is properly set. The behaviour is not specified if namespace is not set

  Specified by:
    `doesExclude` in interface `DependencyDescriptor`

### canExclude

    public boolean canExclude()

  Returns true if this descriptor contains any exclusion rule

  Specified by:
    `canExclude` in interface `DependencyDescriptor`
  Returns:

### addExtends

    public void addExtends(java.lang.String conf)

### toString

    public java.lang.String toString()

### isForce

    public boolean isForce()

  Description copied from interface: `DependencyDescriptor`
  Used to indicate that this revision must be used in case of conflicts, independently of conflicts manager. This only works for direct dependencies, and not transitive ones.

  Specified by:
    `isForce` in interface `DependencyDescriptor`
  Returns:
    true if this dependency should be used, false if conflicts manager can do its work.

### getParentRevisionId

    public ModuleRevisionId getParentRevisionId()

  Specified by:
    `getParentRevisionId` in interface `DependencyDescriptor`

### isChanging

    public boolean isChanging()

  Description copied from interface: `DependencyDescriptor`
  Used to indicate that this dependency is a changing one. A changing dependency in ivy means that the revision may have its artifacts modified without revision change. When new artifacts are published a new ivy file should also be published with a new publication date to indicate to ivy that artifacts have changed and that they should be downloaded again.

  Specified by:
    `isChanging` in interface `DependencyDescriptor`
  Returns:
    true if this dependency is a changing one

### isTransitive

    public boolean isTransitive()

  Specified by:
    `isTransitive` in interface `DependencyDescriptor`

### getNamespace

    public Namespace getNamespace()

  Specified by:
    `getNamespace` in interface `DependencyDescriptor`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD