org.apache.maven.index.treeview
Class DefaultIndexTreeView

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.index.treeview.DefaultIndexTreeView
All Implemented Interfaces:
IndexTreeView, org.codehaus.plexus.logging.LogEnabled

@Component(role=IndexTreeView.class)
public class DefaultIndexTreeView
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements IndexTreeView


Constructor Summary
DefaultIndexTreeView()
           
 
Method Summary
protected  IteratorSearchResponse getArtifacts(TreeNode root, TreeViewRequest request)
           
protected  IteratorSearchResponse getArtifactsByG(String g, TreeViewRequest request)
           
protected  IteratorSearchResponse getArtifactsByGA(String g, String a, TreeViewRequest request)
           
protected  IteratorSearchResponse getArtifactsByGAV(String g, String a, String v, TreeViewRequest request)
           
protected  IteratorSearchResponse getArtifactsByGAVField(String g, String a, String v, TreeViewRequest request)
           
protected  Set<String> getGroups(String path, Set<String> allGroups)
           
protected  IteratorSearchResponse getHintedArtifacts(TreeNode root, TreeViewRequest request)
           
protected  NexusIndexer getNexusIndexer()
           
protected  String getPathForAi(ArtifactInfo ai, Field field)
          Builds a path out from ArtifactInfo.
protected  void listChildren(TreeNode root, TreeViewRequest request, Set<String> allGroups)
           
 TreeNode listNodes(TreeViewRequest request)
          Returns the TreeNode, as calculated by passed in request, using index data.
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIndexTreeView

public DefaultIndexTreeView()
Method Detail

getNexusIndexer

protected NexusIndexer getNexusIndexer()

listNodes

public TreeNode listNodes(TreeViewRequest request)
                   throws IOException
Description copied from interface: IndexTreeView
Returns the TreeNode, as calculated by passed in request, using index data.

Specified by:
listNodes in interface IndexTreeView
Returns:
Throws:
IOException

listChildren

protected void listChildren(TreeNode root,
                            TreeViewRequest request,
                            Set<String> allGroups)
                     throws IOException
Parameters:
root -
factory -
allGroups -
Throws:
IOException

getPathForAi

protected String getPathForAi(ArtifactInfo ai,
                              Field field)
Builds a path out from ArtifactInfo. The field parameter controls "how deep" the path goes. Possible values are MAVEN.GROUP_ID (builds a path from groupId only), MAVEN.ARTIFACT_ID (builds a path from groupId + artifactId), MAVEN.VERSION (builds a path up to version) or anything else (including null) will build "full" artifact path.

Parameters:
ai -
field -
Returns:
path

getGroups

protected Set<String> getGroups(String path,
                                Set<String> allGroups)

getArtifacts

protected IteratorSearchResponse getArtifacts(TreeNode root,
                                              TreeViewRequest request)
                                       throws IOException
Throws:
IOException

getHintedArtifacts

protected IteratorSearchResponse getHintedArtifacts(TreeNode root,
                                                    TreeViewRequest request)
                                             throws IOException
Throws:
IOException

getArtifactsByG

protected IteratorSearchResponse getArtifactsByG(String g,
                                                 TreeViewRequest request)
                                          throws IOException
Throws:
IOException

getArtifactsByGA

protected IteratorSearchResponse getArtifactsByGA(String g,
                                                  String a,
                                                  TreeViewRequest request)
                                           throws IOException
Throws:
IOException

getArtifactsByGAV

protected IteratorSearchResponse getArtifactsByGAV(String g,
                                                   String a,
                                                   String v,
                                                   TreeViewRequest request)
                                            throws IOException
Throws:
IOException

getArtifactsByGAVField

protected IteratorSearchResponse getArtifactsByGAVField(String g,
                                                        String a,
                                                        String v,
                                                        TreeViewRequest request)
                                                 throws IOException
Throws:
IOException


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