Class AbstractCommentAction
- 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
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
- Direct Known Subclasses:
AddCommentAction
,DeleteCommentAction
,GetRightDeleteCommentAction
,LikeCommentAction
,ReportCommentAction
public abstract class AbstractCommentAction extends ServiceableAction
Abstract action on comments
-
-
Field Summary
Fields Modifier and Type Field Description protected ObservationManager
_observationManager
The observation managerprotected AmetysObjectResolver
_resolver
The ametys object resolverprotected RightManager
_rightManager
The rights managerprotected CurrentUserProvider
_userProvider
The current user providerstatic String
PARAMETER_COMMENTID
The request parameter name for content idstatic String
PARAMETER_CONTENTID
The request parameter name for content id-
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 AbstractCommentAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CommentableContent
getContent(Request request, String contentId)
Get the commentable contentprotected UserIdentity
getCurrentUser()
Get the current userprotected boolean
hasRight(String rightId, Content content)
Determines if connected user has right on contentvoid
service(ServiceManager smanager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
PARAMETER_CONTENTID
public static final String PARAMETER_CONTENTID
The request parameter name for content id- See Also:
- Constant Field Values
-
PARAMETER_COMMENTID
public static final String PARAMETER_COMMENTID
The request parameter name for content id- See Also:
- Constant Field Values
-
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver
-
_userProvider
protected CurrentUserProvider _userProvider
The current user provider
-
_rightManager
protected RightManager _rightManager
The rights manager
-
_observationManager
protected ObservationManager _observationManager
The observation manager
-
-
Constructor Detail
-
AbstractCommentAction
public AbstractCommentAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
getCurrentUser
protected UserIdentity getCurrentUser()
Get the current user- Returns:
- The current user
-
hasRight
protected boolean hasRight(String rightId, Content content)
Determines if connected user has right on content- Parameters:
rightId
- The right idcontent
- The content- Returns:
- true if user has right
-
getContent
protected CommentableContent getContent(Request request, String contentId)
Get the commentable content- Parameters:
request
- The requestcontentId
- The content id- Returns:
- The content
-
-