java.lang.Object
com.atlassian.plugin.webresource.impl.support.http.Request

public class Request extends Object
Possibly would be replaced by original request, currently original request is hard to use because parsed `path` and `params` not available on it, it also hides some other implementation details that wont be needed after the refactoring.

Also after the refactoring it would contain the `state` object - the only thing that will change during the request, all other resources would be stateless.

Since:
3.3
  • Constructor Details

  • Method Details

    • getType

      public static String getType(String path)
      Parameters:
      path - path of HTTP request.
      Returns:
      type of request, `js`, `css`, determined same as file type / extension.
    • getPath

      public String getPath()
      Returns:
      path of HTTP request, part of URL without query string.
    • getParams

      public Map<String,String> getParams()
      Returns:
      HTTP params.
    • getOriginalRequest

      public javax.servlet.http.HttpServletRequest getOriginalRequest()
    • getType

      public String getType()
      Returns:
      type of request, `js`, `css`, determined same as file type / extension.
    • isSourceMap

      public boolean isSourceMap()
    • getContentType

      public String getContentType()
    • getUrl

      public String getUrl()
      Returns:
      URL of HTTP request, with query string.
    • isCacheable

      public boolean isCacheable()
    • getGlobals

      public Globals getGlobals()
    • getServingType

      public ServingType getServingType()
    • setServingType

      public void setServingType(ServingType servingType)
    • setRequestedResources

      public void setRequestedResources(RawRequest request)
    • getRelativeResourceName

      public String getRelativeResourceName()
    • setRelativeResourceName

      public void setRelativeResourceName(String resourceName)
    • getRequestHash

      public String getRequestHash()
      Build a string that represents the request. If two requests are logically equivalent, it will return the same value. This is useful for caches.
      Returns:
      a hashed string representing the unique aspects of the request.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object