Package io.meeds.social.report.service
Interface ActivityReportService
public interface ActivityReportService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidmarkReportsStale(ExoSocialActivity activity) Flips every active report on the given activity/comment to the stale state, across all reporters — called when the author edits the target, so that everyone who had reported it may report the edited content again.reportActivity(String activityId, String reason, org.exoplatform.services.security.Identity viewerAclIdentity) Records a report made by the authenticated user on a space-feed activity or comment, then broadcastsEVENT_ACTIVITY_REPORTED.
-
Field Details
-
METADATA_TYPE_NAME
- See Also:
-
REASON_PROPERTY
- See Also:
-
STATUS_PROPERTY
- See Also:
-
STATUS_ACTIVE
- See Also:
-
STATUS_STALE
- See Also:
-
EVENT_ACTIVITY_REPORTED
- See Also:
-
DEFAULT_REASONS
-
-
Method Details
-
reportActivity
ActivityReport reportActivity(String activityId, String reason, org.exoplatform.services.security.Identity viewerAclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException Records a report made by the authenticated user on a space-feed activity or comment, then broadcastsEVENT_ACTIVITY_REPORTED. One active report per (reporter, object): a stale report left by a previous author edit is reactivated instead of duplicated.- Parameters:
activityId- activity id, or comment id with its "comment" prefixreason- one ofDEFAULT_REASONSviewerAclIdentity- authenticated user ACL identity, resolved server-side from the session- Returns:
- the recorded
ActivityReport - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when no activity/comment exists with this idIllegalAccessException- when the user can't view the target or is its authorIllegalArgumentException- when the reason isn't allowed, or the target isn't space-feed contentorg.exoplatform.commons.ObjectAlreadyExistsException- when the user already has an active report on this target
-
markReportsStale
Flips every active report on the given activity/comment to the stale state, across all reporters — called when the author edits the target, so that everyone who had reported it may report the edited content again. Keeps each report's reason and timestamp for moderation audit, and raises neither a notification nor theEVENT_ACTIVITY_REPORTEDevent.- Parameters:
activity- the edited activity or comment
-