org.xmldb.api.reference.modules

Class CollectionManagementServiceImpl

Implemented Interfaces:
CollectionManagementService, Configurable, Service

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 String
basePath
protected Collection
collection

Constructor Summary

CollectionManagementServiceImpl(String basePath)
Creates a new CollectionManager service

Method Summary

Collection
createCollection(String name)
Creates a simple collection with a basic default configuration.
String
getName()
Returns the name of the Service
String
getVersion()
Returns the version of the Service
void
removeCollection(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

Field Details

basePath

protected String basePath

collection

protected Collection collection

Constructor Details

CollectionManagementServiceImpl

public CollectionManagementServiceImpl(String basePath)
Creates a new CollectionManager service

Method Details

createCollection

public Collection createCollection(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

getName

public String getName()
Returns the name of the Service
Specified by:
getName in interface Service
Returns:
the name of the Service

getVersion

public String getVersion()
Returns the version of the Service
Specified by:
getVersion in interface Service
Returns:
the version of the Service

removeCollection

public void removeCollection(String name)
            throws XMLDBException
Removes the named collection from the system.
Specified by:
removeCollection in interface CollectionManagementService

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