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 java.lang.Object implements DistributionRequest
ASimpleDistributionRequestis aDistributionRequestwhere all paths are either "deep" or "shallow".
-
-
Constructor Summary
Constructors Constructor Description SimpleDistributionRequest(DistributionRequestType requestType, boolean isDeep, java.lang.String... paths)Creates distribution request with "deep" or "shallow" paths.SimpleDistributionRequest(DistributionRequestType requestType, java.lang.String... paths)Creates a distribution request with "shallow" paths.SimpleDistributionRequest(DistributionRequestType requestType, java.lang.String[] paths, java.util.Set<java.lang.String> deepPaths)Creates a distribution request with additional "deep" paths.SimpleDistributionRequest(DistributionRequestType requestType, java.lang.String[] paths, java.util.Set<java.lang.String> deepPaths, java.util.Map<java.lang.String,java.lang.String[]> pathFilters)Creates a distribution request with "deep" paths and filters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getFilters(java.lang.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/exclusionjava.lang.String[]getPaths()get the paths for this distribution requestDistributionRequestTypegetRequestType()get theDistributionRequestTypeassociated with this requestbooleanisDeep(java.lang.String path)Returns whether the a path is covering the entire subtree (deep) or just the specified nodes (shallow)java.lang.StringtoString()
-
-
-
Constructor Detail
-
SimpleDistributionRequest
public SimpleDistributionRequest(DistributionRequestType requestType, boolean isDeep, java.lang.String... paths)
Creates distribution request with "deep" or "shallow" paths.- Parameters:
requestType- the request typeisDeep- istrueif all paths are "deep" and isfalseif all paths are "shallow"paths- the array of paths to be distributed
-
SimpleDistributionRequest
public SimpleDistributionRequest(DistributionRequestType requestType, java.lang.String... paths)
Creates a distribution request with "shallow" paths.- Parameters:
requestType- the request typepaths- the array of paths to be distributed
-
SimpleDistributionRequest
public SimpleDistributionRequest(DistributionRequestType requestType, java.lang.String[] paths, java.util.Set<java.lang.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, java.lang.String[] paths, java.util.Set<java.lang.String> deepPaths, java.util.Map<java.lang.String,java.lang.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 Detail
-
getRequestType
@Nonnull public DistributionRequestType getRequestType()
get theDistributionRequestTypeassociated with this request- Specified by:
getRequestTypein interfaceDistributionRequest- Returns:
- the type of the request as a
DistributionRequestType
-
getPaths
public java.lang.String[] getPaths()
get the paths for this distribution request- Specified by:
getPathsin interfaceDistributionRequest- Returns:
- an array of paths
-
isDeep
public boolean isDeep(java.lang.String path)
Returns whether the a path is covering the entire subtree (deep) or just the specified nodes (shallow)- Specified by:
isDeepin interfaceDistributionRequest- Parameters:
path- the path to be checked- Returns:
trueif the path is deep
-
getFilters
@Nonnull public java.lang.String[] getFilters(java.lang.String path)
Description copied from interface:DistributionRequestGet 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:
getFiltersin interfaceDistributionRequest- Parameters:
path- the path to get applicable filters for- Returns:
- an array of filters
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-