Class ViewerControlServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.saperion.ngc.servlet.ViewerControlServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class ViewerControlServlet extends jakarta.servlet.http.HttpServlet
Servlet used to control the viewer-popups. It keeps track about the opened documents.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Request-parameter to pass actions.
    static final int
    Action used to notify the control servlet that the viewer window was closed.
    static final String
    Request-parameter to pass data required to perform the action.
    static final int
    Action used to notify the control servlet that the user changed the displayed element.
    static final int
    Action used to notify the control servlet that a new element was selected in Hyland Viewer.
    static final int
    Action used to get the render-mode for a pdfjs-viewer.
    static final String
    Request-parameter to signalize that an element should be marked for rendering.
    static final int
    Action used to notify the control servlet that the user rotated the document.
    static final int
    Action used to trogger a multi-element download from SAPViewer.
    static final int
    Action used to notify the control servlet that a new element was selected in SAP Viewer.
    static final int
    Action used to keep sessions alive.
    static final int
    Action used to keep sessions alive.
    static final int
    Action used to request resources needed to create a mailto link (webservices downloadlink) on the client.
    static final int
    Action used to request resources needed to create a mailto link (SapViewer link) on the client.
    static final int
    Action used to notify the control servlet that the SAPViewer received a new URL.
    static final int
    Action used to get resources needed for SAPViewer.jsp.
    static final String
    Request-parameter to decide whether to send plain ID or not.

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
    Servlet's post-method.
    protected boolean
    isSizeLimitEnabled(long maxViewSize)
    Tells if the size limit for viewing documents is enabled.

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, init, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ELEMENT_CHANGE

      public static final int ELEMENT_CHANGE
      Action used to notify the control servlet that the user changed the displayed element.
      See Also:
    • CLOSE

      public static final int CLOSE
      Action used to notify the control servlet that the viewer window was closed.
      See Also:
    • ROTATE

      public static final int ROTATE
      Action used to notify the control servlet that the user rotated the document.
      See Also:
    • SAPVIEWER_NEW_URL

      public static final int SAPVIEWER_NEW_URL
      Action used to notify the control servlet that the SAPViewer received a new URL.
      See Also:
    • SAPVIEWER_RESOURCES

      public static final int SAPVIEWER_RESOURCES
      Action used to get resources needed for SAPViewer.jsp.
      See Also:
    • SAPVIEWER_DOWNLOAD

      public static final int SAPVIEWER_DOWNLOAD
      Action used to trogger a multi-element download from SAPViewer.
      See Also:
    • SAPVIEWER_KEEPALIVE

      public static final int SAPVIEWER_KEEPALIVE
      Action used to keep sessions alive.
      See Also:
    • SAPVIEWER_GET_DOCINFO

      public static final int SAPVIEWER_GET_DOCINFO
      Action used to keep sessions alive.
      See Also:
    • PDFJS_VIEWER_DISPLAYMODE

      public static final int PDFJS_VIEWER_DISPLAYMODE
      Action used to get the render-mode for a pdfjs-viewer.
      See Also:
    • SAPVIEWER_ELEMENT_CHANGE

      public static final int SAPVIEWER_ELEMENT_CHANGE
      Action used to notify the control servlet that a new element was selected in SAP Viewer.
      See Also:
    • HYLAND_VIEWER_ELEMENT_CHANGE

      public static final int HYLAND_VIEWER_ELEMENT_CHANGE
      Action used to notify the control servlet that a new element was selected in Hyland Viewer.
      See Also:
    • ACTION

      public static final String ACTION
      Request-parameter to pass actions.
      See Also:
    • DATA

      public static final String DATA
      Request-parameter to pass data required to perform the action.
      See Also:
    • RENDER_TARGET

      public static final String RENDER_TARGET
      Request-parameter to signalize that an element should be marked for rendering.
      See Also:
    • SEND_PLAIN_ID

      public static final String SEND_PLAIN_ID
      Request-parameter to decide whether to send plain ID or not.
      See Also:
  • Constructor Details

    • ViewerControlServlet

      public ViewerControlServlet()
  • Method Details

    • doPost

      protected void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException
      Servlet's post-method. Can be used to store information about a document opened in one specific viewer in the session.
      URL-Parameters:
      • action : defines the action to perform
      • data : data needed to perform the action or null
      • popupId : ID of the viewer-popup
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Parameters:
      req - serlvet request
      resp - servlet response
      Throws:
      jakarta.servlet.ServletException - servlet exception
      IOException - IO exception
      See Also:
      • HttpServlet.doPost(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
    • isSizeLimitEnabled

      protected boolean isSizeLimitEnabled(long maxViewSize)
      Tells if the size limit for viewing documents is enabled. Therefore the max view size must be set to an integer value > 0.
      Returns:
      True if the max view size > 0, false else.