Examples of RevisionRef


Examples of aQute.service.library.Library.RevisionRef

  }

  // @Override
  public Set<ResourceDescriptor> query(String query) throws Exception {
    Set<ResourceDescriptor> resources = new HashSet<ResourceDescriptor>();
    RevisionRef master = null;
    RevisionRef staging = null;

    for (Program p : library.getQueryPrograms(query, 0, 100)) {
      for (RevisionRef ref : p.revisions) {
        if (master == null && ref.phase == Library.Phase.MASTER) {
          master = ref;
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

  }

  // @Override
  public boolean addResource(ResourceDescriptor resource) throws Exception {
    if (resource instanceof ResourceDescriptorImpl) {
      RevisionRef ref = ((ResourceDescriptorImpl) resource).revision;
      if (index.addRevision(ref)) {
        index.save();
        return true;
      }
    }
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

        reporter.trace("Dependency " + c);

        if (!Verifier.isVersion(c.getVersion()))
          continue;

        RevisionRef ref = index.getRevisionRef(c.getBundleSymbolicName(), new Version(c.getVersion()));
        if (ref != null)
          refs.remove(ref);
        else {
          // missing!
          reporter.trace("Missing " + c.getBundleSymbolicName());
          Coordinate coord = new Coordinate(c.getBundleSymbolicName());
          Revision rev = library.getRevisionByCoordinate(coord);
          if (rev != null) {
            index.addRevision(new RevisionRef(rev));
          } else
            System.out.printf("not found %s\n", c);
        }
        keep.add(ref);
      }
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

   * @param version
   * @return
   * @throws Exception
   */
  public ResourceDescriptor getDescriptor(String bsn, Version version) throws Exception {
    RevisionRef revisionRef = index.getRevisionRef(bsn, version);
    if (revisionRef == null)
      return null;

    return createResourceDescriptor(revisionRef);
  }
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

      return null;

    // Fixup the change from ref.url to ref.urls ...
    boolean save = false;

    RevisionRef ref = map.get(version);
    if (ref == null) {
      return null;
    }

    if (ref.urls.isEmpty() && ref.url != null) {
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

    if (map != null) {
      try {
        Library.RevisionRef removed = map.remove(v);
        if (removed != null) {
          for (Iterator<RevisionRef> i = repo.revisionRefs.iterator(); i.hasNext();) {
            RevisionRef other = i.next();
            if (Arrays.equals(other.revision, removed.revision)) {
              i.remove();
            }
          }
          repo.revisionRefs.remove(removed);
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

    if (map != null) {
      try {
        Library.RevisionRef removed = map.remove(v);
        if (removed != null) {
          for (Iterator<RevisionRef> i = repo.revisionRefs.iterator(); i.hasNext();) {
            RevisionRef other = i.next();
            if (Arrays.equals(other.revision, removed.revision)) {
              i.remove();
            }
          }
          repo.revisionRefs.remove(removed);
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

  public File get(String bsn, Version version, Map<String,String> attrs, final DownloadListener... listeners)
      throws Exception {

    init();
    // Check if we're supposed to have this
    RevisionRef resource = index.getRevisionRef(bsn, version);
    if (resource == null) {
      if (index.isLearning())
        // Not in the index. See if we can retrieve it. We add it
        // when the bsn was not marked remote so we can
        // let the repo 'discover' the bsns so that an existing
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

    if (!isConnected()) {
      reporter.warning("system is not connected, can't retrieve %s", bsn + "-" + version);
      return null;
    }
    // Search on jpm
    RevisionRef ref = getRevisionRef(bsn, version);
    if (ref == null)
      return null;

    if (addIt) {
      index.addRevision(ref);
View Full Code Here

Examples of aQute.service.library.Library.RevisionRef

    Program program = library.getProgram(Library.OSGI_GROUP, bsn);
    if (program == null)
      return versions;

    RevisionRef ref = program.revisions.get(0);

    index.addRevision(ref);
    index.save();
    return index.getVersions(bsn);
  }
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.