Interface Replicator


@ProviderType public interface Replicator
The Replicator is the replication service. It can be used to replicate content.
  • Field Details

  • Method Details

    • replicate

      void replicate(Session session, ReplicationActionType type, String path) throws ReplicationException
      Triggers a new replication with supplied options.
      Parameters:
      session - user session
      type - The type of replication
      path - The path specified the content to be replicated
      Throws:
      ReplicationException - if an error occurs
    • replicate

      void replicate(Session session, ReplicationActionType type, String path, ReplicationOptions options) throws ReplicationException
      Triggers a new replication with supplied options.
      Parameters:
      session - user session
      type - The type of replication
      path - The path specified the content to be replicated
      options - Additional replication options
      Throws:
      ReplicationException - if an error occurs
    • replicate

      void replicate(Session session, ReplicationActionType type, String[] paths, ReplicationOptions options) throws ReplicationException
      Triggers a new replication with supplied options.
      Parameters:
      session - user session
      type - The type of replication
      paths - The paths specified the content to be replicated; it is recommended to consider 100 paths as maximum.
      Up to that limit the system guarantees that the paths are replicated in a transactional manner. If this number is exceeded, the system is free to split up the provided paths into multiple chunks and replicate each chunk on its own; in that case all the paths are replicated in a non-transactional path. The system will write log statements in this case.
      options - Additional replication options
      Throws:
      ReplicationException - if an error occurs
    • replicate

      void replicate(Session session, ReplicationActionType type, Location[] locations, ReplicationOptions options) throws ReplicationException
      Triggers a new replication for multiple repository paths and with supplied options.
      Parameters:
      session - user session
      type - The type of replication
      locations - The location objects containing the paths and revisions for content to be replicated; it is recommended to consider 100 locations as maximum.
      Up to that limit the system guarantees that the paths are replicated in a transactional manner. If this number is exceeded, the system is free to split up the provided paths into multiple chunks and replicate each chunk on its own; in that case all the paths are replicated in a non-transactional path. The system will write log statements in this case. The revision in Location.revision has priority over the ReplicationOption.revision. If the first is not defined, we default to the latest.
      options - Additional replication options
      Throws:
      ReplicationException - if an error occurs
    • checkPermission

      void checkPermission(Session session, ReplicationActionType type, String path) throws ReplicationException
      Checks if a user session has enough permissions for a provided replication type and path
      Parameters:
      session - user session
      type - The type of replication
      path - The path specified the content to be replicated
      Throws:
      ReplicationException - if an error occurs
      Since:
      5.5
    • getReplicationStatus

      ReplicationStatus getReplicationStatus(Session session, String path)
      Returns a replication status for the given path.
      Parameters:
      session - session
      path - path to check
      Returns:
      the replication status or null if not available.
    • getActivatedPaths

      Iterator<String> getActivatedPaths(Session session, String path) throws ReplicationException
      Returns the paths of all nodes for the given subtree path which are activated.
      Parameters:
      session - User session
      path - Path to check
      Returns:
      Subtree paths for activated nodes
      Throws:
      ReplicationException - If error occurs on retrieving node and its descendants
    • createContentFilterChain

      @Deprecated List<ReplicationContentFilter> createContentFilterChain(ReplicationAction action)
      Deprecated.
      Creates a List of ReplicationContentFilters to be used by ContentBuilders to filter content for exclusion from the replication content being built. The filters in the list are not in a particular order.
      Parameters:
      action - The ReplicationAction to build the filters contained in the list for.
      Returns:
      A List of ReplicationContentFilters.