public abstract class AbstractCommentAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
protected ObservationManager |
_observationManager
The observation manager
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver
|
protected RightManager |
_rightManager
The rights manager
|
protected CurrentUserProvider |
_userProvider
The current user provider
|
static String |
PARAMETER_COMMENTID
The request parameter name for content id
|
static String |
PARAMETER_CONTENTID
The request parameter name for content id
|
manager
EMPTY_MAP
Constructor and Description |
---|
AbstractCommentAction() |
Modifier and Type | Method and Description |
---|---|
protected CommentableContent |
getContent(Request request,
String contentId)
Get the commentable content
|
protected UserIdentity |
getCurrentUser()
Get the current user
|
protected boolean |
hasRight(String rightId,
Content content)
Determines if connected user has right on content
|
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String PARAMETER_CONTENTID
public static final String PARAMETER_COMMENTID
protected AmetysObjectResolver _resolver
protected CurrentUserProvider _userProvider
protected RightManager _rightManager
protected ObservationManager _observationManager
public AbstractCommentAction()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
protected UserIdentity getCurrentUser()
protected boolean hasRight(String rightId, Content content)
rightId
- The right idcontent
- The contentprotected CommentableContent getContent(Request request, String contentId)
request
- The requestcontentId
- The content id