public final class MailUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
createDocumentLink(ResultProperties item,
int element,
String filename,
String baseUrl,
String tenant)
Creates a weblink to given file of the given document.
|
static String |
createDocumentZipLink(DocumentId documentId,
javax.servlet.http.HttpServletRequest request,
String filename,
String baseUrl,
long timeout,
String tenant)
Creates a weblink to all files of the given document as ZIP.
|
static String |
createDocumentZipLink(ResultProperties item,
String filename,
String baseUrl,
String tenant)
Creates a weblink to all files of the given document as ZIP.
|
static List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> |
getElementInfos(DocumentId documentId)
Gets a list of information for the elements of the given document.
|
static com.saperion.connector.formats.SourceFormat |
getSourceFormat(String filename)
Returns the
SourceFormat that matches the specified filename. |
static Map<com.saperion.connector.formats.SourceFormat,Integer> |
getSourceFormats(DocumentId documentId)
Returns a map with the
SourceFormat s of the elements of the document identified
by the specified ID. |
public static String createDocumentZipLink(ResultProperties item, String filename, String baseUrl, String tenant) throws com.saperion.util.LinkCreationException
item
- document for which the weblink should be createdfilename
- name of the resulting ZIP filebaseUrl
- URL to the REST webservicestenant
- name of the tenant. This would be used for authentication later (webservices)com.saperion.util.LinkCreationException
- if creation of link failespublic static String createDocumentZipLink(DocumentId documentId, javax.servlet.http.HttpServletRequest request, String filename, String baseUrl, long timeout, String tenant) throws com.saperion.util.LinkCreationException
documentId
- document for which the weblink should be createdrequest
- the current requestfilename
- name of the resulting ZIP filebaseUrl
- URL to the REST webservicestimeout
- timeout for the link in millisecondstenant
- the tenant of the current usercom.saperion.util.LinkCreationException
- if creation of link failespublic static String createDocumentLink(ResultProperties item, int element, String filename, String baseUrl, String tenant) throws com.saperion.util.LinkCreationException
item
- document for which the weblink should be createdelement
- number of the file for which the weblink should be createdfilename
- name of the file for which the weblink should be createdbaseUrl
- URL to the REST webservicestenant
- name of the tenant. This would be used for authentication later (webservices)com.saperion.util.LinkCreationException
- if creation of link failespublic static List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> getElementInfos(DocumentId documentId) throws AuthenticationException, SystemException
documentId
- document for which the element information is neededAuthenticationException
- if authentication is needed but not providedSystemException
- if an exception occures during calculation of element informationpublic static Map<com.saperion.connector.formats.SourceFormat,Integer> getSourceFormats(DocumentId documentId) throws DocumentIdentificationException, AuthenticationException, SystemException
SourceFormat
s of the elements of the document identified
by the specified ID. SourceFormat
s are mapped to a counter that shows how many
elements with the same format were found.documentId
- the ID of the documentDocumentIdentificationException
- when the ID did not contain the required informationAuthenticationException
- when the user was not logged in or has insufficient privileges to read the documentSystemException
- when the document could not be read due to a system-errorpublic static com.saperion.connector.formats.SourceFormat getSourceFormat(String filename)
SourceFormat
that matches the specified filename.filename
- filename to get a SourceFormat
forSourceFormat
Copyright © 2021 Hyland Software Germany GmbH. All rights reserved.