org.apache.jackrabbit.name
Class CachingNameResolver

java.lang.Object
  extended by org.apache.jackrabbit.name.CachingNameResolver
All Implemented Interfaces:
NameResolver

Deprecated. Use the CachingNameResolver class from the org.apache.jackrabbit.spi.commons.conversion package of the jackrabbit-spi-commons component.

public class CachingNameResolver
extends Object
implements NameResolver

Name resolver decorator that uses a generational cache to speed up parsing and formatting of JCR names. Uncached names are resolved using the underlying decorated name resolver.


Constructor Summary
CachingNameResolver(NameResolver resolver)
          Deprecated. Creates a caching decorator for the given name resolver.
CachingNameResolver(NameResolver resolver, org.apache.jackrabbit.name.GenerationalCache cache)
          Deprecated. Creates a caching decorator for the given name resolver.
 
Method Summary
 String getJCRName(QName qname)
          Deprecated. Returns the prefixed JCR name for the given qualified name.
 QName getQName(String name)
          Deprecated. Returns the qualified name for the given prefixed JCR name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingNameResolver

public CachingNameResolver(NameResolver resolver,
                           org.apache.jackrabbit.name.GenerationalCache cache)
Deprecated. 
Creates a caching decorator for the given name resolver. The given generational cache is used for caching.

Parameters:
resolver - decorated name resolver
cache - generational cache

CachingNameResolver

public CachingNameResolver(NameResolver resolver)
Deprecated. 
Creates a caching decorator for the given name resolver.

Parameters:
resolver - name resolver
Method Detail

getQName

public QName getQName(String name)
               throws NameException,
                      NamespaceException
Deprecated. 
Returns the qualified 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.

Specified by:
getQName in interface NameResolver
Parameters:
name - prefixed JCR name
Returns:
qualified name
Throws:
NameException - if the JCR name format is invalid
NamespaceException - if the namespace prefix can not be resolved

getJCRName

public String getJCRName(QName qname)
                  throws NamespaceException
Deprecated. 
Returns the prefixed JCR name for the given qualified 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.

Specified by:
getJCRName in interface NameResolver
Parameters:
qname - qualified name
Returns:
prefixed JCR name
Throws:
NamespaceException - if the namespace URI can not be resolved


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.