public class CachingNameResolver extends Object implements NameResolver
Constructor and Description |
---|
CachingNameResolver(NameResolver resolver)
Creates a caching decorator for the given name resolver.
|
CachingNameResolver(NameResolver resolver,
org.apache.jackrabbit.spi.commons.conversion.GenerationalCache cache)
Creates a caching decorator for the given name resolver.
|
Modifier and Type | Method and Description |
---|---|
String |
getJCRName(Name name)
Returns the prefixed JCR name for the given
Name . |
Name |
getQName(String jcrName)
Returns a
Name for the given prefixed JCR name. |
public CachingNameResolver(NameResolver resolver, org.apache.jackrabbit.spi.commons.conversion.GenerationalCache cache)
resolver
- decorated name resolvercache
- generational cachepublic CachingNameResolver(NameResolver resolver)
resolver
- name resolverpublic Name getQName(String jcrName) throws IllegalNameException, NamespaceException
Name
for the given prefixed JCR name. The name
is first looked up form the generational cache and the call gets
delegated to the decorated name resolver only if the cache misses.getQName
in interface NameResolver
jcrName
- A JCR name String.Name
object.IllegalNameException
- if the JCR name format is invalidNamespaceException
- if the namespace prefix can not be resolvedpublic String getJCRName(Name name) throws NamespaceException
Name
. The name
is first looked up form the generational cache and the call gets
delegated to the decorated name resolver only if the cache misses.getJCRName
in interface NameResolver
name
- The name object.prefix:localName
.NamespaceException
- if the namespace URI can not be resolvedCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.