Class ContentPublicationService

java.lang.Object
io.meeds.social.publication.service.ContentPublicationService

@Service public class ContentPublicationService extends Object
Generic content publication Service, dispatching scheduled publication operations to the PublicationPlugin registered for each content type. It owns no storage: each content type keeps its scheduling state in its own domain.
  • Field Details

    • publicationPlugins

      @Autowired(required=false) protected List<io.meeds.social.publication.plugin.PublicationPlugin> publicationPlugins
  • Constructor Details

    • ContentPublicationService

      public ContentPublicationService()
  • Method Details

    • publishDueContents

      public void publishDueContents()
      Publishes every content of every registered content type which scheduled publication time is due
    • publish

      public Object publish(String objectType, String objectId)
      Publishes a scheduled content by dispatching to the PublicationPlugin registered for its content type
      Parameters:
      objectType - the content object type, like 'activity'
      objectId - the content object id
      Returns:
      the published object, or null when the content isn't a pending scheduled content (anymore)
    • getPublicationPlugin

      public io.meeds.social.publication.plugin.PublicationPlugin getPublicationPlugin(String objectType)
      Parameters:
      objectType - the content object type, like 'activity'
      Returns:
      the registered PublicationPlugin for the given content object type, or null when none