public class ModerationDecisionImpl extends Object implements ModerationDecision
| Constructor and Description |
|---|
ModerationDecisionImpl(List<ModerationFilter> filters) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isTrash(SocialUgc ugc)
Set
UGC as Trash |
boolean |
needModeration(SocialUgc ugc)
Makes the decision if a
UGC has to be moderated
based on ModerationFilter.needModeration(SocialUgc) result
returns True if at least one of ModerationFilter returns true |
void |
setMaxFlagsBeforeTrash(int maxFlags)
Sets the number of user flags threshold before the
UGC is sent to the trash. |
public ModerationDecisionImpl(List<ModerationFilter> filters)
public boolean needModeration(SocialUgc ugc)
ModerationDecisionUGC has to be moderated
based on ModerationFilter.needModeration(SocialUgc) result
returns True if at least one of ModerationFilter returns trueneedModeration in interface ModerationDecisionugc - UGC to testModerationFilter.needModeration(SocialUgc) returns true;public boolean isTrash(SocialUgc ugc)
ModerationDecisionUGC as TrashisTrash in interface ModerationDecisionugc - the UGC to be trashedpublic void setMaxFlagsBeforeTrash(int maxFlags)
ModerationDecisionUGC is sent to the trash.setMaxFlagsBeforeTrash in interface ModerationDecisionmaxFlags - Maximum number of flags (unique flags).Copyright © 2018 CrafterCMS. All rights reserved.