net.refractions.udig.catalog
Interface IResolveAdapterFactory


public interface IResolveAdapterFactory

Adapts a resolve handle into another type of object.

This API differs from the generic eclipse adaptable api:

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

Method Summary
 java.lang.Object adapt(IResolve resolve, java.lang.Class<? extends java.lang.Object> adapter, IProgressMonitor monitor)
          Performs an adaptation to a particular adapter.
 boolean canAdapt(IResolve resolve, java.lang.Class<? extends java.lang.Object> adapter)
          Determines if a particular adaptation is supported.
 

Method Detail

canAdapt

boolean canAdapt(IResolve resolve,
                 java.lang.Class<? extends java.lang.Object> adapter)
Determines if a particular adaptation is supported.

NOTE If this factory is declared in an extension point and the ResolveManager is responsible for canResolve then this method will not be called because the information from the xml will be used instead.

Parameters:
resolve - The handle being adapted.
adapter - The adapting class.
Returns:
True if supported, otherwise false.

adapt

java.lang.Object adapt(IResolve resolve,
                       java.lang.Class<? extends java.lang.Object> adapter,
                       IProgressMonitor monitor)
                       throws java.io.IOException
Performs an adaptation to a particular adapter.

Parameters:
resolve - The handle being adapted.
adapter - The adapting class.
monitor - Progress monitor for blocking class.
Returns:
The adapter, or null if adaptation not possible.
Throws:
java.io.IOException - Any I/O errors that occur.