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
_commentManager
The listeners for this actionstatic String
PARAMETER_AUTHOR_EMAIL
The request parameter name for author emailstatic String
PARAMETER_AUTHOR_HIDEEMAIL
The request parameter name for author email to hidestatic String
PARAMETER_AUTHOR_NAME
The request parameter name for author namestatic String
PARAMETER_AUTHOR_URL
The request parameter name for author urlstatic String
PARAMETER_CAPTCHA_KEY
The request parameter name for captchastatic String
PARAMETER_CAPTCHA_VALUE
The request parameter name for captchastatic String
PARAMETER_CONTENTTEXT
The 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 attributesMap
act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
void
service(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:
service
in interfaceServiceable
- Overrides:
service
in 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
-
-