Package com.jalios.jcms.policy
Interface MediaTemplatePolicyFilter
- 
- All Superinterfaces:
 java.lang.Comparable,PluginComponent,PolicyFilter
- All Known Implementing Classes:
 BasicMediaTemplatePolicyFilter
public interface MediaTemplatePolicyFilter extends PolicyFilter
This interface provides hooks around Media rendering.- Since:
 - jcms-9.0.5
 - Version:
 - $Revision: 118678 $
 - Author:
 - Sylvain Devaux
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREVISION 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, Data data)Retrieve the path of the JSP suitable to display the specified Data.java.lang.StringgetMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, java.lang.String mediaPath, java.lang.String mediaContentType)Retrieve the path of the JSP suitable to display the specified media.- 
Methods inherited from interface com.jalios.jcms.plugin.PluginComponent
init 
 - 
 
 - 
 
- 
- 
Field Detail
- 
REVISION
static final java.lang.String REVISION
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getMediaTemplatePath
java.lang.String getMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, java.lang.String mediaPath, java.lang.String mediaContentType)Retrieve the path of the JSP suitable to display the specified media.FileDocument can be retrieved with mediaPath using:
FileDocument fileDocument = FileDocument.getFileDocumentFromFilename(mediaPath);
- Parameters:
 mediaTemplatePath- proposed media template path (or path already overrided by other MediaTemplatePolicyFilter)templateName- the name of the template to retrievemediaPath- the path of the media to display, relative to the webapp root (eg. upload/docs/myfile.ext) can also be an URL such ashttps://www.youtube.com/watch?v=abc(if supported in template declarations)mediaContentType- the content type of the media to display (eg. image/jpeg)- Returns:
 - the relative path of the Media JSP template to use to display the specified media, may return null if no suitable template was find for the media
 
 
- 
getMediaTemplatePath
java.lang.String getMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, Data data)Retrieve the path of the JSP suitable to display the specified Data.- Parameters:
 mediaTemplatePath- proposed media template path (or path already overrided by other MediaTemplatePolicyFilter)templateName- the name of the template to retrievedata- the Data to display- Returns:
 - the relative path of the Media JSP template to use to display the specified Data
 
 
 - 
 
 -