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
Comments DAO for web content
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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 Details
-
_pageHelper
The page helper
-
-
Constructor Details
-
CommentsDAO
public CommentsDAO()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classCommentsDAO
- Throws:
ServiceException
-
isValidatedByDefault
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
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
-