Package com.jalios.jcms.media
Class MediaManager
java.lang.Object
com.jalios.jcms.media.MediaManager
Manager for Medias.
- Since:
- jcms-9.0.5
-
Method Summary
Modifier and TypeMethodDescriptionstatic MediaManagerGet the manager.getMediaTemplatePath(String templateName, Data data) Retrieve the path of the JSP suitable to display the specified Data.getMediaTemplatePath(String templateName, String mediaSource, String mediaContentType) Retrieve the path of the JSP suitable to display the specified media.
-
Method Details
-
getInstance
Get the manager.- Returns:
- MediaManager the singleton instance
-
getMediaTemplatePath
public String getMediaTemplatePath(String templateName, String mediaSource, String mediaContentType) Retrieve the path of the JSP suitable to display the specified media.- Parameters:
templateName- the name of the template to retrievemediaSource- the source of the media to display, can be a Data id, a path relative to the webapp root (eg. upload/docs/myfile.ext) or 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). This value is ignored if a Data id was specified- Returns:
- the relative path of the Media JSP template to use to display the specified media, may return null if no suitable template was found for the media
- Since:
- jcms-9.0.5
- See Also:
-
getMediaTemplatePath
Retrieve the path of the JSP suitable to display the specified Data.- Parameters:
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:
-