Class ODataMediaResourceCallable


  • @VelocityCallable("singleton")
    public final class ODataMediaResourceCallable
    extends Object
    Velocity callable for creating URIs to OData media resources.
    • Constructor Detail

      • ODataMediaResourceCallable

        public ODataMediaResourceCallable()
    • Method Detail

      • getDownloadURI

        public static String getDownloadURI​(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx,
                                            String p_strRecId,
                                            String p_strDgGuid)
        Creates the URI for downloading an OData media resource link entry.
        Parameters:
        p_ctx - The context.
        p_strRecId - The ID of the media link entry.
        p_strDgGuid - The data group GUID.
        Returns:
        The download URI.
      • getDownloadURI

        public static String getDownloadURI​(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx,
                                            String p_strRecId,
                                            String p_strDgGuid,
                                            String p_strFileName,
                                            String p_strContentDispositionType)
        Creates the URI for downloading an OData media resource link entry.
        Parameters:
        p_ctx - The context.
        p_strRecId - The ID of the media link entry.
        p_strDgGuid - The data group GUID.
        p_strFileName - Serves as a file name for the content-disposition header, otherwise null.
        p_strContentDispositionType - Defines the content-disposition type (either inline or attachment), otherwise null.
        Returns:
        The download URI.
      • getDownloadURIForBinaryProperty

        public static String getDownloadURIForBinaryProperty​(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx,
                                                             String p_strRecId,
                                                             String p_strDgGuid,
                                                             String p_strPropertyName,
                                                             String p_strFileName,
                                                             String p_strContentType,
                                                             String p_strContentDispositionType)
                                                      throws Exception
        Creates the URI for downloading a file with binary content provided by a Edm.Binary property.
        Parameters:
        p_ctx - The context.
        p_strRecId - The ID of the media link entry.
        p_strDgGuid - The GUID of the data group GUID containing the binary field.
        p_strPropertyName - The Edm.Binary property name.
        p_strFileName - Serves as a file name for the content-disposition header, otherwise null.
        p_strContentType - The content type.
        p_strContentDispositionType - Defines the content-disposition type (either inline or attachment), otherwise null.
        Returns:
        The download URI.
        Throws:
        Exception