Interface ActivityReportService


public interface ActivityReportService
  • Field Details

  • 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 broadcasts EVENT_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" prefix
      reason - one of DEFAULT_REASONS
      viewerAclIdentity - 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 id
      IllegalAccessException - when the user can't view the target or is its author
      IllegalArgumentException - when the reason isn't allowed, or the target isn't space-feed content
      org.exoplatform.commons.ObjectAlreadyExistsException - when the user already has an active report on this target
    • markReportsStale

      void markReportsStale(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. Keeps each report's reason and timestamp for moderation audit, and raises neither a notification nor the EVENT_ACTIVITY_REPORTED event.
      Parameters:
      activity - the edited activity or comment