net.refractions.udig.catalog
Class AbstractDataStoreServiceExtension

java.lang.Object
  extended by net.refractions.udig.catalog.AbstractDataStoreServiceExtension
All Implemented Interfaces:
ServiceExtension, ServiceExtension2

public abstract class AbstractDataStoreServiceExtension
extends java.lang.Object
implements ServiceExtension2

A support class for creating Service Extensions based on Geotools Datastores. Provides feeback information for when the datastore cannot use the offered parameters

Since:
1.1.0
Author:
Jesse

Nested Class Summary
protected  class AbstractDataStoreServiceExtension.ParamInfo
           
 
Field Summary
 
Fields inherited from interface net.refractions.udig.catalog.ServiceExtension
EXTENSION_ID
 
Constructor Summary
AbstractDataStoreServiceExtension()
           
 
Method Summary
protected abstract  java.lang.String doOtherChecks(java.util.Map<java.lang.String,java.io.Serializable> params)
          Do any other checks besides a basic parsing of the parameters.
protected abstract  DataStoreFactorySpi getDataStoreFactory()
          Returns an instance of the datastore factory that can create the datastore.
protected  AbstractDataStoreServiceExtension.ParamInfo parseParamInfo(java.net.URL url)
          For special urls like DB urls.
 java.lang.String reasonForFailure(java.util.Map<java.lang.String,java.io.Serializable> params)
          Returns a human consumable string explaining why the params cannot be used for creating a Service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.refractions.udig.catalog.ServiceExtension2
reasonForFailure
 
Methods inherited from interface net.refractions.udig.catalog.ServiceExtension
createParams, createService
 

Constructor Detail

AbstractDataStoreServiceExtension

public AbstractDataStoreServiceExtension()
Method Detail

reasonForFailure

public final java.lang.String reasonForFailure(java.util.Map<java.lang.String,java.io.Serializable> params)
Description copied from interface: ServiceExtension2
Returns a human consumable string explaining why the params cannot be used for creating a Service

Specified by:
reasonForFailure in interface ServiceExtension2
Parameters:
params - params for trying to create a service
Returns:
a human consumable string explaining why the params cannot be used for creating a Service or null if a Service should be able to be created using the params

doOtherChecks

protected abstract java.lang.String doOtherChecks(java.util.Map<java.lang.String,java.io.Serializable> params)
Do any other checks besides a basic parsing of the parameters.

Parameters:
params - parameters to be used for creating the datastore
Returns:
null if everything checks out

getDataStoreFactory

protected abstract DataStoreFactorySpi getDataStoreFactory()
Returns an instance of the datastore factory that can create the datastore.

Returns:
an instance of the datastore factory that can create the datastore.

parseParamInfo

protected AbstractDataStoreServiceExtension.ParamInfo parseParamInfo(java.net.URL url)
For special urls like DB urls. parses out the required information from the url. Consider: jdbc.postgis://username:password@hosr:port/database/schema. it will parse out these paarts from the url. In cases like oracle the equivalents have to be understood.

Parameters:
url -
Returns: