Package org.ametys.cms.data
Class RichTextHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.cms.data.RichTextHelper
-
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class RichTextHelper extends AbstractLogEnabled implements Serviceable, Component
Rich-text helper
-
-
Field Summary
Fields Modifier and Type Field Description protected ServiceManager
_manager
The service managerstatic String
ROLE
The Avalon role
-
Constructor Summary
Constructors Constructor Description RichTextHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
richTextToString(RichText richText)
Transform the rich text to stringString
richTextToString(RichText richText, int maxSize)
Transform the rich text to stringvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_manager
protected ServiceManager _manager
The service manager
-
-
Constructor Detail
-
RichTextHelper
public RichTextHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
richTextToString
public String richTextToString(RichText richText)
Transform the rich text to string- Parameters:
richText
- the rich-text to transform- Returns:
- the transformed rich-text
-
richTextToString
public String richTextToString(RichText richText, int maxSize)
Transform the rich text to string- Parameters:
richText
- the rich-text to transformmaxSize
- the max size of the rich-text. 0 if no max size- Returns:
- the transformed rich-text
-
-