Class HTTPServletWebPlatform

All Implemented Interfaces:
Platform, WebPlatform

public class HTTPServletWebPlatform extends AbstractWebPlatform implements WebPlatform
A web platform based upon an HTTP servlet.
Author:
Garret Wilson
  • Constructor Details

    • HTTPServletWebPlatform

      public HTTPServletWebPlatform(GuiseApplication application, javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest httpRequest)
      Application and request constructor. This implementation updates the environment from the initial request cookies
      Parameters:
      application - The Guise application running on this platform.
      httpSession - The HTTP servlet session with which this platform is associated.
      httpRequest - The HTTP servlet request.
      Throws:
      NullPointerException - if the given application, HTTP session, and/or HTTP request is null.
  • Method Details

    • getHTTPSession

      public javax.servlet.http.HttpSession getHTTPSession()
      Returns:
      The HTTP servlet session with which this platform is associated.
    • getClientProduct

      public WebUserAgentProduct getClientProduct()
      Specified by:
      getClientProduct in interface Platform
      Specified by:
      getClientProduct in interface WebPlatform
      Returns:
      The user agent client, such as a browser, used to access Guise on this platform.
    • getJavaScriptProduct

      public Product getJavaScriptProduct()
      Returns:
      The JavaScript supported on this platform, or null if JavaScript is not supported or the JavaScript support is not yet known.
    • getDepictContext

      public WebDepictContext getDepictContext()
      Description copied from interface: WebPlatform
      Retrieves information and functionality related to the current depiction.
      Specified by:
      getDepictContext in interface Platform
      Specified by:
      getDepictContext in interface WebPlatform
      Returns:
      A context for the current depiction.
    • selectPlatformFiles

      public void selectPlatformFiles(boolean multiple, ValueSelectListener<Collection<PlatformFile>> platformFileSelectListener)
      Description copied from interface: Platform
      Selects one or more files on the platform, using the appropriate selection functionality for the platform.
      Specified by:
      selectPlatformFiles in interface Platform
      Parameters:
      multiple - Whether multiple files should be allowed to be selected.
      platformFileSelectListener - The listener that will be notified when platform files are selected.
    • uploadPlatformFiles

      public void uploadPlatformFiles(String destinationPath, Bookmark destinationBookmark, com.globalmentor.event.ProgressListener progressListener, PlatformFile... platformFiles)
      Uploads files from the platform.
      Parameters:
      destinationPath - The path representing the destination of the platform files, relative to the application.
      destinationBookmark - The bookmark to be used in uploading the platform files to the destination path, or null if no bookmark should be used.
      progressListener - The listener that will be notified when progress is made for a particular platform file upload.
      platformFiles - That platform files to upload.
      Throws:
      NullPointerException - if the given destination path and/or listener is null.
      IllegalArgumentException - if the provided path specifies a URI scheme (i.e. the URI is absolute) and/or authority.
      IllegalArgumentException - if the provided path is absolute.
      IllegalStateException - if one or more of the specified platform files can no longer be uploaded because, for example, other platform files have since been selected.
    • sendResource

      public void sendResource(com.globalmentor.net.URIPath resourcePath)
      Description copied from interface: Platform
      Sends a resource to the platform.
      Specified by:
      sendResource in interface Platform
      Parameters:
      resourcePath - The path of the resource to send, relative to the application.
    • sendResource

      public void sendResource(URI resourceURI)
      Description copied from interface: Platform
      Sends a resource to the platform.
      Specified by:
      sendResource in interface Platform
      Parameters:
      resourceURI - The URI of the resource to send, relative to the application.
    • sendResource

      public void sendResource(com.globalmentor.net.URIPath resourcePath, Bookmark bookmark)
      Description copied from interface: Platform
      Sends a resource to the platform with the specified bookmark.
      Specified by:
      sendResource in interface Platform
      Parameters:
      resourcePath - The path of the resource to send, relative to the application.
      bookmark - The bookmark at the given path, or null if there is no bookmark.
    • sendResource

      public void sendResource(URI resourceURI, Bookmark bookmark)
      Sends a resource to the platform.
      Specified by:
      sendResource in interface Platform
      Parameters:
      resourceURI - The URI of the resource to send, relative to the application.
      bookmark - The bookmark at the given path, or null if there is no bookmark.
      Throws:
      NullPointerException - if the given URI is null.