Examples of TreeEntry


Examples of org.apache.geronimo.console.util.TreeEntry

                    // ignore.... not a context
                }
                if (obj instanceof Context) {
                    buildContextSub(node, (Context) obj, nodeCurr + "/" + pair.getName());
                } else {
                    node.addChild(new TreeEntry(nodeCurr + "/" + pair.getName(), NORMAL_TYPE));
                }
            }
        } catch (Exception e) {
            log.warn("Error listing context", e);
        }
View Full Code Here

Examples of org.apache.geronimo.console.util.TreeEntry

                // ignore.... it wasn't a context
            }
            if (obj instanceof Context) {
                buildGlobal(tree, (Context) obj, parent + pair.getName());
            } else {
                tree.addChild(new TreeEntry(parent + pair.getName(), NORMAL_TYPE));
            }
        }
    }
View Full Code Here

Examples of org.apache.geronimo.console.util.TreeEntry

        Tree jndiTree = new Tree(null, "name");

        List arryList = new ArrayList();
        Hashtable entApp = new Hashtable();

        TreeEntry treeGlobal = new TreeEntry("Global Context", NOT_LEAF_TYPE);
        jndiTree.addItem(treeGlobal);
        buildGlobal(treeGlobal, org.apache.xbean.naming.global.GlobalContextManager.getGlobalContext(), "");

        TreeEntry tree = new TreeEntry("Enterprise Applications", NOT_LEAF_TYPE);
        jndiTree.addItem(tree);

        TreeEntry treeMod = new TreeEntry("EJBModule", NOT_LEAF_TYPE);
        entApp.put("EJBModule", treeMod);
        jndiTree.addItem(treeMod);

        treeMod = new TreeEntry("WebModule", NOT_LEAF_TYPE);
        entApp.put("WebModule", treeMod);
        jndiTree.addItem(treeMod);

        treeMod = new TreeEntry("ResourceAdapterModule", NOT_LEAF_TYPE);
        entApp.put("ResourceAdapterModule", treeMod);
        jndiTree.addItem(treeMod);

        treeMod = new TreeEntry("AppClientModule", NOT_LEAF_TYPE);
        entApp.put("AppClientModule", treeMod);
        jndiTree.addItem(treeMod);

        org.apache.geronimo.kernel.Kernel kernel = org.apache.geronimo.kernel.KernelRegistry.getSingleKernel();

        Set setEnt = kernel.listGBeans(new org.apache.geronimo.gbean.AbstractNameQuery(null, Collections.EMPTY_MAP,
                org.apache.geronimo.j2ee.management.impl.J2EEApplicationImpl.class.getName()));
        Iterator iterator = setEnt.iterator();
        while (iterator.hasNext()) {
            org.apache.geronimo.gbean.AbstractName gb = (org.apache.geronimo.gbean.AbstractName) iterator.next();
            TreeEntry curr = new TreeEntry(gb.getNameProperty("name"), NORMAL_TYPE);
            tree.addChild(curr);
            entApp.put(gb.getNameProperty("name"), curr);

            TreeEntry temp = new TreeEntry("EJBModule", NOT_LEAF_TYPE);
            curr.addChild(temp);

            temp = new TreeEntry("WebModule", NOT_LEAF_TYPE);
            curr.addChild(temp);

            temp = new TreeEntry("ResourceAdapterModule", NOT_LEAF_TYPE);
            curr.addChild(temp);

            temp = new TreeEntry("AppClientModule", NOT_LEAF_TYPE);
            curr.addChild(temp);
        }

        buildEJBModule(kernel, jndiTree.getItems(), entApp);
        buildWebModule(kernel, jndiTree.getItems(), entApp);
View Full Code Here

Examples of org.apache.geronimo.console.util.TreeEntry

        for (TreeEntry entry : list) {
            children = entry.getChildren();
            if (children.size() > 0)
                check_no_child(children);
            else if (entry.getType().equals(NOT_LEAF_TYPE))
                children.add(new TreeEntry(NO_CHILD, NORMAL_TYPE));
        }
    }
View Full Code Here

Examples of org.eclipse.egit.github.core.TreeEntry

        paths[i] = paths[i].replace('\\', '/');

    boolean createNoJekyll = noJekyll;

    for (String path : paths) {
      TreeEntry entry = new TreeEntry();
      entry.setPath(prefix + path);
      // Only create a .nojekyll file if it doesn't already exist
      if (createNoJekyll && NO_JEKYLL_FILE.equals(entry.getPath()))
        createNoJekyll = false;
      entry.setType(TYPE_BLOB);
      entry.setMode(MODE_BLOB);
      entry.setSha(createBlob(service, repository, outputDirectory, path));
      entries.add(entry);
    }

    if (createNoJekyll) {
      TreeEntry entry = new TreeEntry();
      entry.setPath(NO_JEKYLL_FILE);
      entry.setType(TYPE_BLOB);
      entry.setMode(MODE_BLOB);

      if (isDebug())
        debug("Creating empty .nojekyll blob at root of tree");
      if (!dryRun)
        try {
          entry.setSha(service.createBlob(repository, new Blob()
              .setEncoding(ENCODING_BASE64).setContent("")));
        } catch (IOException e) {
          throw new MojoExecutionException(
              "Error creating .nojekyll empty blob: "
                  + getExceptionMessage(e), e);
View Full Code Here

Examples of org.eclipse.egit.github.core.TreeEntry

   
    if (createNoJekyll) {
      if (log.isDebugEnabled()){
        log.debug("Creating empty '.nojekyll' blob at root of tree");
      }
      TreeEntry entry = createEntry("", NO_JEKYLL_FILE, service, repository, outputDirectory);
      entries.add(entry);
    }

    Reference ref = getReference(service, repository);
   
View Full Code Here

Examples of org.eclipse.egit.github.core.TreeEntry

  }
 
  private List<TreeEntry> createEntries(List<TreeEntry> entries, final String prefix, final String[] paths,
      final DataService service, final RepositoryId repository, final File outputDirectory) throws GitHubException{
    for (String path : paths) {
      TreeEntry entry = createEntry(prefix, path, service, repository, outputDirectory);
      entries.add(entry);
    }
    return entries;
  }
View Full Code Here

Examples of org.eclipse.egit.github.core.TreeEntry

    }
    return ref;
  }

  private TreeEntry createEntry(String prefix, String path, DataService service, RepositoryId repository, File outputDirectory) throws GitHubException {
    TreeEntry entry = new TreeEntry();
    entry.setPath(prefix + path);
    entry.setType(TYPE_BLOB);
    entry.setMode(MODE_BLOB);
    if(!dryRun){
      entry.setSha(createBlob(service, repository, outputDirectory, path));
      log.info("" + path + " -> " + entry.getSha());
    }
    return entry;
  }
View Full Code Here

Examples of org.eclipse.egit.github.core.TreeEntry

        paths[i] = paths[i].replace('\\', '/');

    boolean createNoJekyll = noJekyll;

    for (String path : paths) {
      TreeEntry entry = new TreeEntry();
      entry.setPath(prefix + path);
      // Only create a .nojekyll file if it doesn't already exist
      if (createNoJekyll && NO_JEKYLL_FILE.equals(entry.getPath()))
        createNoJekyll = false;
      entry.setType(TYPE_BLOB);
      entry.setMode(MODE_BLOB);
      entry.setSha(createBlob(service, repository, path));
      entries.add(entry);
    }

    if (createNoJekyll) {
      TreeEntry entry = new TreeEntry();
      entry.setPath(NO_JEKYLL_FILE);
      entry.setType(TYPE_BLOB);
      entry.setMode(MODE_BLOB);

      if (isDebug())
        debug("Creating empty .nojekyll blob at root of tree");
      if (!dryRun)
        try {
          entry.setSha(service.createBlob(repository, new Blob()
              .setEncoding(ENCODING_BASE64).setContent("")));
        } catch (IOException e) {
          throw new MojoExecutionException(
              "Error creating .nojekyll empty blob: "
                  + getExceptionMessage(e), e);
View Full Code Here

Examples of org.eclipse.jgit.lib.TreeEntry

        String path = toPath(file);
        ObjectId blobId = null;
        int modeBits = 0;

        if (tree != null) {
            TreeEntry entry = tree.findBlobMember(path);
            if (entry != null) {
                blobId = entry.getId();
                modeBits = entry.getMode().getBits();
            }
        } else {
            if (index == null)
                index = DirCache.read(repository);
            DirCacheEntry entry = index.getEntry(path);
            if (entry != null) {
                blobId = entry.getObjectId();
                modeBits = entry.getRawMode();
            }
        }
        if (blobId == null)
            throw new FileNotFoundException(path);
        fileMappings.put(RevisionEntry.create(path, blobId, modeBits), destination);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.