Package com.saperion.ngc.servlet
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
FieldsModifier and TypeFieldDescriptionstatic 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
Field Details
-
ELEMENT_CHANGE
public static final int ELEMENT_CHANGEAction used to notify the control servlet that the user changed the displayed element.- See Also:
-
CLOSE
public static final int CLOSEAction used to notify the control servlet that the viewer window was closed.- See Also:
-
ROTATE
public static final int ROTATEAction used to notify the control servlet that the user rotated the document.- See Also:
-
SAPVIEWER_NEW_URL
public static final int SAPVIEWER_NEW_URLAction used to notify the control servlet that the SAPViewer received a new URL.- See Also:
-
SAPVIEWER_RESOURCES
public static final int SAPVIEWER_RESOURCESAction used to get resources needed for SAPViewer.jsp.- See Also:
-
SAPVIEWER_DOWNLOAD
public static final int SAPVIEWER_DOWNLOADAction used to trogger a multi-element download from SAPViewer.- See Also:
-
SAPVIEWER_KEEPALIVE
public static final int SAPVIEWER_KEEPALIVEAction used to keep sessions alive.- See Also:
-
SAPVIEWER_GET_DOCINFO
public static final int SAPVIEWER_GET_DOCINFOAction used to keep sessions alive.- See Also:
-
PDFJS_VIEWER_DISPLAYMODE
public static final int PDFJS_VIEWER_DISPLAYMODEAction used to get the render-mode for a pdfjs-viewer.- See Also:
-
SAPVIEWER_ELEMENT_CHANGE
public static final int SAPVIEWER_ELEMENT_CHANGEAction used to notify the control servlet that a new element was selected in SAP Viewer.- See Also:
-
SAPVIEWER_MAIL_SHARELINK
public static final int SAPVIEWER_MAIL_SHARELINKAction used to request resources needed to create a mailto link (SapViewer link) on the client.- See Also:
-
SAPVIEWER_MAIL_DOWNLOADLINK
public static final int SAPVIEWER_MAIL_DOWNLOADLINKAction used to request resources needed to create a mailto link (webservices downloadlink) on the client.- See Also:
-
HYLAND_VIEWER_ELEMENT_CHANGE
public static final int HYLAND_VIEWER_ELEMENT_CHANGEAction used to notify the control servlet that a new element was selected in Hyland Viewer.- See Also:
-
ACTION
Request-parameter to pass actions.- See Also:
-
DATA
Request-parameter to pass data required to perform the action.- See Also:
-
RENDER_TARGET
Request-parameter to signalize that an element should be marked for rendering.- See Also:
-
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 classjakarta.servlet.http.HttpServlet
- Parameters:
req
- serlvet requestresp
- servlet response- Throws:
jakarta.servlet.ServletException
- servlet exceptionIOException
- 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.
-