org.geotools.catalog.adaptable
Class ResolveAdapterFactoryFinder

Object
  extended by ResolveAdapterFactoryFinder

public abstract class ResolveAdapterFactoryFinder
extends Object

Class for locating instances of ResolveAdapterFactory.

This class should be subclassed to provide a particular lookup mechanism.

Author:
Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org

Constructor Summary
ResolveAdapterFactoryFinder()
           
 
Method Summary
 ResolveAdapterFactory find(AdaptingResolve decorator, Class adaptee)
          Performs an adapter lookup.
 Collection getResolveAdapterFactories()
          Located all available adapter factories.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResolveAdapterFactoryFinder

public ResolveAdapterFactoryFinder()
Method Detail

find

public ResolveAdapterFactory find(AdaptingResolve decorator,
                                  Class adaptee)
                           throws IllegalStateException
Performs an adapter lookup.

This method should be extended or overriden.

Parameters:
decorator - The adapting resolve decorator.
adaptee - The class being adapted to.
Returns:
The adapting factory, otherwise null if non could be found.
Throws:
IllegalStateException - If multiple adapter factories are found which can support the adaptation.

getResolveAdapterFactories

public Collection getResolveAdapterFactories()
Located all available adapter factories.

This method is intended to be overiden.

Returns:
A collection of adapters, may be empty, should not be null. TODO: default to factory spi?


Copyright © 1996-2008 Geotools. All Rights Reserved.