org.apache.jackrabbit.name
Class CachingPathResolver

java.lang.Object
  extended by org.apache.jackrabbit.name.CachingPathResolver
All Implemented Interfaces:
PathResolver

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

public class CachingPathResolver
extends Object
implements PathResolver

Path resolver decorator that uses a generational cache to speed up parsing and formatting of JCR paths. Uncached paths are resolved using the underlying decorated path resolver.


Constructor Summary
CachingPathResolver(PathResolver resolver)
          Deprecated. Creates a caching decorator for the given path resolver.
CachingPathResolver(PathResolver resolver, org.apache.jackrabbit.name.GenerationalCache cache)
          Deprecated. Creates a caching decorator for the given path resolver.
 
Method Summary
 String getJCRPath(Path qpath)
          Deprecated. Returns the prefixed JCR path for the given qualified path.
 Path getQPath(String path)
          Deprecated. Returns the qualified path for the given prefixed JCR path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingPathResolver

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

Parameters:
resolver - decorated path resolver
cache - generational cache

CachingPathResolver

public CachingPathResolver(PathResolver resolver)
Deprecated. 
Creates a caching decorator for the given path resolver.

Parameters:
resolver - name resolver
Method Detail

getQPath

public Path getQPath(String path)
              throws NameException,
                     NamespaceException
Deprecated. 
Returns the qualified path for the given prefixed JCR 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.

Specified by:
getQPath in interface PathResolver
Parameters:
path - prefixed JCR path
Returns:
qualified path
Throws:
NameException - if the JCR path format is invalid
NamespaceException - if a namespace prefix can not be resolved

getJCRPath

public String getJCRPath(Path qpath)
                  throws NamespaceException
Deprecated. 
Returns the prefixed JCR path for the given qualified 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.

Specified by:
getJCRPath in interface PathResolver
Parameters:
qpath - qualified path
Returns:
prefixed JCR path
Throws:
NamespaceException - if a namespace URI can not be resolved


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