Class GroovyFileUrlBuilder


  • @Scriptable
    public final class GroovyFileUrlBuilder
    extends Object
    • Method Detail

      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            de.uplanet.lucy.server.util.IVHFileAdapterDescriptor p_fileDescriptor)
                                     throws Exception
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_fileDescriptor - The file descriptor
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       de.uplanet.lucy.server.util.IVHFileAdapterDescriptor p_fileDescriptor)
                                                throws Exception
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_fileDescriptor - The file descriptor
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            de.uplanet.lucy.server.util.IVHFileAdapterDescriptor p_fileDescriptor,
                                            boolean p_bAsAttachment)
                                     throws Exception
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_fileDescriptor - The file descriptor
        p_bAsAttachment - Download link as attachment otherwise inline
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       de.uplanet.lucy.server.util.IVHFileAdapterDescriptor p_fileDescriptor,
                                                       boolean p_bAsAttachment)
                                                throws Exception
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_fileDescriptor - The file descriptor
        p_bAsAttachment - Download link as attachment otherwise inline
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            String p_strRecId,
                                            String p_strFileId,
                                            Date p_lastModified)
                                     throws Exception
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        p_lastModified - The last modified date. (maybe required for browser cache reasons, could be null or a dummy date.)
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       String p_strRecId,
                                                       String p_strFileId,
                                                       Date p_lastModified)
                                                throws Exception
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        p_lastModified - The last modified date. (maybe required for browser cache reasons, could be null or a dummy date.)
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            String p_strRecId,
                                            String p_strFileId,
                                            Date p_lastModified,
                                            boolean p_bAsAttachment)
                                     throws Exception
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        p_lastModified - The last modified date. (maybe required for browser cache reasons, could be null or a dummy date.)
        p_bAsAttachment - Download link as attachment otherwise inline
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       String p_strRecId,
                                                       String p_strFileId,
                                                       Date p_lastModified,
                                                       boolean p_bAsAttachment)
                                                throws Exception
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        p_lastModified - The last modified date. (maybe required for browser cache reasons, could be null or a dummy date.)
        p_bAsAttachment - Download link as attachment otherwise inline
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            String p_strRecId,
                                            String p_strFileId)
                                     throws Exception
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       String p_strRecId,
                                                       String p_strFileId)
                                                throws Exception
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            String p_strRecId,
                                            String p_strFileId,
                                            boolean p_bAsAttachment)
                                     throws Exception
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        p_bAsAttachment - Download link as attachment otherwise inline.
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       String p_strRecId,
                                                       String p_strFileId,
                                                       boolean p_bAsAttachment)
                                                throws Exception
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_strFileId - The file record id. If null the first file will be returned.
        p_bAsAttachment - Download link as attachment otherwise inline.
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            String p_strRecId)
                                     throws Exception
        Returns the first file.
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       String p_strRecId)
                                                throws Exception
        Returns the first file.
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadUrl

        public static String getDownloadUrl​(IRequestProcessingContext p_ctx,
                                            String p_strGuid,
                                            String p_strRecId,
                                            boolean p_bAttachment)
                                     throws Exception
        Parameters:
        p_ctx - The processing context
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_bAttachment - Download link as attachment otherwise inline
        Returns:
        The download URL.
        Throws:
        Exception
      • getDownloadQueryComponent

        public static String getDownloadQueryComponent​(String p_strQueryPrefix,
                                                       String p_strGuid,
                                                       String p_strRecId,
                                                       boolean p_bAttachment)
                                                throws Exception
        Parameters:
        p_strQueryPrefix - The query prefix. Result will be the concatenation of this prefix and the query component.
        p_strGuid - The control or adapter GUID.
        p_strRecId - The record id.
        p_bAttachment - Download link as attachment otherwise inline.
        Returns:
        The download URL.
        Throws:
        Exception