Package com.saperion.ngc.servlet
Class MailUrl
- java.lang.Object
-
- com.saperion.ngc.servlet.MailUrl
-
public final class MailUrl extends java.lang.Object
- Author:
- rbo
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
WEBLINK_URL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
constructDocumentMailUrl(java.lang.String revisionId, boolean currentRevision, int element, java.lang.String filename, boolean download, javax.servlet.http.HttpServletRequest request)
Constructs the url to retrieve the document with the specified document id.static java.lang.String
constructFileMailUrl(java.lang.String folderid, java.lang.String ddc, javax.servlet.http.HttpServletRequest request)
Constructs the url to retrieve the file with the specified file id.static java.lang.String
constructLinkMailUrl(java.lang.String appName, java.lang.String revisionId, java.lang.String ddcName, java.lang.String tenant, javax.servlet.http.HttpServletRequest request, int timeout)
Constructs the url to retrieve the document with the specified document id.static java.lang.String
constructListMailUrl(java.lang.String revisionIds, java.lang.String filename, javax.servlet.http.HttpServletRequest request)
Constructs the url to retrieve the document with the specified document id.static java.lang.String
constructPdfMailUrl(java.lang.String objectId, java.lang.String revisionId, boolean currentRevision, java.lang.String ddcName, java.lang.String filename, boolean download, javax.servlet.http.HttpServletRequest request)
Constructs the url to retrieve the document with the specified document id rendered as PDF.
-
-
-
Field Detail
-
WEBLINK_URL
public static final java.lang.String WEBLINK_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
constructDocumentMailUrl
public static java.lang.String constructDocumentMailUrl(java.lang.String revisionId, boolean currentRevision, int element, java.lang.String filename, boolean download, javax.servlet.http.HttpServletRequest request) throws java.io.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:
java.io.UnsupportedEncodingException
- unsupported encoding
-
constructPdfMailUrl
public static java.lang.String constructPdfMailUrl(java.lang.String objectId, java.lang.String revisionId, boolean currentRevision, java.lang.String ddcName, java.lang.String filename, boolean download, javax.servlet.http.HttpServletRequest request) throws java.io.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:
java.io.UnsupportedEncodingException
- unsupported encoding
-
constructListMailUrl
public static java.lang.String constructListMailUrl(java.lang.String revisionIds, java.lang.String filename, javax.servlet.http.HttpServletRequest request) throws java.io.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:
java.io.UnsupportedEncodingException
- unsupported encoding
-
constructFileMailUrl
public static java.lang.String constructFileMailUrl(java.lang.String folderid, java.lang.String ddc, javax.servlet.http.HttpServletRequest request) throws java.io.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:
java.io.UnsupportedEncodingException
- unsupported encoding
-
constructLinkMailUrl
public static java.lang.String constructLinkMailUrl(java.lang.String appName, java.lang.String revisionId, java.lang.String ddcName, java.lang.String tenant, javax.servlet.http.HttpServletRequest request, int timeout) throws java.io.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:
java.io.UnsupportedEncodingException
- unsupported encoding
-
-