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
Rich-text helper
-
Field Summary
Modifier and TypeFieldDescriptionprotected ServiceManager
The service managerstatic final String
The Avalon role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionrichTextToString
(RichText richText) Transform the rich text to stringrichTextToString
(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 Details
-
ROLE
The Avalon role -
_manager
The service manager
-
-
Constructor Details
-
RichTextHelper
public RichTextHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
richTextToString
Transform the rich text to string- Parameters:
richText
- the rich-text to transform- Returns:
- the transformed rich-text
-
richTextToString
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
-