org.yasl.xmlobjects
Interface KeyResolver

All Known Implementing Classes:
YASLConfigKeyResolver

public interface KeyResolver

Interface to object storage and retrieval facility. Users will access and store objects based on a keyType and key.

keyType - maps to a storage facility, such as a Map.

key - maps to the requested object.

Version:
1.0
Author:
Jeff Chapman

Method Summary
 Object getObject(String keyType, String key)
          Returns the requested object based on the keyType and key.
 void setObject(String keyType, String key, Object value)
          Sets the object in the storage facility based on keyType and key.
 

Method Detail

getObject

public Object getObject(String keyType,
                        String key)
                 throws KeyResolverException
Returns the requested object based on the keyType and key.

Returns null if the key does not exist.

Throws exception if the keyType is invalid.

Parameters:
keyType - String
key - String
Returns:
Object
Throws:
KeyResolverException

setObject

public void setObject(String keyType,
                      String key,
                      Object value)
               throws KeyResolverException
Sets the object in the storage facility based on keyType and key.

Throws exception if the keyType is invalid.

Parameters:
keyType - String
key - String
value - Object
Throws:
KeyResolverException