Class CommentsDAO
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.cms.repository.comment.CommentsDAO
-
- org.ametys.web.repository.comment.CommentsDAO
-
- All Implemented Interfaces:
LogEnabled
,Component
,Contextualizable
,Serviceable
- Direct Known Subclasses:
CommentsDAO
public class CommentsDAO extends CommentsDAO
Comments DAO for web content
-
-
Field Summary
Fields Modifier and Type Field Description protected PageHelper
_pageHelper
The page helper-
Fields inherited from class org.ametys.cms.repository.comment.CommentsDAO
_context, _observationManager, _reactionableHelper, _resolver, _rightManager, _userHelper, _userManager, _userProvider, FORM_AUTHOR_EMAIL, FORM_AUTHOR_HIDEEMAIL, FORM_AUTHOR_NAME, FORM_AUTHOR_URL, FORM_CAPTCHA_KEY, FORM_CAPTCHA_VALUE, FORM_CONTENTTEXT, ROLE, URL_VALIDATOR
-
-
Constructor Summary
Constructors Constructor Description CommentsDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isCaptchaRequired(Content content)
Checks if a captcha have to be checked.boolean
isValidatedByDefault(Content content)
Get the validation flag default value for a content asking all listenersvoid
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.cms.repository.comment.CommentsDAO
_setCommentAttributes, addComment, canDeleteComment, contextualize, deleteComment, getComment, getComments, getContent, getCurrentUser, getErrors, likeOrUnlikeComment, likeOrUnlikeComment, reportComment, saxComment, saxCommentAdditionalProperties
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_pageHelper
protected PageHelper _pageHelper
The page helper
-
-
Constructor Detail
-
CommentsDAO
public CommentsDAO()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classCommentsDAO
- Throws:
ServiceException
-
isValidatedByDefault
public boolean isValidatedByDefault(Content content)
Description copied from class:CommentsDAO
Get the validation flag default value for a content asking all listeners- Overrides:
isValidatedByDefault
in classCommentsDAO
- Parameters:
content
- The content having a new comment- Returns:
- a positive value if the comments have to be validated by default or a negative value in the other case. The absolute value is the priority of your listener. E.G. If a listener set +1 and another -10: the sum is negative (so comments not validated be default).
-
isCaptchaRequired
public boolean isCaptchaRequired(Content content)
Description copied from class:CommentsDAO
Checks if a captcha have to be checked.- Overrides:
isCaptchaRequired
in classCommentsDAO
- Parameters:
content
- The content to comment- Returns:
- true if the comments have to be protected by a captcha or false otherwise
-
-