Package com.saperion.ngc.servlet
Class ServletUrl
java.lang.Object
com.saperion.ngc.servlet.ServletUrl
Utility class to construct the URLs required to access the servlets.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringAnnotations servlet url part.static final StringInit parameter for Viewer baseURL.static final StringClient locale attribute.static final StringContent servlet url part.static final StringContent list session attribute.static final StringDDC name attribute.static final StringName for document element attribute used in streaming-servlet request.static final StringDownload attribute.static final StringEdit mode attribute.static final StringFilename attribute.static final StringCharset used to encode the filename.static final StringAnnotations servlet url part.static final StringSearch servlet url part.static final StringMashup-servlet.static final StringName for object id (sysrowid) attribute used in streaming-servlet request.static final StringPDF content Servlet URL part.static final StringcurrentRevision.static final StringName for revision id (hdoc) attribute used in streaming-servlet request.static final StringSAP-Notes retrieval- and storage-servlet.static final StringUpload-Annotations servlet url part.static final StringView-content servlet url part.static final StringView-temporary-content servlet url part.static final StringViewer-Control-Servlet URL part.static final StringPopup-id parameter.static final StringZIP servlet url part.
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringconstructDocumentUrl(String revisionId, boolean currentRevision, int element, String filename, boolean download, jakarta.servlet.http.HttpServletRequest request) Deprecated.download parameter will be removed and set to true in version 8.1.static StringconstructDocumentUrl(String revisionId, boolean currentRevision, int element, String filename, jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve the document with the specified document id.static StringconstructGetPdfUrl(jakarta.servlet.http.HttpServletRequest request, String objectId, String revisionId, String ddcName, String filename, boolean currentRevision) Constructs the URL for a PDF document.static StringconstructGetPdfUrl(jakarta.servlet.http.HttpServletRequest request, String objectId, String revisionId, String ddcName, String filename, boolean currentRevision, boolean download) Deprecated.download parameter will be removed and set to true in version 8.1.static StringconstructMashupUrl(String filename, jakarta.servlet.http.HttpServletRequest request) Constructs the url that is required to access the mashup-servlet.static StringconstructSapNotesUrl(jakarta.servlet.http.HttpServletRequest request) Constructs the URL that can be used to get or post sap notes from or to the SAPViewerNotesServlet.static StringconstructSearchJadiceUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to fulltext search.static StringconstructTimelineUrl(DocumentId documentId, jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve revision infos for timeline components.static StringconstructViewAnnotationsUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view annotations.static StringconstructViewDocumentUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view a document.static StringconstructViewerControlUrl(jakarta.servlet.http.HttpServletRequest request) Constructs the URL that can be used to contact the ViewerControlServlet.static StringconstructViewerControlUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL that can be used to contact the ViewerControlServlet.static StringconstructViewJadiceAnnoUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view annotations.static StringconstructViewTemporaryDocumentUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view a temporary document.static StringconstructZipUrl(jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve document content as zip file.static StringgetBaseUrl(jakarta.servlet.http.HttpServletRequest request) Returns the base url of the current request without the session id.static StringgetBaseUrl(jakarta.servlet.http.HttpServletRequest request, String servletUrlPart) Returns the base url of the current request.static StringgetBaseUrl(jakarta.servlet.ServletContext servletContext) Returns the base URL of the webclient.static booleanurlSessionTrackingUsed(jakarta.servlet.http.HttpSession session) Checks if sessions are tracked by URL-rewriting (adding ;jsessionid).
- 
Field Details- 
FILENAME_ENCODINGCharset used to encode the filename.- See Also:
 
- 
ANNOTATIONSAnnotations servlet url part.- See Also:
 
- 
JADICEANNOAnnotations servlet url part.- See Also:
 
- 
JADICESEARCHSearch servlet url part.- See Also:
 
- 
UPLOAD_ANNOTATIONSUpload-Annotations servlet url part.- See Also:
 
- 
ZIPZIP servlet url part.- See Also:
 
- 
CONTENTContent servlet url part.- See Also:
 
- 
VIEW_CONTENTView-content servlet url part.- See Also:
 
- 
VIEW_TEMPORARY_CONTENTView-temporary-content servlet url part.- See Also:
 
- 
VIEWER_CONTROLViewer-Control-Servlet URL part.- See Also:
 
- 
PDFCONTENTPDF content Servlet URL part.- See Also:
 
- 
SAP_NOTESSAP-Notes retrieval- and storage-servlet.- See Also:
 
- 
MASHUPMashup-servlet.- See Also:
 
- 
OBJ_ID_ATTRName for object id (sysrowid) attribute used in streaming-servlet request.- See Also:
 
- 
REV_ID_ATTRName for revision id (hdoc) attribute used in streaming-servlet request.- See Also:
 
- 
REV_CURRENT_REVISIONcurrentRevision.- See Also:
 
- 
DOC_ELEMENT_ATTRName for document element attribute used in streaming-servlet request.- See Also:
 
- 
FILENAME_ATTRFilename attribute.- See Also:
 
- 
DDC_NAME_ATTRDDC name attribute.- See Also:
 
- 
EDIT_MODEEdit mode attribute.- See Also:
 
- 
CLIENT_LOCALEClient locale attribute.- See Also:
 
- 
DOWNLOAD_MODEDownload attribute.- See Also:
 
- 
CONTENT_LISTContent list session attribute.- See Also:
 
- 
BASE_URLInit parameter for Viewer baseURL.- See Also:
 
- 
VIEWER_IDPopup-id parameter.- See Also:
 
 
- 
- 
Method Details- 
constructDocumentUrl@Deprecated public static String constructDocumentUrl(String revisionId, boolean currentRevision, int element, String filename, boolean download, jakarta.servlet.http.HttpServletRequest request) throws UnsupportedEncodingException Deprecated.download parameter will be removed and set to true in version 8.1. UseconstructDocumentUrl(String, boolean, int, String, HttpServletRequest)instead.Constructs the url to retrieve the document with the specified document id.- Parameters:
- revisionId- the id of the document to retrieve
- currentRevision- currentRevision
- element- document element
- filename- filename of the element
- download- set to true to force the browser to open a download box
 overwritten if NgClientConstants.WEBCONFIG_ALWAYS_ATTACH_DOCUMENT_DOWNLOAD is true
- request- request
- Returns:
- url as string
- Throws:
- UnsupportedEncodingException- unsupported encoding
 
- 
constructDocumentUrlpublic static String constructDocumentUrl(String revisionId, boolean currentRevision, int element, String filename, jakarta.servlet.http.HttpServletRequest request) throws UnsupportedEncodingException Constructs the url to retrieve the document with the specified document id.Download the document as attachment. Force the browser to open a download box - Parameters:
- revisionId- the id of the document to retrieve
- currentRevision- currentRevision
- element- document element
- filename- filename of the element
- request- request
- Returns:
- url as string
- Throws:
- UnsupportedEncodingException- unsupported encoding
 
- 
constructMashupUrlpublic static String constructMashupUrl(String filename, jakarta.servlet.http.HttpServletRequest request) Constructs the url that is required to access the mashup-servlet.- Parameters:
- filename- Filename
- request- current servlet request
- Returns:
- Mashup URL
 
- 
constructZipUrlConstructs the url to retrieve document content as zip file. The ZIP servlet requires the list of content to be set as session attributeCONTENT_LIST. (The attribute is removed by the servlet after the ZIP was constructed).- Parameters:
- request- request
- Returns:
- url
 
- 
constructTimelineUrlpublic static String constructTimelineUrl(DocumentId documentId, jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve revision infos for timeline components.- Parameters:
- documentId- document id
- request- request
- Returns:
- url
 
- 
getBaseUrlpublic static String getBaseUrl(jakarta.servlet.http.HttpServletRequest request, String servletUrlPart) Returns the base url of the current request. The session id will be contained if the session-tracking-mode is set to URL.- Parameters:
- request- request
- servletUrlPart- the part of the url that identifies the servlet (with leading /)
- Returns:
- base url
 
- 
getBaseUrlReturns the base url of the current request without the session id.- Parameters:
- request- request
- Returns:
- base url
 
- 
constructViewerControlUrlConstructs the URL that can be used to contact the ViewerControlServlet.- Parameters:
- request- servlet request
- Returns:
- URL as string
 
- 
constructViewerControlUrlpublic static String constructViewerControlUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL that can be used to contact the ViewerControlServlet.- Parameters:
- request- servlet request
- viewerId- ID of the viewer
- Returns:
- URL as string
 
- 
constructSapNotesUrlConstructs the URL that can be used to get or post sap notes from or to the SAPViewerNotesServlet.- Parameters:
- request- servlet request
- Returns:
- URL as string
 
- 
constructViewDocumentUrlpublic static String constructViewDocumentUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view a document.- Parameters:
- request- servlet request
- viewerId- viewer ID
- Returns:
- URL as string
 
- 
constructViewTemporaryDocumentUrlpublic static String constructViewTemporaryDocumentUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view a temporary document.- Parameters:
- request- servlet request
- viewerId- viewer ID
- Returns:
- URL as string
 
- 
constructViewAnnotationsUrlpublic static String constructViewAnnotationsUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view annotations.- Parameters:
- request- servlet request
- viewerId- viewer ID
- Returns:
- URL as string
 
- 
constructViewJadiceAnnoUrlpublic static String constructViewJadiceAnnoUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to view annotations.- Parameters:
- request- servlet request
- viewerId- viewer ID
- Returns:
- URL as string
 
- 
constructGetPdfUrl@Deprecated public static String constructGetPdfUrl(jakarta.servlet.http.HttpServletRequest request, String objectId, String revisionId, String ddcName, String filename, boolean currentRevision, boolean download) Deprecated.download parameter will be removed and set to true in version 8.1. UseconstructGetPdfUrl(HttpServletRequest, String, String, String, String, boolean)instead.Constructs the url for a PDF document.- Parameters:
- request- the http request to set the given parameters
- objectId- the sysrowid attribute
- revisionId- name for revision id (hdoc) attribute
- ddcName- the ddc name
- filename- attribute
- currentRevision- if true, current revision is used
- download- if true, the references PDF will get downloaded and not displayed inline
- Returns:
- the URL string
 
- 
constructGetPdfUrlpublic static String constructGetPdfUrl(jakarta.servlet.http.HttpServletRequest request, String objectId, String revisionId, String ddcName, String filename, boolean currentRevision) Constructs the URL for a PDF document.Download the document as attachment. Force the browser to open a download box. - Parameters:
- request- the http request to set the given parameters
- objectId- the sysrowid attribute
- revisionId- name for revision id (hdoc) attribute
- ddcName- the ddc name
- filename- attribute
- currentRevision- if true, current revision is used
- Returns:
- the request URL as string
 
- 
constructSearchJadiceUrlpublic static String constructSearchJadiceUrl(jakarta.servlet.http.HttpServletRequest request, String viewerId) Constructs the URL needed to fulltext search.- Parameters:
- request- servlet request
- viewerId- viewer ID
- Returns:
- URL as string
 
- 
urlSessionTrackingUsedpublic static boolean urlSessionTrackingUsed(jakarta.servlet.http.HttpSession session) Checks if sessions are tracked by URL-rewriting (adding ;jsessionid). This can be configured in web.xml.- Parameters:
- session- current session
- Returns:
- true if sessions are tracked by URL
 
- 
getBaseUrlReturns the base URL of the webclient. If it is configured in webclient.properties, the configured value will be returned. If not, the servlet context is used to auto-determine the URL.- Parameters:
- servletContext- the context of the current servlet
- Returns:
- the base URL of the webclient
 
 
-