Package org.sonatype.nexus.obr.metadata

Examples of org.sonatype.nexus.obr.metadata.ManagedObrSite


      ObrResourceReader reader = null;
      ObrResourceWriter writer = null;

      try {
        reader = obrMetadataSource.getReader(new ManagedObrSite((StorageFileItem) backingItem));
        writer = obrMetadataSource.getWriter(obrUid);

        for (Resource i = reader.readResource(); i != null; i = reader.readResource()) {
          if (caching && !"file".equals(i.getURL().getProtocol())) {
            writer.append(new CacheableResource(i));
View Full Code Here


   */
  private String getAbsoluteBundleUrl(final String path) {
    ObrResourceReader reader = null;

    try {
      reader = obrMetadataSource.getReader(new ManagedObrSite(ObrUtils.retrieveObrItem(this)));
      for (Resource i = reader.readResource(); i != null; i = reader.readResource()) {
        // the right entry should have the same path
        if (path.equals(i.getURL().getPath())) {
          return StringUtils.defaultString(i.getProperties().get(CacheableResource.REMOTE_URL), null);
        }
View Full Code Here

    final String path = request.getRequestPath();

    ObrResourceReader reader = null;
    for (final Repository r : getRequestRepositories(request)) {
      try {
        reader = obrMetadataSource.getReader(new ManagedObrSite(ObrUtils.retrieveObrItem(r)));
        for (Resource i = reader.readResource(); i != null; i = reader.readResource()) {
          final URL url = i.getURL();
          if ("file".equals(url.getProtocol()) && path.equals(url.getPath())) {
            return r.retrieveItem(false, request);
          }
View Full Code Here

      try {
        writer = obrMetadataSource.getWriter(createUid(request.getRequestPath()));
        for (final StorageFileItem f : memberObrItems) {
          try {
            reader = obrMetadataSource.getReader(new ManagedObrSite(f));
            for (Resource i = reader.readResource(); i != null; i = reader.readResource()) {
              writer.append(i);
            }
          }
          catch (final IOException e) {
View Full Code Here

    ObrResourceWriter writer = null;
    ObrResourceReader reader = null;

    try {
      writer = source.getWriter(uid);
      reader = source.getReader(new ManagedObrSite(retrieveObrItem(uid.getRepository())));
      for (Resource i = reader.readResource(); i != null; i = reader.readResource()) {
        if (i.equals(resource)) {
          if (adding) // only update once, remove any duplicates
          {
            writer.append(resource);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.obr.metadata.ManagedObrSite

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.