Class InitContentFunction
- java.lang.Object
-
- org.ametys.plugins.workflow.AbstractWorkflowComponent
-
- org.ametys.cms.workflow.AbstractContentWorkflowComponent
-
- org.ametys.plugins.workspaces.workflow.InitContentFunction
-
- All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider,LogEnabled,Serviceable
public class InitContentFunction extends AbstractContentWorkflowComponent implements com.opensymphony.workflow.FunctionProvider
This workflow function initialize the rich-text's content with a configured default value
-
-
Field Summary
Fields Modifier and Type Field Description private static String__RICHTEXT_ACTIVATE_COMMENTS_KEYprivate static String__RICHTEXT_ATTRIBUTE_KEYprivate static String__RICHTEXT_I18N_CATALOG_KEYprivate static String__RICHTEXT_IS_I18N_KEYprivate static String__RICHTEXT_VALUE_KEYprotected I18nUtils_i18nUtilsI18n Utils-
Fields inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
_contentHelper, CONTENT_KEY
-
Fields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY
-
-
Constructor Summary
Constructors Constructor Description InitContentFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_setRichText(ModifiableContent content, String attributePath, String value)private void_setText(ModifiableContent content, String attributePath, String value)private String_textToDocbook(String value)voidexecute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps)voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
getContent
-
Methods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
-
-
-
-
Field Detail
-
__RICHTEXT_ATTRIBUTE_KEY
private static final String __RICHTEXT_ATTRIBUTE_KEY
- See Also:
- Constant Field Values
-
__RICHTEXT_VALUE_KEY
private static final String __RICHTEXT_VALUE_KEY
- See Also:
- Constant Field Values
-
__RICHTEXT_IS_I18N_KEY
private static final String __RICHTEXT_IS_I18N_KEY
- See Also:
- Constant Field Values
-
__RICHTEXT_I18N_CATALOG_KEY
private static final String __RICHTEXT_I18N_CATALOG_KEY
- See Also:
- Constant Field Values
-
__RICHTEXT_ACTIVATE_COMMENTS_KEY
private static final String __RICHTEXT_ACTIVATE_COMMENTS_KEY
- See Also:
- Constant Field Values
-
_i18nUtils
protected I18nUtils _i18nUtils
I18n Utils
-
-
Constructor Detail
-
InitContentFunction
public InitContentFunction()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractContentWorkflowComponent- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
- Specified by:
executein interfacecom.opensymphony.workflow.FunctionProvider- Throws:
com.opensymphony.workflow.WorkflowException
-
_setText
private void _setText(ModifiableContent content, String attributePath, String value)
-
_setRichText
private void _setRichText(ModifiableContent content, String attributePath, String value) throws IOException
- Throws:
IOException
-
_textToDocbook
private String _textToDocbook(String value)
-
-