Class DefaultIndexTreeView

  • All Implemented Interfaces:
    IndexTreeView

    @Singleton
    @Named
    public class DefaultIndexTreeView
    extends java.lang.Object
    implements IndexTreeView
    • Field Detail

      • indexer

        private final Indexer indexer
    • Constructor Detail

      • DefaultIndexTreeView

        @Inject
        public DefaultIndexTreeView​(Indexer indexer)
    • Method Detail

      • getIndexer

        protected Indexer getIndexer()
      • listNodes

        public TreeNode listNodes​(TreeViewRequest request)
                           throws java.io.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:
        java.io.IOException
      • listChildren

        protected void listChildren​(TreeNode root,
                                    TreeViewRequest request,
                                    java.util.Set<java.lang.String> allGroups)
                             throws java.io.IOException
        Parameters:
        root -
        request -
        allGroups -
        Throws:
        java.io.IOException
      • getPathForAi

        protected java.lang.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 java.util.Set<java.lang.String> getGroups​(java.lang.String path,
                                                            java.util.Set<java.lang.String> allGroups)
      • getArtifactsByGA

        protected IteratorSearchResponse getArtifactsByGA​(java.lang.String g,
                                                          java.lang.String a,
                                                          TreeViewRequest request)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getArtifactsByGAV

        protected IteratorSearchResponse getArtifactsByGAV​(java.lang.String g,
                                                           java.lang.String a,
                                                           java.lang.String v,
                                                           TreeViewRequest request)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getArtifactsByGAVField

        protected IteratorSearchResponse getArtifactsByGAVField​(java.lang.String g,
                                                                java.lang.String a,
                                                                java.lang.String v,
                                                                TreeViewRequest request)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException