Class AddCommentAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.cms.repository.comment.actions.AbstractCommentAction
-
- org.ametys.cms.repository.comment.actions.AddCommentAction
-
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
public class AddCommentAction extends AbstractCommentAction
Sends the comment for a given post
-
-
Field Summary
Fields Modifier and Type Field Description protected CommentManagerExtensionPoint_commentManagerThe listeners for this actionstatic StringPARAMETER_AUTHOR_EMAILThe request parameter name for author emailstatic StringPARAMETER_AUTHOR_HIDEEMAILThe request parameter name for author email to hidestatic StringPARAMETER_AUTHOR_NAMEThe request parameter name for author namestatic StringPARAMETER_AUTHOR_URLThe request parameter name for author urlstatic StringPARAMETER_CAPTCHA_KEYThe request parameter name for captchastatic StringPARAMETER_CAPTCHA_VALUEThe request parameter name for captchastatic StringPARAMETER_CONTENTTEXTThe request parameter name for content-
Fields inherited from class org.ametys.cms.repository.comment.actions.AbstractCommentAction
_observationManager, _resolver, _rightManager, _userProvider, PARAMETER_COMMENTID, PARAMETER_CONTENTID
-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description AddCommentAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_setCommentAttributes(Request request, Map<String,Object> results, CommentableContent content, boolean isValidated, Comment comment)Set comment attributesMapact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)voidservice(ServiceManager smanager)-
Methods inherited from class org.ametys.cms.repository.comment.actions.AbstractCommentAction
getContent, getCurrentUser, hasRight
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
PARAMETER_AUTHOR_NAME
public static final String PARAMETER_AUTHOR_NAME
The request parameter name for author name- See Also:
- Constant Field Values
-
PARAMETER_AUTHOR_EMAIL
public static final String PARAMETER_AUTHOR_EMAIL
The request parameter name for author email- See Also:
- Constant Field Values
-
PARAMETER_AUTHOR_HIDEEMAIL
public static final String PARAMETER_AUTHOR_HIDEEMAIL
The request parameter name for author email to hide- See Also:
- Constant Field Values
-
PARAMETER_AUTHOR_URL
public static final String PARAMETER_AUTHOR_URL
The request parameter name for author url- See Also:
- Constant Field Values
-
PARAMETER_CONTENTTEXT
public static final String PARAMETER_CONTENTTEXT
The request parameter name for content- See Also:
- Constant Field Values
-
PARAMETER_CAPTCHA_KEY
public static final String PARAMETER_CAPTCHA_KEY
The request parameter name for captcha- See Also:
- Constant Field Values
-
PARAMETER_CAPTCHA_VALUE
public static final String PARAMETER_CAPTCHA_VALUE
The request parameter name for captcha- See Also:
- Constant Field Values
-
_commentManager
protected CommentManagerExtensionPoint _commentManager
The listeners for this action
-
-
Constructor Detail
-
AddCommentAction
public AddCommentAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractCommentAction- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
- Throws:
Exception
-
_setCommentAttributes
protected void _setCommentAttributes(Request request, Map<String,Object> results, CommentableContent content, boolean isValidated, Comment comment)
Set comment attributes- Parameters:
request- the requestresults- the resultscontent- the contentisValidated- true if is validatedcomment- the comment
-
-