Class ODataMediaResourceCallable
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.odata.ODataMediaResourceCallable
-
@VelocityCallable("singleton") public final class ODataMediaResourceCallable extends Object
Velocity callable for creating URIs to OData media resources.
-
-
Constructor Summary
Constructors Constructor Description ODataMediaResourceCallable()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.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)
Creates the URI for downloading a file with binary content provided by a Edm.Binary property.
-
-
-
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, otherwisenull
.p_strContentDispositionType
- Defines the content-disposition type (eitherinline
orattachment
), otherwisenull
.- 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, otherwisenull
.p_strContentType
- The content type.p_strContentDispositionType
- Defines the content-disposition type (eitherinline
orattachment
), otherwisenull
.- Returns:
- The download URI.
- Throws:
Exception
-
-