Package com.saperion.ngc.servlet
Class MailUrl
java.lang.Object
com.saperion.ngc.servlet.MailUrl
- Author:
- rbo
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
constructDocumentMailUrl
(String revisionId, boolean currentRevision, int element, String filename, boolean download, jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve the document with the specified document id.static String
constructFileMailUrl
(String folderid, String ddc, jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve the file with the specified file id.static String
constructLinkMailUrl
(String appName, String revisionId, String ddcName, String tenant, jakarta.servlet.http.HttpServletRequest request, int timeout) Constructs the url to retrieve the document with the specified document id.static String
constructListMailUrl
(String revisionIds, String filename, jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve the document with the specified document id.static String
constructPdfMailUrl
(String objectId, String revisionId, boolean currentRevision, String ddcName, String filename, boolean download, jakarta.servlet.http.HttpServletRequest request) Constructs the url to retrieve the document with the specified document id rendered as PDF.
-
Field Details
-
WEBLINK_URL
- See Also:
-
-
Method Details
-
constructDocumentMailUrl
public static String constructDocumentMailUrl(String revisionId, boolean currentRevision, int element, String filename, boolean download, jakarta.servlet.http.HttpServletRequest request) throws UnsupportedEncodingException Constructs the url to retrieve the document with the specified document id.- Parameters:
revisionId
- the id of the document to retrievecurrentRevision
- currentRevisionelement
- document elementfilename
- filename of the elementdownload
- set to true to force the browser to open a download boxrequest
- request- Returns:
- url as string
- Throws:
UnsupportedEncodingException
- unsupported encoding
-
constructPdfMailUrl
public static String constructPdfMailUrl(String objectId, String revisionId, boolean currentRevision, String ddcName, String filename, boolean download, jakarta.servlet.http.HttpServletRequest request) throws UnsupportedEncodingException Constructs the url to retrieve the document with the specified document id rendered as PDF.- Parameters:
objectId
- id of the document to retrieverevisionId
- id of the revision to retrievecurrentRevision
- currentRevisionddcName
- name of the ddcfilename
- filenamedownload
- set to true to force the browser to open a download boxrequest
- request- Returns:
- url as string
- Throws:
UnsupportedEncodingException
- unsupported encoding
-
constructListMailUrl
public static String constructListMailUrl(String revisionIds, String filename, jakarta.servlet.http.HttpServletRequest request) throws UnsupportedEncodingException Constructs the url to retrieve the document with the specified document id.- Parameters:
revisionIds
- the id's of the document to retrieve (semicolon separated)filename
- filename of the elementrequest
- request- Returns:
- url as string
- Throws:
UnsupportedEncodingException
- unsupported encoding
-
constructFileMailUrl
public static String constructFileMailUrl(String folderid, String ddc, jakarta.servlet.http.HttpServletRequest request) throws UnsupportedEncodingException Constructs the url to retrieve the file with the specified file id.- Parameters:
folderid
- the id's of the file to retrieveddc
- ddc of the folderrequest
- request- Returns:
- url as string
- Throws:
UnsupportedEncodingException
- unsupported encoding
-
constructLinkMailUrl
public static String constructLinkMailUrl(String appName, String revisionId, String ddcName, String tenant, jakarta.servlet.http.HttpServletRequest request, int timeout) throws UnsupportedEncodingException Constructs the url to retrieve the document with the specified document id.- Parameters:
appName
- Application namerevisionId
- the id of the document to retrieveddcName
- DDC name of the elementtenant
- Tenantrequest
- requesttimeout
- URL Timeout in days- Returns:
- url as string
- Throws:
UnsupportedEncodingException
- unsupported encoding
-