Package com.jalios.jcms.policy
Class BasicMediaTemplatePolicyFilter
- java.lang.Object
-
- com.jalios.jcms.policy.AbstractPolicyFilter
-
- com.jalios.jcms.policy.BasicMediaTemplatePolicyFilter
-
- All Implemented Interfaces:
PluginComponent,MediaTemplatePolicyFilter,PolicyFilter,java.lang.Comparable
public class BasicMediaTemplatePolicyFilter extends AbstractPolicyFilter implements MediaTemplatePolicyFilter, PluginComponent
Default implementation ofMediaTemplatePolicyFilterThis implementation does nothing.
- Since:
- jcms-9.0.5
- See Also:
MediaTemplatePolicyFilter
-
-
Field Summary
-
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
-
-
Constructor Summary
Constructors Constructor Description BasicMediaTemplatePolicyFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, Data data)Returns proposedmediaTemplatepath.java.lang.StringgetMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, java.lang.String mediaPath, java.lang.String mediaContentType)Returns proposedmediaTemplatepath.booleaninit(Plugin plugin)Initialize the component with the given plugin configuration-
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
-
-
-
-
Method Detail
-
init
public boolean init(Plugin plugin)
Description copied from interface:PluginComponentInitialize the component with the given plugin configuration- Specified by:
initin interfacePluginComponent- Parameters:
plugin- the calling plugin- Returns:
- true if the component has been correctly initialized.
- Since:
- jcms-9.0.5
- See Also:
PluginComponent.init(Plugin)
-
getMediaTemplatePath
public java.lang.String getMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, java.lang.String mediaPath, java.lang.String mediaContentType)Returns proposedmediaTemplatepath.- Specified by:
getMediaTemplatePathin interfaceMediaTemplatePolicyFilter- 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
- Since:
- jcms-9.0.5
- See Also:
MediaTemplatePolicyFilter.getMediaTemplatePath(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-
getMediaTemplatePath
public java.lang.String getMediaTemplatePath(java.lang.String mediaTemplatePath, java.lang.String templateName, Data data)Returns proposedmediaTemplatepath.- Specified by:
getMediaTemplatePathin interfaceMediaTemplatePolicyFilter- 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
- Since:
- jcms-9.0.5
- See Also:
MediaTemplatePolicyFilter.getMediaTemplatePath(java.lang.String, java.lang.String, com.jalios.jcms.Data)
-
-