org.apache.jetspeed.decoration
Interface PathResolverCache


public interface PathResolverCache

Simple caching mechanism for storing pathed that were previously located by a ResourceValidator. This allows a Decoration to bypass hitting the ResourceValidator repeatedly after a path is already known to exist.

Author:
Scott T. Weaver
See Also:
ResourceValidator

Method Summary
 void addPath(java.lang.String key, java.lang.String path)
          Adds a recolved path to the the cache using its relative path as the key
 void clear()
          Clears the entire contents of this cache object.
 java.lang.String getPath(java.lang.String key)
          Returns a previously located path using its retlative path as the code.
 java.lang.String removePath(java.lang.String key)
          Removes a full path to a resource from the cache using its relative path as the key.
 

Method Detail

addPath

void addPath(java.lang.String key,
             java.lang.String path)
Adds a recolved path to the the cache using its relative path as the key

Parameters:
key - key relative path of the resource.
path - full path to resource

getPath

java.lang.String getPath(java.lang.String key)
Returns a previously located path using its retlative path as the code.

Parameters:
key - relative path of the resource.
Returns:
full path to resource or null if no resource for the key exists.

removePath

java.lang.String removePath(java.lang.String key)
Removes a full path to a resource from the cache using its relative path as the key.

Parameters:
key -
Returns:
The full path to the resource or null if the resource path was not cached.

clear

void clear()
Clears the entire contents of this cache object.



Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.