Package aQute.service.library.Library

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.findProgram().query(query)) {
      for (RevisionRef ref : p.revisions) {
        if (master == null && ref.phase == Library.Phase.MASTER) {
          master = ref;
View Full Code Here


  }

  @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

    final File f = super.getLocal(bsn, version, attrs);

    // Find the revision for this bsn+version combination

    RevisionRef ref = getRevisionRef(bsn, version);
    if (ref == null)
      return null;

    download(ref.url.toURL(), f, ref, downloadListeners);
    return f;
View Full Code Here

            return sb.toString();
          }
        } else {
          try {
            version = (Version) target[1];
            RevisionRef r = getRevisionRef(bsn, version);

            if (r == null)
              return "No revision found for " + version;

            Formatter sb = new Formatter();
View Full Code Here

    if (isSha(bsn) && version.equals(Version.LOWEST)) {
      Revision r = library.getRevision(Library.SHA_GROUP + ":" + bsn + "@0.0.0");
      if (r == null)
        return null;

      return new RevisionRef(r);
    }

    String baseline = version.getWithoutQualifier().toString();
    String qualifier = version.getQualifier();
View Full Code Here

  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)
      return null;
    else
      return getLocal(resource, attrs, listeners);
  }
View Full Code Here

    bsn: for (String bsn : index.getBsns()) {
      if (glob.matcher(bsn).matches()) {
        if (phase != null) {
          boolean hasPhase = false;
          revision: for (Version version : index.getVersions(bsn)) {
            RevisionRef ref = index.getRevisionRef(bsn, version);
            if (ref.phase == phase) {
              hasPhase = true;
              break revision;
            }
          }
View Full Code Here

            toClipboard(bsn, versions.first());
          }

        });

      RevisionRef ref = p.revisions.get(0);
      Version latest = toVersion(ref.baseline, ref.qualifier);
      for (Version v : index.getVersions(bsn)) {
        if (v.equals(latest)) {
          latest = null;
          break;
View Full Code Here

    }
    return null;
  }

  private String revisionTooltip(String bsn, Version version) throws Exception {
    RevisionRef r = getRevisionRef(bsn, version);

    if (r == null)
      return null;

    Formatter sb = new Formatter();
View Full Code Here

    if (isSha(bsn) && version.equals(Version.LOWEST)) {
      Revision r = getRevision(new Coordinate(bsn));
      if (r == null)
        return null;

      return new RevisionRef(r);
    }
    reporter.trace("Looking for %s-%s", bsn, version);
    for (RevisionRef r : getRevisionRefs(bsn)) {
      Version v = toVersion(r.baseline, r.qualifier);
      if (v.equals(version))
View Full Code Here

TOP

Related Classes of aQute.service.library.Library.RevisionRef

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.