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, _populationContextHelper, _reactionableHelper, _resolver, _rightManager, _userHelper, _userManager, _userPopulationDAO, _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 TypeMethodDescriptiongetUserPopulationsContexts
(Request request, Map<String, Object> contextualParameters) Get the user population contextsboolean
isCaptchaRequired
(Content content, Map<String, Object> formValues) 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, canDeleteComment, contextualize, deleteComment, getComment, getCommentAuthor, getComments, getContent, getContributorComments, getCurrentUser, getErrors, getUserByEmail, getUserIdentityProperties, getUserProperties, getUserPropertiesFromIdentity, likeOrUnlikeComment, likeOrUnlikeComment, reportComment, saxComment, saxCommentAdditionalProperties, saxUserIdentity
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 commentformValues
- The form values- Returns:
- true if the comments have to be protected by a captcha or false otherwise
-
getUserPopulationsContexts
protected List<String> getUserPopulationsContexts(Request request, Map<String, Object> contextualParameters) Description copied from class:CommentsDAO
Get the user population contexts- Overrides:
getUserPopulationsContexts
in classCommentsDAO
- Parameters:
request
- The requestcontextualParameters
- The contextual parameters- Returns:
- The contexts
-