Interface ReplicationStatusManager
@ProviderType
public interface ReplicationStatusManager
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumReplication Status Enum ACTIVATED: Marks resource as "Activated" DEACTIVATED: Marks resource as "Deactivated" CLEAR: Removes Replication status properties from Resource along with cq:ReplicationStatus mixin when applicable. -
Method Summary
Modifier and TypeMethodDescriptionvoidclearReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, org.apache.sling.api.resource.Resource... resources) 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.org.apache.sling.api.resource.ResourcegetReplicationStatusResource(String path, org.apache.sling.api.resource.ResourceResolver resourceResolver) Returns the Resource responsible for tracking replication properties for a given path.voidsetReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, String... paths) Shortcut forwith {@code agentIds} being set to the empty set.voidsetReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, org.apache.sling.api.resource.Resource... resources) Shortcut forwith {@code agentIds} being set to the empty set.voidsetReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> agentIds, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, String... paths) Marks the resources at the provides paths with the parameterized replication status.voidsetReplicationStatus(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> agentIds, String replicatedBy, Calendar replicatedAt, ReplicationStatusManager.Status status, org.apache.sling.api.resource.Resource... resources) Marks the resources at the provides paths with the parameterized replication status.
-
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.RepositoryExceptionorg.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 Shortcut forwith {@code agentIds} being set to the empty set.- Throws:
javax.jcr.RepositoryExceptionorg.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.RepositoryExceptionorg.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 Shortcut forwith {@code agentIds} being set to the empty set.- Throws:
javax.jcr.RepositoryExceptionorg.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.RepositoryExceptionorg.apache.sling.api.resource.PersistenceException
-