Package aQute.bnd.service.repository.SearchableRepository

Examples of aQute.bnd.service.repository.SearchableRepository.ResourceDescriptor


        viewerIndirect.addCheckStateListener(new ICheckStateListener() {
            public void checkStateChanged(CheckStateChangedEvent ev) {
                if (selectedIndirectResources == null)
                    selectedIndirectResources = new HashSet<ResourceDescriptor>();

                ResourceDescriptor resource = (ResourceDescriptor) ev.getElement();
                if (ev.getChecked())
                    selectedIndirectResources.add(resource);
                else
                    selectedIndirectResources.remove(resource);
            }
View Full Code Here


        private final Image imgJar = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/jar_obj.gif").createImage();

        @Override
        public void update(ViewerCell cell) {
            ResourceDescriptor descriptor = (ResourceDescriptor) cell.getElement();
            StyledString label = new StyledString(descriptor.bsn + " ");
            if (descriptor.version != null)
                label.append(descriptor.version.toString(), StyledString.COUNTER_STYLER);

            cell.setText(label.toString());
View Full Code Here

      Set<ResourceDescriptor> resources = new HashSet<ResourceDescriptor>();
      Revision revision = getRevision(new Coordinate(m.group(1), m.group(2), m.group(3), m.group(4)));

      if (revision != null) {
        ResourceDescriptor rd = createResourceDescriptor(new RevisionRef(revision));
        resources.add(rd);
        if (includeDependencies) {
          for (RevisionRef dependency : library.getClosure(revision._id, false)) {
            ResourceDescriptor dep = createResourceDescriptor(dependency);
            dep.dependency = true;
            resources.add(dep);
          }
        }
      }
View Full Code Here

        viewerIndirect.addCheckStateListener(new ICheckStateListener() {
            public void checkStateChanged(CheckStateChangedEvent ev) {
                if (selectedIndirectResources == null)
                    selectedIndirectResources = new HashSet<ResourceDescriptor>();

                ResourceDescriptor resource = (ResourceDescriptor) ev.getElement();
                if (ev.getChecked())
                    selectedIndirectResources.add(resource);
                else
                    selectedIndirectResources.remove(resource);
            }
View Full Code Here

        private final Image imgJar = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/jar_obj.gif").createImage();

        @Override
        public void update(ViewerCell cell) {
            ResourceDescriptor descriptor = (ResourceDescriptor) cell.getElement();
            StyledString label = new StyledString(descriptor.bsn + " ");
            if (descriptor.version != null)
                label.append(descriptor.version.toString(), StyledString.COUNTER_STYLER);

            cell.setText(label.toString());
View Full Code Here

        map = (Map<String,String>) target[2];

      File f = getLocal(bsn, version, map);

      String s = "";
      ResourceDescriptor descriptor = getDescriptor(bsn, version);
      if (descriptor != null && descriptor.description != null) {
        s = descriptor.description + "\n";
      }

      s += String.format("Path: %s\nSize: %s\nSHA1: %s", f.getAbsolutePath(), readable(f.length(), 0), SHA1
View Full Code Here

    Jar tmpjar = jar;
    if (jar == null)
      tmpjar = new Jar(f);
    try {
      Manifest m = tmpjar.getManifest();
      ResourceDescriptor rd = new ResourceDescriptor();
      rd.bsn = bsn;
      rd.version = version;
      rd.description = m.getMainAttributes().getValue(Constants.BUNDLE_DESCRIPTION);
      rd.id = digest;
      if (rd.id == null)
View Full Code Here

    //

    if (newer.getWithoutQualifier().equals(older.getWithoutQualifier())) {
      RepositoryPlugin rr = getBaselineRepo();
      if (rr instanceof InfoRepository) {
        ResourceDescriptor descriptor = ((InfoRepository) rr).getDescriptor(getBsn(), older);
        if (descriptor != null && descriptor.phase != Phase.STAGING) {
          error("Baselining %s against same version %s but the repository says the older repository version is not the required %s but is instead %s",
              getBsn(), getVersion(), Phase.STAGING, descriptor.phase);
          return;
        }
View Full Code Here

   * @param v
   * @return
   * @throws Exception
   */
  private boolean isMaster(InfoRepository repo, String bsn, Version v) throws Exception {
    ResourceDescriptor descriptor = repo.getDescriptor(bsn, v);
    if (descriptor == null)
      return false;

    return descriptor.phase == Phase.MASTER;
  }
View Full Code Here

          }
        }
      }
    });

    ResourceDescriptor rd = create("jar/osgi.jar");
    repoImpl.add("x", rd);
    assertEquals(1, adds.get());
    assertEquals(0, removes.get());
    repoImpl.delete(null,rd.id);
    ;
View Full Code Here

TOP

Related Classes of aQute.bnd.service.repository.SearchableRepository.ResourceDescriptor

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.