Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 retrieve
        currentRevision - currentRevision
        element - document element
        filename - filename of the element
        download - set to true to force the browser to open a download box
        request - 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 retrieve
        revisionId - id of the revision to retrieve
        currentRevision - currentRevision
        ddcName - name of the ddc
        filename - filename
        download - set to true to force the browser to open a download box
        request - 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 element
        request - 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 retrieve
        ddc - ddc of the folder
        request - 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 name
        revisionId - the id of the document to retrieve
        ddcName - DDC name of the element
        tenant - Tenant
        request - request
        timeout - URL Timeout in days
        Returns:
        url as string
        Throws:
        java.io.UnsupportedEncodingException - unsupported encoding