org.apache.maven.mercury.metadata
Interface DependencyBuilder


public interface DependencyBuilder

Version:
$Id: DependencyBuilder.java 720564 2008-11-25 18:58:02Z ogusakov $
Author:
Oleg Gusakov

Field Summary
static java.lang.String TREE_BUILD_EVENT
           
static java.lang.String TREE_NODE_BUILD_EVENT
           
 
Method Summary
 MetadataTreeNode buildTree(ArtifactBasicMetadata startMD, ArtifactScopeEnum scope)
          build the tree, using the repositories specified in the constructor
 void register(MercuryEventListener listener)
          register a listener for dependency events
 java.util.List<ArtifactMetadata> resolveConflicts(MetadataTreeNode root)
          hard to believe, but this actually resolves the conflicts, removing all duplicate GAVs from the tree
 MetadataTreeNode resolveConflictsAsTree(MetadataTreeNode root)
          this one resolves the conflicts, removing all duplicate GAVs from the tree and returning a copy of the resulting subtree - original tree should be intact
 void unRegister(MercuryEventListener listener)
          remove a listener
 

Field Detail

TREE_BUILD_EVENT

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

TREE_NODE_BUILD_EVENT

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

buildTree

MetadataTreeNode buildTree(ArtifactBasicMetadata startMD,
                           ArtifactScopeEnum scope)
                           throws MetadataTreeException
build the tree, using the repositories specified in the constructor

Parameters:
startMD - - root of the tree to build
targetPlatform - - limitations to use when retrieving metadata. Format is G:A=V, where V is Version Range
Returns:
the root of the tree built
Throws:
MetadataTreeException

resolveConflicts

java.util.List<ArtifactMetadata> resolveConflicts(MetadataTreeNode root)
                                                  throws MetadataTreeException
hard to believe, but this actually resolves the conflicts, removing all duplicate GAVs from the tree

Parameters:
root - the tree to resolve conflicts on
Returns:
list of resolved GAVs
Throws:
MetadataTreeException

resolveConflictsAsTree

MetadataTreeNode resolveConflictsAsTree(MetadataTreeNode root)
                                        throws MetadataTreeException
this one resolves the conflicts, removing all duplicate GAVs from the tree and returning a copy of the resulting subtree - original tree should be intact

Parameters:
root - the tree to resolve conflicts on
Returns:
resolved subtree
Throws:
MetadataTreeException

register

void register(MercuryEventListener listener)
register a listener for dependency events

Parameters:
listener -

unRegister

void unRegister(MercuryEventListener listener)
remove a listener

Parameters:
listener -


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.