Package org.xmldb.api.modules
Interface CollectionManagementService
- All Superinterfaces:
Configurable,Service
- All Known Implementing Classes:
CollectionManagementServiceImpl
CollectionManagementService is a
Service 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 -
Method Summary
Modifier and TypeMethodDescriptioncreateCollection(String name) Creates a newCollectionin the database.voidremoveCollection(String name) Removes a namedCollectionfrom the system.Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setPropertyMethods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
-
Field Details
-
SERVICE_NAME
- See Also:
-
-
Method Details
-
createCollection
Creates a newCollectionin the database. The default configuration of the database is determined by the implementer. The newCollectionwill be created relative to theCollectionfrom which theCollectionManagementServicewas retrieved.- Parameters:
name- The name of the collection to create.- Returns:
- The created
Collectioninstance. - Throws:
XMLDBException- with expected error codes.
ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
removeCollection
Removes a namedCollectionfrom the system. The name for theCollectionto remove is relative to theCollectionfrom which theCollectionManagementServicewas retrieved.- Parameters:
name- The name of the collection to remove.- Throws:
XMLDBException- with expected error codes.
ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-