Package com.jalios.jcms.media
Class MediaManager
- java.lang.Object
 - 
- com.jalios.jcms.media.MediaManager
 
 
- 
public class MediaManager extends java.lang.ObjectManager for Medias.- Since:
 - jcms-9.0.5
 - Version:
 - $Revision: 118678 $
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREVISION 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediaManagergetInstance()Get the manager.java.lang.StringgetMediaTemplatePath(java.lang.String templateName, Data data)Retrieve the path of the JSP suitable to display the specified Data.java.lang.StringgetMediaTemplatePath(java.lang.String templateName, java.lang.String mediaSource, java.lang.String mediaContentType)Retrieve the path of the JSP suitable to display the specified media. 
 - 
 
- 
- 
Field Detail
- 
REVISION
public static final java.lang.String REVISION
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getInstance
public static MediaManager getInstance()
Get the manager.- Returns:
 - MediaManager the singleton instance
 
 
- 
getMediaTemplatePath
public java.lang.String getMediaTemplatePath(java.lang.String templateName, java.lang.String mediaSource, java.lang.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(String, Data)
 
- 
getMediaTemplatePath
public java.lang.String getMediaTemplatePath(java.lang.String templateName, Data data)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:
 getMediaTemplatePath(String, String, String)
 
 - 
 
 -