Search in sources :

Example 1 with SimpleFilteringResourceVisitor

use of com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor in project acs-aem-commons by Adobe-Consulting-Services.

the class PageRelocator method validateAllAcls.

protected void validateAllAcls(ActionManager step1) {
    SimpleFilteringResourceVisitor pageVisitor;
    if (extensiveACLChecks) {
        pageVisitor = new SimpleFilteringResourceVisitor();
        pageVisitor.setLeafVisitor((resource, level) -> step1.deferredWithResolver(rr -> checkNodeAcls(rr, resource.getPath(), requiredPrivileges)));
    } else {
        pageVisitor = new TreeFilteringResourceVisitor(NameConstants.NT_PAGE);
    }
    pageVisitor.setBreadthFirstMode();
    pageVisitor.setResourceVisitor((resource, level) -> step1.deferredWithResolver(rr -> checkNodeAcls(rr, resource.getPath(), requiredPrivileges)));
    beginStep(step1, sourcePath, pageVisitor);
}
Also used : ResourceResolver(org.apache.sling.api.resource.ResourceResolver) FieldUtils(org.apache.commons.lang.reflect.FieldUtils) ProcessDefinition(com.adobe.acs.commons.mcp.ProcessDefinition) ReplicationActionType(com.day.cq.replication.ReplicationActionType) HashMap(java.util.HashMap) SimpleFilteringResourceVisitor(com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) ReplicationStatus(com.day.cq.replication.ReplicationStatus) ManagedProcess(com.adobe.acs.commons.mcp.model.ManagedProcess) RepositoryException(javax.jcr.RepositoryException) ReplicationException(com.day.cq.replication.ReplicationException) Map(java.util.Map) ReferenceSearch(com.day.cq.wcm.commons.ReferenceSearch) FormField(com.adobe.acs.commons.mcp.form.FormField) PersistenceException(org.apache.sling.api.resource.PersistenceException) ReplicationOptions(com.day.cq.replication.ReplicationOptions) Actions(com.adobe.acs.commons.fam.actions.Actions) PathfieldComponent(com.adobe.acs.commons.mcp.form.PathfieldComponent) EnumMap(java.util.EnumMap) Session(javax.jcr.Session) Replicator(com.day.cq.replication.Replicator) Resource(org.apache.sling.api.resource.Resource) RadioComponent(com.adobe.acs.commons.mcp.form.RadioComponent) PageManagerFactory(com.day.cq.wcm.api.PageManagerFactory) ActionManager(com.adobe.acs.commons.fam.ActionManager) Field(java.lang.reflect.Field) Logger(java.util.logging.Logger) Collectors(java.util.stream.Collectors) PageManager(com.day.cq.wcm.api.PageManager) LoginException(org.apache.sling.api.resource.LoginException) List(java.util.List) GenericReport(com.adobe.acs.commons.mcp.model.GenericReport) Stream(java.util.stream.Stream) TreeMap(java.util.TreeMap) TreeFilteringResourceVisitor(com.adobe.acs.commons.util.visitors.TreeFilteringResourceVisitor) NameConstants(com.day.cq.wcm.api.NameConstants) TextfieldComponent(com.adobe.acs.commons.mcp.form.TextfieldComponent) AccessControlManager(javax.jcr.security.AccessControlManager) CheckboxComponent(com.adobe.acs.commons.mcp.form.CheckboxComponent) Pattern(java.util.regex.Pattern) Privilege(javax.jcr.security.Privilege) ProcessInstance(com.adobe.acs.commons.mcp.ProcessInstance) TreeFilteringResourceVisitor(com.adobe.acs.commons.util.visitors.TreeFilteringResourceVisitor) SimpleFilteringResourceVisitor(com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor)

Aggregations

ActionManager (com.adobe.acs.commons.fam.ActionManager)1 Actions (com.adobe.acs.commons.fam.actions.Actions)1 ProcessDefinition (com.adobe.acs.commons.mcp.ProcessDefinition)1 ProcessInstance (com.adobe.acs.commons.mcp.ProcessInstance)1 CheckboxComponent (com.adobe.acs.commons.mcp.form.CheckboxComponent)1 FormField (com.adobe.acs.commons.mcp.form.FormField)1 PathfieldComponent (com.adobe.acs.commons.mcp.form.PathfieldComponent)1 RadioComponent (com.adobe.acs.commons.mcp.form.RadioComponent)1 TextfieldComponent (com.adobe.acs.commons.mcp.form.TextfieldComponent)1 GenericReport (com.adobe.acs.commons.mcp.model.GenericReport)1 ManagedProcess (com.adobe.acs.commons.mcp.model.ManagedProcess)1 SimpleFilteringResourceVisitor (com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor)1 TreeFilteringResourceVisitor (com.adobe.acs.commons.util.visitors.TreeFilteringResourceVisitor)1 ReplicationActionType (com.day.cq.replication.ReplicationActionType)1 ReplicationException (com.day.cq.replication.ReplicationException)1 ReplicationOptions (com.day.cq.replication.ReplicationOptions)1 ReplicationStatus (com.day.cq.replication.ReplicationStatus)1 Replicator (com.day.cq.replication.Replicator)1 NameConstants (com.day.cq.wcm.api.NameConstants)1 PageManager (com.day.cq.wcm.api.PageManager)1