Package org.xmldb.api.reference.modules
Class CollectionManagementServiceImpl
java.lang.Object
org.xmldb.api.sdk.SimpleConfigurable
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
Fields inherited from interface org.xmldb.api.modules.CollectionManagementService
SERVICE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionCollectionManagementServiceImpl(String basePath) Creates a new CollectionManager service -
Method Summary
Modifier and TypeMethodDescriptioncreateCollection(String name) Creates a simple collection with a basic default configuration.getName()Returns the name of the ServiceReturns the version of the ServicevoidremoveCollection(String name) Removes the named collection from the system.voidsetCollection(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, setPropertyMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
-
Constructor Details
-
CollectionManagementServiceImpl
Creates a new CollectionManager service
-
-
Method Details
-
getName
Returns the name of the Service -
getVersion
Returns the version of the Service- Specified by:
getVersionin interfaceService- Returns:
- the version of the Service
-
setCollection
Provides a reference to the XML:DB collection instance that this service is associated with.- Specified by:
setCollectionin interfaceService- Parameters:
col- the XML:DB collection instance associated with this Service
-
createCollection
Creates a simple collection with a basic default configuration. More complex configuration requires using a proprietary interface- Specified by:
createCollectionin interfaceCollectionManagementService- 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 the named collection from the system.- Specified by:
removeCollectionin interfaceCollectionManagementService- Parameters:
name- The name of the collection to remove.- Throws:
XMLDBException- with expected error codes.
ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-