Class BasicMediaTemplatePolicyFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMediaTemplatePath​(java.lang.String mediaTemplatePath, java.lang.String templateName, Data data)
      Returns proposed mediaTemplatepath.
      java.lang.String getMediaTemplatePath​(java.lang.String mediaTemplatePath, java.lang.String templateName, java.lang.String mediaPath, java.lang.String mediaContentType)
      Returns proposed mediaTemplatepath.
      boolean init​(Plugin plugin)
      Initialize the component with the given plugin configuration
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Constructor Detail

      • BasicMediaTemplatePolicyFilter

        public BasicMediaTemplatePolicyFilter()
    • Method Detail

      • init

        public boolean init​(Plugin plugin)
        Description copied from interface: PluginComponent
        Initialize the component with the given plugin configuration
        Specified by:
        init in interface PluginComponent
        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 proposed mediaTemplatepath.
        Specified by:
        getMediaTemplatePath in interface MediaTemplatePolicyFilter
        Parameters:
        mediaTemplatePath - proposed media template path (or path already overrided by other MediaTemplatePolicyFilter)
        templateName - the name of the template to retrieve
        mediaPath - the path of the media to display, relative to the webapp root (eg. upload/docs/myfile.ext) can also be an URL such as https://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)