org.apache.cocoon.components.source.impl
Class XMLDBSourceFactory

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.components.source.impl.XMLDBSourceFactory
All Implemented Interfaces:
Component, Configurable, Contextualizable, LogEnabled, Serviceable, SourceFactory, ThreadSafe

public final class XMLDBSourceFactory
extends AbstractLogEnabled
implements SourceFactory, Contextualizable, Configurable, Serviceable, ThreadSafe

This class implements the xmldb:// pseudo-protocol and allows to get XML content from an XML:DB enabled XML database.

Version:
CVS $Id: XMLDBSourceFactory.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
Gianugo Rabellino

Field Summary
protected  Context context
          The avalon context
protected  HashMap credentialMap
          A Map containing the authentication credentials
protected  ServiceManager m_manager
          The ServiceManager instance
 
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
 
Constructor Summary
XMLDBSourceFactory()
           
 
Method Summary
 void configure(Configuration conf)
          Configure the instance and initialize XML:DB connections (load and register the drivers).
 void contextualize(Context context)
           
 Source getSource(String location, Map parameters)
          Resolve the source
 void release(Source source)
           
 void service(ServiceManager cm)
          Compose this Serviceable object.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_manager

protected ServiceManager m_manager
The ServiceManager instance


credentialMap

protected HashMap credentialMap
A Map containing the authentication credentials


context

protected Context context
The avalon context

Constructor Detail

XMLDBSourceFactory

public XMLDBSourceFactory()
Method Detail

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

configure

public void configure(Configuration conf)
               throws ConfigurationException
Configure the instance and initialize XML:DB connections (load and register the drivers).

Specified by:
configure in interface Configurable
Throws:
ConfigurationException

service

public void service(ServiceManager cm)
Compose this Serviceable object. We need to pass on the ServiceManager to the actual Source.

Specified by:
service in interface Serviceable

getSource

public Source getSource(String location,
                        Map parameters)
                 throws MalformedURLException,
                        IOException
Resolve the source

Specified by:
getSource in interface SourceFactory
Throws:
MalformedURLException
IOException

release

public void release(Source source)
Specified by:
release in interface SourceFactory


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.