Class DataSourcePropertyStore
java.lang.Object
org.apache.catalina.servlets.DataSourcePropertyStore
- All Implemented Interfaces:
- WebdavServlet.PropertyStore
WebDAV dead properties storage using a DataSource.
 
A single properties table with four columns is used:
- path: the resource path
- namespace: the node namespace
- name: the local name in the namespace
- node: the full serialized XML node including the name
tableName property of the store.
 
 Example table schema:
 CREATE TABLE properties (
    path         VARCHAR(1024) NOT NULL,
    namespace    VARCHAR(64) NOT NULL,
    name         VARCHAR(64) NOT NULL,
    node         VARCHAR(2048) NOT NULL,
    PRIMARY KEY (path, namespace, name)
 )
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected DataSourceDataSource instance being used.protected static final StringManager
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidCopy resource.voidDelete specified resource.voiddestroy()Destroy the store.voidinit()Initialize the store.voidPeriodic event for maintenance tasks.booleanGenerate propfind XML fragments for dead properties.voidproppatch(String resource, ArrayList<WebdavServlet.ProppatchOperation> operations) Apply proppatch to the specified resource.voidsetDataSourceName(String dataSourceName) voidsetTableName(String tableName) 
- 
Field Details- 
sm
- 
dataSourceDataSource instance being used.
 
- 
- 
Constructor Details- 
DataSourcePropertyStorepublic DataSourcePropertyStore()
 
- 
- 
Method Details- 
getDataSourceName- Returns:
- the DataSource JNDI name, will be prefixed with java:comp/env for the lookup.
 
- 
setDataSourceName- Parameters:
- dataSourceName- the DataSource JNDI name, will be prefixed with java:comp/env for the lookup.
 
- 
getTableName- Returns:
- the table name that will be used in the database
 
- 
setTableName- Parameters:
- tableName- the table name to use in the database
 
- 
initpublic void init()Description copied from interface:WebdavServlet.PropertyStoreInitialize the store. This is tied to the Servlet lifecycle and is called by its init method.- Specified by:
- initin interface- WebdavServlet.PropertyStore
 
- 
destroypublic void destroy()Description copied from interface:WebdavServlet.PropertyStoreDestroy the store. This is tied to the Servlet lifecycle and is called by its destroy method.- Specified by:
- destroyin interface- WebdavServlet.PropertyStore
 
- 
periodicEventpublic void periodicEvent()Description copied from interface:WebdavServlet.PropertyStorePeriodic event for maintenance tasks.- Specified by:
- periodicEventin interface- WebdavServlet.PropertyStore
 
- 
copyDescription copied from interface:WebdavServlet.PropertyStoreCopy resource. Dead properties should be copied to the destination path.- Specified by:
- copyin interface- WebdavServlet.PropertyStore
- Parameters:
- source- the copy source path
- destination- the copy destination path
 
- 
deleteDescription copied from interface:WebdavServlet.PropertyStoreDelete specified resource. Dead properties on a deleted resource should be deleted.- Specified by:
- deletein interface- WebdavServlet.PropertyStore
- Parameters:
- resource- the path of the resource to delete
 
- 
propfindDescription copied from interface:WebdavServlet.PropertyStoreGenerate propfind XML fragments for dead properties.- Specified by:
- propfindin interface- WebdavServlet.PropertyStore
- Parameters:
- resource- the resource path
- property- the dead property, if null then all dead properties must be written
- nameOnly- true if only the property name element should be generated
- generatedXML- the current generated XML for the PROPFIND response
- Returns:
- true if a property was specified and a corresponding dead property was found on the resource, false otherwise
 
- 
proppatchDescription copied from interface:WebdavServlet.PropertyStoreApply proppatch to the specified resource.- Specified by:
- proppatchin interface- WebdavServlet.PropertyStore
- Parameters:
- resource- the resource path on which to apply the proppatch
- operations- the set and remove to apply, the final status codes of the result should be set on each operation
 
 
-