Package org.ungoverned.osgi.service.bundlerepository

Examples of org.ungoverned.osgi.service.bundlerepository.BundleRepositoryService


        }
      }

      // Install the budle from repo

      BundleRepositoryService obr = getOBR();

      // deployBundle writes all info to streams, so we have to
      // catch that info. The text will be displayed by
      // the node's toHTML method
      ByteArrayOutputStream bout = new ByteArrayOutputStream();
      PrintStream outStream = new PrintStream(bout, true);

      // We always resolve.
      boolean bResolve = true;

      try {
        boolean bOK = obr.deployBundle(outStream, // Output stream.
                                       outStream, // Error stream.
                                       updateURL,
                                       bResolve,
                                       bStart);
        if(bOK) {
View Full Code Here


            setRootText(STR_LOADING);

            rootNode = new TopNode(STR_TOPNAME);
            treeModel = new DefaultTreeModel(rootNode);

            BundleRepositoryService obr = getOBR();

            if(obr != null) {
              if(bReload) {
                obrErr = "";
                try {
                  assertRepoURLs(obr.getRepositoryURLs());
                  obr.setRepositoryURLs(obr.getRepositoryURLs());
                } catch (Exception e) {
                  obrErr =
                    "<b>" + e.getClass().getName() + "</b>"+
                    "<pre>\n" +
                    e.getMessage() +
                    "</pre>";
                }
              }
              int count = obr.getBundleRecordCount();

              // String (category) -> Set (BundleRecord)
              Map categories = new TreeMap(new Comparator() {
                  public int compare(Object o1, Object o2) {
                    return o1.toString().compareToIgnoreCase(o2.toString());
                  }
                });

              // move all bundle records into a sorted
              // category map of sets
              for(int i = 0; i < count; i++) {
                BundleRecord br = obr.getBundleRecord(i);

                String loc = (String)br.getAttribute(BundleRecord.BUNDLE_UPDATELOCATION);

                String category = "other";
                if(sortCategory == SORT_CATEGORY) {
View Full Code Here

        sb.append("</pre>");
        sb.append("</font>");
      } else {
        Util.startFont(sb);

        BundleRepositoryService obr = getOBR();

        if(obr != null) {
          sb.append("<p>");
          sb.append("<b>Repository URLs</b><br>");
          String[] urls = obr.getRepositoryURLs();
          for(int i = 0; i < urls.length; i++) {
            sb.append(urls[i]);
            if(i < urls.length - 1) {
              sb.append("<br>");
            }
          }
          sb.append("</p>");
          sb.append("<p>");
          sb.append("Total number of bundles: " + obr.getBundleRecordCount());
          sb.append("</p>");
        }

        appendHelp(sb);
View Full Code Here



      Util.startFont(sb);

      BundleRepositoryService obr = getOBR();
      if(obr != null) {
        sb.append("<p>");
        sb.append("Bundles in this category: " + getChildCount());
        sb.append("</p>");
      }
View Full Code Here

TOP

Related Classes of org.ungoverned.osgi.service.bundlerepository.BundleRepositoryService

Copyright © 2018 www.massapicom. 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.