congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.atlassian.plugin.servlet
Code IndexAdd Tabnine to your IDE (free)

How to use com.atlassian.plugin.servlet

Best Java code snippets using com.atlassian.plugin.servlet (Showing top 20 results out of 315)

origin: com.atlassian.plugins/atlassian-plugins-webresource-common

  private DownloadStrategy findStrategy(String url) {
    for (final DownloadStrategy downloadStrategy : getDownloadStrategies()) {
      if (downloadStrategy.matches(url)) {
        return downloadStrategy;
      }
    }
    return null;
  }
}
origin: com.atlassian.plugins/atlassian-plugins-webresource

/**
 * @return content type for given path.
 */
public String getContentType(String path) {
  return contentTypeResolver.getContentType(path);
}
origin: com.atlassian.plugins/atlassian-plugins-webresource-common

  /**
   * Sets caching headers with private cache control. Applications should call this method from urlrewrite.xml to
   * decorate urls like <code>/sp/{build num}/.../_/resourceurl</code>.
   *
   * @see <a href="http://tuckey.org/urlrewrite/manual/2.6/">http://tuckey.org/urlrewrite/manual/2.6/</a>
   */
  public static void addPrivateCachingHeaders(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) {
    addCachingHeaders(httpServletRequest, httpServletResponse, "private");
  }
}
origin: com.atlassian.plugins/atlassian-plugins-webresource-common

public void serveFile(final HttpServletRequest request, final HttpServletResponse response) throws DownloadException {
  for (final DownloadStrategy strategy : strategies.values()) {
    if (strategy.matches(request.getRequestURI().toLowerCase())) {
      strategy.serveFile(request, response);
      return;
    }
  }
  throw new DownloadException(
      "Found plugin download strategy during matching but not when trying to serve. Enable debug logging for more information.");
}
origin: com.atlassian.labs/speakeasy-plugin

  public String getContentType() {
    return originalResource.getContentType();
  }
}
origin: com.atlassian.labs/speakeasy-plugin

public boolean isResourceModified(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
  return originalResource.isResourceModified(httpServletRequest, httpServletResponse);
}
origin: com.atlassian.plugins/atlassian-plugins-webresource-common

public void streamResource(final OutputStream out) throws DownloadException {
  final InputStream resourceStream = getResourceAsStreamViaMinificationStrategy();
  if (resourceStream == null) {
    log.warn("Resource not found: {}", this);
    return;
  }
  streamResource(resourceStream, out);
}
origin: com.atlassian.plugins/atlassian-plugins-webresource

  @Override
  public SourceMap writeTo(OutputStream out, boolean isSourceMapEnabled) {
    try {
      downloadableResource.streamResource(out);
    }
    catch (DownloadException e)
    {
      Support.LOGGER.debug("Error while serving file: DownloadException");
    }
    return sourceMap;
  }
};
origin: com.atlassian.plugins/atlassian-plugins-webresource-common

@Override
public String toString() {
  final String pluginKey = plugin != null ? plugin.getKey() : "";
  return "Resource: " + pluginKey + " " + getLocation() + " (" + getContentType() + ")";
}
origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
public void addServlet(Plugin plugin, String servletName, HttpServlet servlet, ServletContext servletContext) {
  delegateModuleManager.addServlet(plugin, servletName, servlet, servletContext);
}
origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
public HttpServlet getServlet(String path, ServletConfig servletConfig) throws ServletException {
  return delegateModuleManager.getServlet(path, servletConfig);
}
origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
public void removeServletModule(ServletModuleDescriptor descriptor) {
  delegateModuleManager.removeServletModule(descriptor);
}
origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
public void addServletModule(ServletModuleDescriptor descriptor) {
  delegateModuleManager.addServletModule(descriptor);
}
origin: com.atlassian.plugins/atlassian-plugins-webresource-common

@Override
protected InputStream getResourceAsStream(final String resourceLocation) {
  String fixedResourceLocation = fixResourceLocation(resourceLocation);
  return servletContext.getResourceAsStream(fixedResourceLocation);
}
origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
public Iterable<Filter> getFilters(FilterLocation location, String pathInfo, FilterConfig filterConfig, DispatcherType dispatcherType) {
  return delegateModuleManager.getFilters(location, StringUtils.removeStart(pathInfo, path), filterConfig, dispatcherType);
}
origin: com.atlassian.plugins/atlassian-plugins-webresource

public String getContentType() {
  return originalResource.getContentType();
}
origin: com.atlassian.plugins/atlassian-plugins-webresource

public boolean isResourceModified(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
  return originalResource.isResourceModified(httpServletRequest, httpServletResponse);
}
origin: com.atlassian.plugins/atlassian-plugins-webresource-common

/**
 * Sets caching headers with public cache control. Applications should call this method from urlrewrite.xml to
 * decorate urls like <code>/s/{build num}/.../_/resourceurl</code>.
 *
 * @see <a href="http://tuckey.org/urlrewrite/manual/2.6/">http://tuckey.org/urlrewrite/manual/2.6/</a>
 */
public static void addPublicCachingHeaders(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) {
  addCachingHeaders(httpServletRequest, httpServletResponse, "public");
}
origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
public void addServlet(Plugin plugin, String servletName, String className) {
  delegateModuleManager.addServlet(plugin, servletName, className);
}
origin: com.atlassian.plugins/atlassian-plugins-webresource

/**
 * Adapter, turns DownloadableResource into Content.
 */
public static Content asContent(final DownloadableResource downloadableResource, final SourceMap sourceMap,
                boolean isTransformed) {
  return new ContentImpl(downloadableResource.getContentType(), isTransformed) {
    @Override
    public SourceMap writeTo(OutputStream out, boolean isSourceMapEnabled) {
      try {
        downloadableResource.streamResource(out);
      }
      catch (DownloadException e)
      {
        Support.LOGGER.debug("Error while serving file: DownloadException");
      }
      return sourceMap;
    }
  };
}
com.atlassian.plugin.servlet

Most used classes

  • ServletContextFactory
    A factory for providing access to a ServletContext.
  • DownloadException
    An exception was encountered while trying to write a resource to the client. This is usually an IOEx
  • ResourceDownloadUtils
  • DownloadableResource
    Represents a plugin resource that can be downloaded. It is up to the calling class to check if the r
  • FilterLocation
  • LastModifiedHandler,
  • PathMapper,
  • AbstractDownloadableResource,
  • AbstractFileServerServlet,
  • ContentTypeResolver,
  • DefaultServletModuleManager,
  • DownloadStrategy,
  • DownloadableClasspathResource,
  • DownloadableWebResource,
  • ForwardableResource,
  • ServletModuleManager,
  • ServletFilterModuleDescriptor,
  • PluggableDownloadStrategy,
  • ServletFilterModuleContainerFilter
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now