Class ModerationDecisionImpl
java.lang.Object
org.craftercms.social.moderation.impl.ModerationDecisionImpl
- All Implemented Interfaces:
ModerationDecision
Using the ModerationFilters decides if a UGC have to be moderate or not
The neither ModerationDecisionImpl or the Filters modified the UGC
The decision is taken base on the first
The neither ModerationDecisionImpl or the Filters modified the UGC
The decision is taken base on the first
- Author:
- cortiz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanSetUGCas TrashbooleanneedModeration(SocialUgc ugc) Makes the decision if aUGChas to be moderated based onModerationFilter.needModeration(SocialUgc)result returns True if at least one ofModerationFilterreturns truevoidsetMaxFlagsBeforeTrash(int maxFlags) Sets the number of user flags threshold before theUGCis sent to the trash.
-
Constructor Details
-
ModerationDecisionImpl
-
-
Method Details
-
needModeration
Description copied from interface:ModerationDecisionMakes the decision if aUGChas to be moderated based onModerationFilter.needModeration(SocialUgc)result returns True if at least one ofModerationFilterreturns true- Specified by:
needModerationin interfaceModerationDecision- Parameters:
ugc- UGC to test- Returns:
- True if at least one
ModerationFilter.needModeration(SocialUgc)returns true;
-
isTrash
Description copied from interface:ModerationDecisionSetUGCas Trash- Specified by:
isTrashin interfaceModerationDecision- Parameters:
ugc- theUGCto be trashed- Returns:
- true if it can be set in the trash.
-
setMaxFlagsBeforeTrash
public void setMaxFlagsBeforeTrash(int maxFlags) Description copied from interface:ModerationDecisionSets the number of user flags threshold before theUGCis sent to the trash.- Specified by:
setMaxFlagsBeforeTrashin interfaceModerationDecision- Parameters:
maxFlags- Maximum number of flags (unique flags).
-