public class DefaultPathContext extends AbstractPathContext
DefaultPathContext is an implementation of the
PathContext iterface. The set of paths is modified by the
add(), insert() and remove() methods. There is a destinction of 2 kind of
paths, when adding them. there are root-paths, which are always absolute and
there are subpaths, which are always relative. The complete set of paths is a
combination of the root and the sub paths in a way, that ever subpath is
combined with every root path.
example:
| Constructor and Description |
|---|
DefaultPathContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String path)
Adds a new path.
|
protected java.util.ArrayList |
buildPathCache(Ticket ticket)
Builds the cache of path elements.
|
void |
clear()
Clears all path information
|
void |
insert(java.lang.String path)
Inserts a new path.
|
void |
remove(java.lang.String path)
Removes a path either from the root path or the sub path list.
|
acceptHandle, expandPath, needCacheBuild, paths, paths, resolveHandle, setNeedCacheBuildpublic void add(java.lang.String path)
path is relative, the path is
added at the end of the list of sub paths, otherwise its added at the end
of the list of root paths.path - the path to addpublic void insert(java.lang.String path)
path is relative, the path is
inserted at the beginning of the list of sub paths, otherwise its
inserted at the beginning of the list of root paths.path - the path to insertpublic void remove(java.lang.String path)
path - path to removepublic void clear()
protected java.util.ArrayList buildPathCache(Ticket ticket)
This method is called from the AbstractPathContext.buildExpandedPathCache(com.day.cq.contentbus.Ticket) method,
which after building the base path cache cares to expand any globs which
might be contained in any handle within the path cache.
buildPathCache in class AbstractPathContextticket - The Ticket might be used to access the ContentBus.ArrayList containing the path elements, which
might still contain glob patterns.