Package org.apache.sling.distribution
Class SimpleDistributionRequest
java.lang.Object
org.apache.sling.distribution.SimpleDistributionRequest
- All Implemented Interfaces:
DistributionRequest
@ProviderType
public final class SimpleDistributionRequest
extends Object
implements DistributionRequest
A
SimpleDistributionRequest
is a DistributionRequest
where all paths are either "deep" or "shallow".-
Constructor Summary
ConstructorsConstructorDescriptionSimpleDistributionRequest
(DistributionRequestType requestType, boolean isDeep, String... paths) Creates distribution request with "deep" or "shallow" paths.SimpleDistributionRequest
(DistributionRequestType requestType, String... paths) Creates a distribution request with "shallow" paths.SimpleDistributionRequest
(DistributionRequestType requestType, String[] paths, Set<String> deepPaths) Creates a distribution request with additional "deep" paths.SimpleDistributionRequest
(DistributionRequestType requestType, String[] paths, Set<String> deepPaths, Map<String, String[]> pathFilters) Creates a distribution request with "deep" paths and filters. -
Method Summary
Modifier and TypeMethodDescriptionString[]
getFilters
(String path) Get the filters applicable for a specific path +/foo/.* - include all content under /foo -/foo - exclude /foo node filters are checked in order and the last matched filter determines inclusion/exclusionString[]
getPaths()
get the paths for this distribution requestget theDistributionRequestType
associated with this requestboolean
Returns whether the a path is covering the entire subtree (deep) or just the specified nodes (shallow)toString()
-
Constructor Details
-
SimpleDistributionRequest
public SimpleDistributionRequest(DistributionRequestType requestType, boolean isDeep, String... paths) Creates distribution request with "deep" or "shallow" paths.- Parameters:
requestType
- the request typeisDeep
- istrue
if all paths are "deep" and isfalse
if all paths are "shallow"paths
- the array of paths to be distributed
-
SimpleDistributionRequest
Creates a distribution request with "shallow" paths.- Parameters:
requestType
- the request typepaths
- the array of paths to be distributed
-
SimpleDistributionRequest
public SimpleDistributionRequest(DistributionRequestType requestType, String[] paths, Set<String> deepPaths) Creates a distribution request with additional "deep" paths.- Parameters:
requestType
- the request typepaths
- the array of paths to be distributeddeepPaths
- the set of paths that are to be distributed in depth (with all their children)
-
SimpleDistributionRequest
public SimpleDistributionRequest(DistributionRequestType requestType, String[] paths, Set<String> deepPaths, Map<String, String[]> pathFilters) Creates a distribution request with "deep" paths and filters.- Parameters:
requestType
- the request typepaths
- the array of paths to be distributeddeepPaths
- the set of paths that are to be distributed in depth (with all their children)pathFilters
- the filters applicable for each path
-
-
Method Details
-
getRequestType
get theDistributionRequestType
associated with this request- Specified by:
getRequestType
in interfaceDistributionRequest
- Returns:
- the type of the request as a
DistributionRequestType
-
getPaths
get the paths for this distribution request- Specified by:
getPaths
in interfaceDistributionRequest
- Returns:
- an array of paths
-
isDeep
Returns whether the a path is covering the entire subtree (deep) or just the specified nodes (shallow)- Specified by:
isDeep
in interfaceDistributionRequest
- Parameters:
path
- the path to be checked- Returns:
true
if the path is deep
-
getFilters
Description copied from interface:DistributionRequest
Get the filters applicable for a specific path +/foo/.* - include all content under /foo -/foo - exclude /foo node filters are checked in order and the last matched filter determines inclusion/exclusion- Specified by:
getFilters
in interfaceDistributionRequest
- Parameters:
path
- the path to get applicable filters for- Returns:
- an array of filters
-
toString
-