Interface ReplicationStatusManager


@ProviderType public interface ReplicationStatusManager
  • Method Details

    • getReplicationStatusResource

      org.apache.sling.api.resource.Resource getReplicationStatusResource(String path, org.apache.sling.api.resource.ResourceResolver resourceResolver)
      Returns the Resource responsible for tracking replication properties for a given path.

      Pages and Assets return their respective content resource while any other path returns itself

      Parameters:
      path - The path to retrieve the resource for.
      resourceResolver - The resource resolver must have access to read the specified path.
    • setReplicationStatus

      void setReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> agentIds, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, String... paths) throws javax.jcr.RepositoryException, org.apache.sling.api.resource.PersistenceException
      Marks the resources at the provides paths with the parameterized replication status.

      Only resources that are of the OSGi Property parameterized "node-types" are candidates for Replication Status updates. All other resources will be quietly skipped.

      Parameters:
      resourceResolver - The resource resolver must have access to modify all of target resources.
      agentIds - The agent ids for which to set the replication status. If empty set for all agents. Never null.
      replicatedBy - name to set the last replicated property to. If value is null then a value of "Unknown" is used.
      replicatedAt - date to set the last replicated date to. If value is null then the current time is used.
      status - ACTIVATE | DEACTIVATE | CLEAR (Clear removes all replication properties and the cq:ReplicationStatus mixin when possible)
      paths - The paths to update.
      Throws:
      javax.jcr.RepositoryException
      org.apache.sling.api.resource.PersistenceException
      Since:
      6.0.8
    • setReplicationStatus

      void setReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, String... paths) throws javax.jcr.RepositoryException, org.apache.sling.api.resource.PersistenceException
      Throws:
      javax.jcr.RepositoryException
      org.apache.sling.api.resource.PersistenceException
    • setReplicationStatus

      void setReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> agentIds, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, org.apache.sling.api.resource.Resource... resources) throws javax.jcr.RepositoryException, org.apache.sling.api.resource.PersistenceException
      Marks the resources at the provides paths with the parameterized replication status.

      Only resources that are of the OSGi Property parameterized "node-types" are candidates for Replication Status updates. All other resources will be quietly skipped.

      Parameters:
      resourceResolver - The resource resolver must have access to modify all of target resources.
      agentIds - The agent ids for which to set the replication status. If empty set for all agents. Never null.
      replicatedBy - name to set the last replicated property to. If value is null then a value of "Unknown" is used.
      replicatedAt - date to set the last replicated date to. If value is null then the current time is used.
      status - ACTIVATE | DEACTIVATE | CLEAR (Clear removes all replication properties and the cq:ReplicationStatus mixin when possible)
      resources - The resources to update.
      Throws:
      javax.jcr.RepositoryException
      org.apache.sling.api.resource.PersistenceException
      Since:
      6.0.8
    • setReplicationStatus

      void setReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, org.apache.sling.api.resource.Resource... resources) throws javax.jcr.RepositoryException, org.apache.sling.api.resource.PersistenceException
      Throws:
      javax.jcr.RepositoryException
      org.apache.sling.api.resource.PersistenceException
    • clearReplicationStatus

      void clearReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, org.apache.sling.api.resource.Resource... resources) throws javax.jcr.RepositoryException, org.apache.sling.api.resource.PersistenceException
      Clear the replication status from the provides resources Only resources that are of the OSGi Property parameterized "node-types" are candidates for Replication Status updates. All other resources will be quietly skipped.
      Parameters:
      resourceResolver - The resource resolver must have access to modify all of target resources.
      resources - The resources to update.
      Throws:
      javax.jcr.RepositoryException
      org.apache.sling.api.resource.PersistenceException