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 TypeMethodDescriptionboolean
SetUGC
as Trashboolean
needModeration
(SocialUgc ugc) Makes the decision if aUGC
has to be moderated based onModerationFilter.needModeration(SocialUgc)
result returns True if at least one ofModerationFilter
returns truevoid
setMaxFlagsBeforeTrash
(int maxFlags) Sets the number of user flags threshold before theUGC
is sent to the trash.
-
Constructor Details
-
ModerationDecisionImpl
-
-
Method Details
-
needModeration
Description copied from interface:ModerationDecision
Makes the decision if aUGC
has to be moderated based onModerationFilter.needModeration(SocialUgc)
result returns True if at least one ofModerationFilter
returns true- Specified by:
needModeration
in interfaceModerationDecision
- Parameters:
ugc
- UGC to test- Returns:
- True if at least one
ModerationFilter.needModeration(SocialUgc)
returns true;
-
isTrash
Description copied from interface:ModerationDecision
SetUGC
as Trash- Specified by:
isTrash
in interfaceModerationDecision
- Parameters:
ugc
- theUGC
to be trashed- Returns:
- true if it can be set in the trash.
-
setMaxFlagsBeforeTrash
public void setMaxFlagsBeforeTrash(int maxFlags) Description copied from interface:ModerationDecision
Sets the number of user flags threshold before theUGC
is sent to the trash.- Specified by:
setMaxFlagsBeforeTrash
in interfaceModerationDecision
- Parameters:
maxFlags
- Maximum number of flags (unique flags).
-