Interface PublicationPlugin


public interface PublicationPlugin
Plugin to contribute a content type to the generic content publication mechanism. The framework owns no storage: each content type keeps its own scheduling state and exposes it through this contract, the plugin carrying no business logic and delegating operations to its domain Service layer.
  • Method Details

    • getObjectType

      String getObjectType()
      Returns:
      the content object type handled by this plugin, like 'activity'
    • getDueObjectIds

      List<String> getDueObjectIds(long dueTime, int offset, int limit)
      Parameters:
      dueTime - scheduled publication time upper bound, in milliseconds
      offset - the offset index
      limit - maximum number of items to load
      Returns:
      List of object ids due for publication
    • publish

      Object publish(String objectId)
      Publishes a scheduled content. The operation, delegated to the domain Service, has to be idempotent: only the first invocation publishes.
      Parameters:
      objectId - the content object id
      Returns:
      the published object, or null when the content isn't a pending scheduled content (anymore)