|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.WysiwygMediasRewriter
public class WysiwygMediasRewriter
Provides facilities to rewrite object tag in HTML wysiwyg content with content generated by the MediaTag and its template API.
html = WysiwygMediasRewriter.rewriteMedias(html)
As of current implementation, this process REQUIRES Tomcat for a fully functionnal behavior, also it MUST be invoked at rendering time when a valid http servlet request is available.
It is invoked automatically by WysiwygRenderer
through
<jalios:wysiwyg> tag, if the following property was defined :
wysiwyg.medias-rewrite.enabled: true
Constructor Summary | |
---|---|
WysiwygMediasRewriter()
|
Method Summary | |
---|---|
static boolean |
canRewrite()
Check if the current context information required to rewrite a media are available. |
static String |
renderMedia(String mediaPath,
int maxWidth,
int maxHeight)
Render the specified media path using the appropriate MediaTag template . |
static String |
rewriteMedias(String html)
Find all the "object" tags in the specified html and replace them with a rendering performed by the MediaTag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WysiwygMediasRewriter()
Method Detail |
---|
public static String rewriteMedias(String html)
html
- the HTML fragment to be modified
public static boolean canRewrite()
Depending on the implementation (Tomcat or JspEngine), the requirements may not be the same (current request available, ...).
public static String renderMedia(String mediaPath, int maxWidth, int maxHeight)
mediaPath
- a media path, relative to the webapp (as expected by MediaTag.setPath(String)
maxWidth
- a maximum width, value is ignored if equals or lower than 0maxHeight
- a maximum height, value is ignored if equals or lower than 0
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |