org.xmldb.api.reference.modules
public class CollectionManagementServiceImpl extends SimpleConfigurable implements CollectionManagementService
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
basePath |
protected Collection |
collection |
Constructor and Description |
---|
CollectionManagementServiceImpl(java.lang.String basePath)
Creates a new CollectionManager service
|
Modifier and Type | Method and Description |
---|---|
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.
|
getProperty, setProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProperty, setProperty
protected Collection collection
protected java.lang.String basePath
public CollectionManagementServiceImpl(java.lang.String basePath)
public java.lang.String getName()
public java.lang.String getVersion()
getVersion
in interface Service
public void setCollection(Collection col)
setCollection
in interface Service
col
- the XML:DB collection instance associated with this Servicepublic Collection createCollection(java.lang.String name) throws XMLDBException
createCollection
in interface CollectionManagementService
name
- The name of the collection to create.Collection
instance.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public void removeCollection(java.lang.String name) throws XMLDBException
removeCollection
in interface CollectionManagementService
name
- The name of the collection to remove.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.