|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.source.impl.AbstractConfigurableSourceInspector org.apache.cocoon.components.source.impl.AbstractConfigurableSourceDescriptor org.apache.cocoon.components.source.impl.SimpleJdbcSourceDescriptor
public class SimpleJdbcSourceDescriptor
Simple SourceDescriptor implementation that can stores properties over JDBC.
The descriptor is to be configured with the name of a datasource that contains a table with the following scheme:
CREATE TABLE SOURCEPROPS(
SOURCE VARCHAR NOT NULL,
NAMESPACE VARCHAR NOT NULL,
NAME VARCHAR NOT NULL,
VALUE VARCHAR NOT NULL,
CONSTRAINT SYS_CT_11 UNIQUE(SOURCE,NAMESPACE,NAME))
The implementation will attempt to connect to the EventAware cache in order to notify it during changes. If it can't find the EventAware cache sources that are described by this SourceDescriptor will NOT be cacheable.
Field Summary |
---|
Fields inherited from interface org.apache.cocoon.components.source.SourceDescriptor |
---|
ROLE |
Constructor Summary | |
---|---|
SimpleJdbcSourceDescriptor()
|
Method Summary | |
---|---|
void |
configure(Configuration configuration)
Configuration options: element property (multiple,required)
- define a property that this store should handle. |
SourceProperty |
doGetSourceProperty(Source source,
String namespace,
String name)
Do the actual work of getting the requested SourceProperty for the given Source. |
void |
doRemoveSourceProperty(Source source,
String namespace,
String name)
Do the actual work of removing the given property from the provided Source. |
void |
doSetSourceProperty(Source source,
SourceProperty property)
Do the actual work of setting the provided SourceProperty on the given Source. |
SourceProperty[] |
getSourceProperties(Source source)
Iterates over the configured set of properties to handle, for each property calls doGetSourceProperty() ,
and returns the list of properties thus obtained. |
SourceValidity |
getValidity(Source source)
Get the validity object that describes the validity state of the properties belonging to the given source. |
void |
initialize()
|
void |
service(ServiceManager manager)
|
Methods inherited from class org.apache.cocoon.components.source.impl.AbstractConfigurableSourceDescriptor |
---|
removeSourceProperty, setSourceProperty |
Methods inherited from class org.apache.cocoon.components.source.impl.AbstractConfigurableSourceInspector |
---|
getPropertyTypes, getSourceProperty, handlesProperty |
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 |
Methods inherited from interface org.apache.cocoon.components.source.SourceDescriptor |
---|
removeSourceProperty, setSourceProperty |
Methods inherited from interface org.apache.cocoon.components.source.SourceInspector |
---|
getSourceProperty, handlesProperty |
Constructor Detail |
---|
public SimpleJdbcSourceDescriptor()
Method Detail |
---|
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
property
(multiple,required)
- define a property that this store should handle.datasource
(single,optional,[cocoondb])
- the name of the excalibur datasource to use.
configure
in interface Configurable
configure
in class AbstractConfigurableSourceInspector
ConfigurationException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public SourceProperty[] getSourceProperties(Source source) throws SourceException
AbstractConfigurableSourceInspector
doGetSourceProperty()
,
and returns the list of properties thus obtained. Subclasses
may want to overide this behavior to improve performance.
getSourceProperties
in interface SourceInspector
getSourceProperties
in class AbstractConfigurableSourceInspector
source
- the Source for wich to compute the property.
SourceException
public SourceProperty doGetSourceProperty(Source source, String namespace, String name) throws SourceException
AbstractConfigurableSourceInspector
doGetSourceProperty
in class AbstractConfigurableSourceInspector
SourceException
public void doSetSourceProperty(Source source, SourceProperty property) throws SourceException
AbstractConfigurableSourceDescriptor
doSetSourceProperty
in class AbstractConfigurableSourceDescriptor
SourceException
public void doRemoveSourceProperty(Source source, String namespace, String name) throws SourceException
AbstractConfigurableSourceDescriptor
doRemoveSourceProperty
in class AbstractConfigurableSourceDescriptor
SourceException
public SourceValidity getValidity(Source source)
SourceInspector
getValidity
in interface SourceInspector
source
- the Source for which to calculate the validity
its properties, null
if the source properties
are not cacheable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |