Package org.sonatype.nexus.webresources

Examples of org.sonatype.nexus.webresources.UrlWebResource


  public StaticWebResourceBundle(final ClassSpace space, final MimeSupport mimeSupport) {
    for (Enumeration<URL> e = space.findEntries("static", "*", true); e.hasMoreElements();) {
      final URL url = e.nextElement();
      final String path = getPublishedPath(url);
      if (path != null && !path.endsWith("/")) {
        staticResources.add(new UrlWebResource(url, path, mimeSupport.guessMimeTypeFromPath(path)));
      }
    }
  }
View Full Code Here


          // to lessen clash possibilities, this way only within single plugin may be clashes, but one
          // plugin is usually developed by one team or one user so this is okay
          // system-wide clashes are much harder to resolve
          String path = "/" + getPluginId() + "/" + getPathPrefix() + "/" + name;

          resources.add(new UrlWebResource(url, path, mimeSupport.guessMimeTypeFromPath(name)));
        }
      }
    }

    if (log.isTraceEnabled()) {
View Full Code Here

    if (resource == null) {
      URL url;
      try {
        url = servletContextProvider.get().getResource(path);
        if (url != null) {
          resource = new UrlWebResource(url, path, mimeSupport.guessMimeTypeFromPath(path));
          log.trace("Found servlet-context resource: {}", resource);
        }
      }
      catch (MalformedURLException e) {
        throw Throwables.propagate(e);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.webresources.UrlWebResource

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.