public class CachingPathResolver extends Object implements PathResolver
Constructor and Description |
---|
CachingPathResolver(PathResolver resolver)
Creates a caching decorator for the given path resolver.
|
CachingPathResolver(PathResolver resolver,
org.apache.jackrabbit.spi.commons.conversion.GenerationalCache cache)
Creates a caching decorator for the given path resolver.
|
Modifier and Type | Method and Description |
---|---|
String |
getJCRPath(Path path)
Returns the JCR path String for the given
Path . |
Path |
getQPath(String path)
Returns the
Path object for the given JCR path String. |
Path |
getQPath(String path,
boolean normalizeIdentifier)
Returns the path object for the given JCR path string.
|
public CachingPathResolver(PathResolver resolver, org.apache.jackrabbit.spi.commons.conversion.GenerationalCache cache)
resolver
- decorated path resolvercache
- generational cachepublic CachingPathResolver(PathResolver resolver)
resolver
- name resolverpublic Path getQPath(String path) throws MalformedPathException, IllegalNameException, NamespaceException
Path
object for the given JCR path String.
The path is first looked up form the generational cache and the call gets
delegated to the decorated path resolver only if the cache misses.getQPath
in interface PathResolver
path
- A JCR path String.Path
object.MalformedPathException
- if the JCR path format is invalidIllegalNameException
- if any of the JCR names contained in the
path are invalid.NamespaceException
- if a namespace prefix can not be resolved.PathResolver.getQPath(String)
public Path getQPath(String path, boolean normalizeIdentifier) throws MalformedPathException, IllegalNameException, NamespaceException
PathResolver
getQPath
in interface PathResolver
path
- prefixed JCR pathPath
object.MalformedPathException
- if the JCR path format is invalid.IllegalNameException
- if any of the JCR names contained in the path are invalid.NamespaceException
- if a namespace prefix can not be resolved.PathResolver.getQPath(String, boolean)
public String getJCRPath(Path path) throws NamespaceException
Path
. The path
is first looked up form the generational cache and the call gets
delegated to the decorated path resolver only if the cache misses.getJCRPath
in interface PathResolver
path
- A Path
object.NamespaceException
- if a namespace URI can not be resolved.PathResolver.getJCRPath(org.apache.jackrabbit.spi.Path)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.