uk.co.lakesidetech.springxmldb.dao
Interface ICollectionManageXMLDBDao

All Known Implementing Classes:
BaseCollectionManageXMLDBDao

public interface ICollectionManageXMLDBDao

Defines Dao for managing and obtaining information (not querying) collections

Author:
Stuart Eccles

Method Summary
 void addCollection(java.lang.String existingCollectionPath, java.lang.String newCollectionName)
          Add a new child collection to an underlying existing collection
 void addCollectionPath(java.lang.String collectionPath)
          Add a new collection path to the XML database.
 boolean doesCollectionExist(java.lang.String collectionPath)
          Evaluate if a specific collection exists at a collection path in the database
 java.util.Collection getCollectionCollectionInfo(java.lang.String collectionPath)
          Get the information on all child collections of a collection given its collection path This method should return a collection (in the java.util sense) of XMLDBCollectionInfo objects
 java.util.Collection getCollectionResourceInfo(java.lang.String collectionPath)
          Get the information on all the resources in a collection given the collection path This method should return a collection (in the java.util sense) of XMLDBResourceInfo objects
 void removeCollection(java.lang.String collectionPath)
          Remove a collection from the XML datbase given the full collection path
 

Method Detail

addCollection

public void addCollection(java.lang.String existingCollectionPath,
                          java.lang.String newCollectionName)
                   throws XMLDBDataAccessException
Add a new child collection to an underlying existing collection

Parameters:
existingCollectionPath - The full collection path of the existing collection i.e. /db/test/content
newCollectionName - The single name of the collection to create i.e. newcol
Throws:
XMLDBDataAccessException - problems accessing the XML database

addCollectionPath

public void addCollectionPath(java.lang.String collectionPath)
                       throws XMLDBDataAccessException
Add a new collection path to the XML database. This method should create any non existing collections on the path

Parameters:
collectionPath - the full path of the collection to create i.e. /db/testcontent/newcol
Throws:
XMLDBDataAccessException - problems accessing the XML database

removeCollection

public void removeCollection(java.lang.String collectionPath)
                      throws XMLDBDataAccessException
Remove a collection from the XML datbase given the full collection path

Parameters:
collectionPath - the full path of the collection to remove i.e. /db/testcontent/newcol
Throws:
XMLDBDataAccessException - problems accessing the XML database

getCollectionResourceInfo

public java.util.Collection getCollectionResourceInfo(java.lang.String collectionPath)
                                               throws XMLDBDataAccessException
Get the information on all the resources in a collection given the collection path This method should return a collection (in the java.util sense) of XMLDBResourceInfo objects

Parameters:
collectionPath - the collection path to retrieve infomation on
Returns:
a java.util.Collection of XMLDBResourceInfo resource information
Throws:
XMLDBDataAccessException - problems accessing the XML database

doesCollectionExist

public boolean doesCollectionExist(java.lang.String collectionPath)
                            throws XMLDBDataAccessException
Evaluate if a specific collection exists at a collection path in the database

Parameters:
collectionPath - The collection path to check
Returns:
true if the collection exists
Throws:
XMLDBDataAccessException - problems accessing the XML database

getCollectionCollectionInfo

public java.util.Collection getCollectionCollectionInfo(java.lang.String collectionPath)
                                                 throws XMLDBDataAccessException
Get the information on all child collections of a collection given its collection path This method should return a collection (in the java.util sense) of XMLDBCollectionInfo objects

Parameters:
collectionPath - the collection path to retrieve infomation on
Returns:
a java.util.Collection of XMLDBCollectionInfo resource information
Throws:
XMLDBDataAccessException - problems accessing the XML database