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,Comparable
public class BasicMediaTemplatePolicyFilter
extends AbstractPolicyFilter
implements MediaTemplatePolicyFilter, PluginComponent
Default implementation of
MediaTemplatePolicyFilter
This implementation does nothing.
- Since:
- jcms-9.0.5
- See Also:
-
Field Summary
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMediaTemplatePath(String mediaTemplatePath, String templateName, Data data) Returns proposedmediaTemplatepath.getMediaTemplatePath(String mediaTemplatePath, String templateName, String mediaPath, String mediaContentType) Returns proposedmediaTemplatepath.booleanInitialize the component with the given plugin configurationMethods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrderMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
BasicMediaTemplatePolicyFilter
public BasicMediaTemplatePolicyFilter()
-
-
Method Details
-
init
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:
-
getMediaTemplatePath
public String getMediaTemplatePath(String mediaTemplatePath, String templateName, String mediaPath, 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:
-
getMediaTemplatePath
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:
-