|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.social.common.xmlprocessor.BaseXMLFilterPlugin
org.exoplatform.social.common.xmlprocessor.filters.URLConverterFilterPlugin
public class URLConverterFilterPlugin
This URLConverterFilterPlugin is a plugin for XMLProcessor which will auto convert any detected text link into real links, for example: http://abc.com => http://abc.com Moreover, this plugin can trim any link to a fix size when it's too long by specifying the urlMaxLength via init params. the urlMaxLength = url.length() + "...".length(), if urlMaxLength less than 3 the filter will no trim the url for display.
| Field Summary |
|---|
| Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin |
|---|
desc, name |
| Constructor Summary | |
|---|---|
URLConverterFilterPlugin(org.exoplatform.container.xml.InitParams params)
Constructor with InitParams from container, if url.length > UrlMaxLength then the url display will be shorten. |
|
URLConverterFilterPlugin(int urlMaxLength)
Constructor with max length of URL, if url.length > UrlMaxLength then the url display will be shorten. |
|
| Method Summary | |
|---|---|
Object |
doFilter(Object input)
Filters the input data. |
int |
getUrlMaxLength()
Gets max length of URL, if url.length > urlMaxLength and urlMaxLength >= 3 then the url display will be shorten |
void |
setUrlMaxLength(int urlMaxLength)
Sets max length of URL, if url.length > urlMaxLength and urlMaxLength >= 3 then the url display will be shorten. |
| Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin |
|---|
getDescription, getName, setDescription, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLConverterFilterPlugin(int urlMaxLength)
urlMaxLength - public URLConverterFilterPlugin(org.exoplatform.container.xml.InitParams params)
urlMaxLength - | Method Detail |
|---|
public Object doFilter(Object input)
input - the input data
public int getUrlMaxLength()
public void setUrlMaxLength(int urlMaxLength)
urlMaxLength -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||