Package org.xmldb.api.modules
Interface CollectionManagementService
-
- All Superinterfaces:
Configurable
,Service
- All Known Implementing Classes:
CollectionManagementServiceImpl
public interface CollectionManagementService extends Service
CollectionManagementService is aService
that enables the basic management of collections within a database. The functionality provided is very basic because collection management varies widely among databases. This service simply provides functionality for those databases that are able to implement this basic functionality.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SERVICE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection
createCollection(java.lang.String name)
Creates a newCollection
in the database.void
removeCollection(java.lang.String name)
Removes a namedCollection
from the system.-
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
-
Methods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
-
-
-
-
Field Detail
-
SERVICE_NAME
static final java.lang.String SERVICE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
createCollection
Collection createCollection(java.lang.String name) throws XMLDBException
Creates a newCollection
in the database. The default configuration of the database is determined by the implementer. The newCollection
will be created relative to theCollection
from which theCollectionManagementService
was retrieved.- 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
void removeCollection(java.lang.String name) throws XMLDBException
Removes a namedCollection
from the system. The name for theCollection
to remove is relative to theCollection
from which theCollectionManagementService
was retrieved.- 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.
-
-