org.xmldb.api.reference.modules
Class CollectionManagementServiceImpl

java.lang.Object
  extended by org.xmldb.api.sdk.SimpleConfigurable
      extended by org.xmldb.api.reference.modules.CollectionManagementServiceImpl
All Implemented Interfaces:
Configurable, Service, CollectionManagementService

public class CollectionManagementServiceImpl
extends SimpleConfigurable
implements CollectionManagementService

CollectionManager provides management facilities for a Collection instance. Administrative access is required for retrieval of the CollectionManager interface. User level access is provided through the underlying Collection itself.


Field Summary
protected  java.lang.String basePath
           
protected  Collection collection
           
 
Constructor Summary
CollectionManagementServiceImpl(java.lang.String basePath)
          Creates a new CollectionManager service
 
Method Summary
 Collection createCollection(java.lang.String name)
          Creates a simple collection with a basic default configuration.
 java.lang.String getName()
          Returns the name of the Service
 java.lang.String getVersion()
          Returns the version of the Service
 void removeCollection(java.lang.String name)
          Removes the named collection from the system.
 void setCollection(Collection col)
          Provides a reference to the XML:DB collection instance that this service is associated with.
 
Methods inherited from class org.xmldb.api.sdk.SimpleConfigurable
getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Field Detail

collection

protected Collection collection

basePath

protected java.lang.String basePath
Constructor Detail

CollectionManagementServiceImpl

public CollectionManagementServiceImpl(java.lang.String basePath)
Creates a new CollectionManager service

Method Detail

getName

public java.lang.String getName()
Returns the name of the Service

Specified by:
getName in interface Service
Returns:
the name of the Service

getVersion

public java.lang.String getVersion()
Returns the version of the Service

Specified by:
getVersion in interface Service
Returns:
the version of the Service

setCollection

public void setCollection(Collection col)
Provides a reference to the XML:DB collection instance that this service is associated with.

Specified by:
setCollection in interface Service
Parameters:
col - the XML:DB collection instance associated with this Service

createCollection

public Collection createCollection(java.lang.String name)
                            throws XMLDBException
Creates a simple collection with a basic default configuration. More complex configuration requires using a proprietary interface

Specified by:
createCollection in interface CollectionManagementService
Parameters:
name - The name of the collection to create.
Returns:
The created Collection instance.
Throws:
XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendor specific errors that occur.

removeCollection

public void removeCollection(java.lang.String name)
                      throws XMLDBException
Removes the named collection from the system.

Specified by:
removeCollection in interface CollectionManagementService
Parameters:
name - The name of the collection to remove.
Throws:
XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendor specific errors that occur.