Class ViewerControlServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

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

      Fields 
      Modifier and Type Field Description
      static java.lang.String ACTION
      Request-parameter to pass actions.
      static int CLOSE
      Action used to notify the control servlet that the viewer window was closed.
      static java.lang.String DATA
      Request-parameter to pass data required to perform the action.
      static int ELEMENT_CHANGE
      Action used to notify the control servlet that the user changed the displayed element.
      static int HYLAND_VIEWER_ELEMENT_CHANGE
      Action used to notify the control servlet that a new element was selected in Hyland Viewer.
      static int HYLAND_VIEWER_NAVIGATE_DOCUMENTS
      Action used to request the control servlet to fetch the next document in the structure.
      static int HYLAND_VIEWER_NAVIGATE_ELEMENTS
      Action used to request the control servlet to fetch the next element in the structure.
      static int PDFJS_VIEWER_DISPLAYMODE
      Action used to get the render-mode for a pdfjs-viewer.
      static java.lang.String RENDER_TARGET
      Request-parameter to signalize that an element should be marked for rendering.
      static int ROTATE
      Action used to notify the control servlet that the user rotated the document.
      static int SAPVIEWER_DOWNLOAD
      Action used to trogger a multi-element download from SAPViewer.
      static int SAPVIEWER_ELEMENT_CHANGE
      Action used to notify the control servlet that a new element was selected in SAP Viewer.
      static int SAPVIEWER_GET_DOCINFO
      Action used to keep sessions alive.
      static int SAPVIEWER_KEEPALIVE
      Action used to keep sessions alive.
      static int SAPVIEWER_MAIL_DOWNLOADLINK
      Action used to request resources needed to create a mailto link (webservices downloadlink) on the client.
      static int SAPVIEWER_MAIL_SHARELINK
      Action used to request resources needed to create a mailto link (SapViewer link) on the client.
      static int SAPVIEWER_NEW_URL
      Action used to notify the control servlet that the SAPViewer received a new URL.
      static int SAPVIEWER_RESOURCES
      Action used to get resources needed for SAPViewer.jsp.
      static java.lang.String SEND_PLAIN_ID
      Request-parameter to decide whether to send plain ID or not.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doPost​(javax.servlet.http.HttpServletRequest req, javax.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 javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • Methods inherited from class java.lang.Object

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

      • ELEMENT_CHANGE

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

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

        public static final int ROTATE
        Action used to notify the control servlet that the user rotated the document.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • SAPVIEWER_RESOURCES

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

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

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

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

        public static final int PDFJS_VIEWER_DISPLAYMODE
        Action used to get the render-mode for a pdfjs-viewer.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • SAPVIEWER_MAIL_SHARELINK

        public static final int SAPVIEWER_MAIL_SHARELINK
        Action used to request resources needed to create a mailto link (SapViewer link) on the client.
        See Also:
        Constant Field Values
      • SAPVIEWER_MAIL_DOWNLOADLINK

        public static final int SAPVIEWER_MAIL_DOWNLOADLINK
        Action used to request resources needed to create a mailto link (webservices downloadlink) on the client.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • HYLAND_VIEWER_NAVIGATE_ELEMENTS

        public static final int HYLAND_VIEWER_NAVIGATE_ELEMENTS
        Action used to request the control servlet to fetch the next element in the structure.
        See Also:
        Constant Field Values
      • HYLAND_VIEWER_NAVIGATE_DOCUMENTS

        public static final int HYLAND_VIEWER_NAVIGATE_DOCUMENTS
        Action used to request the control servlet to fetch the next document in the structure.
        See Also:
        Constant Field Values
      • ACTION

        public static final java.lang.String ACTION
        Request-parameter to pass actions.
        See Also:
        Constant Field Values
      • DATA

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

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

        public static final java.lang.String SEND_PLAIN_ID
        Request-parameter to decide whether to send plain ID or not.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ViewerControlServlet

        public ViewerControlServlet()
    • Method Detail

      • doPost

        protected void doPost​(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse resp)
                       throws javax.servlet.ServletException,
                              java.io.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 javax.servlet.http.HttpServlet
        Parameters:
        req - serlvet request
        resp - servlet response
        Throws:
        javax.servlet.ServletException - servlet exception
        java.io.IOException - IO exception
        See Also:
        HttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.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.