Package org.xmldb.api.modules
Interface CollectionManagementService
-
- All Superinterfaces:
Configurable,Service
public interface CollectionManagementService extends Service
CollectionManagementService is aServicethat 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.StringSERVICE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcopy(java.lang.String collection, java.lang.String destination, java.lang.String newName)Copy the collection specified bycollectionto the givendestinationandnewName.voidcopyResource(java.lang.String resourcePath, java.lang.String destinationPath, java.lang.String newName)Copy the resource specified by theresourcePathto the givendestinationPathandnewName.CollectioncreateCollection(java.lang.String name)Creates a newCollectionin the database.voidmove(java.lang.String collection, java.lang.String destination, java.lang.String newName)Moves either acollectionorvoidmoveResource(java.lang.String resourcePath, java.lang.String destinationPath, java.lang.String newName)Moves the resource specified by theresourcePathto the givendestinationPathandnewName.voidremoveCollection(java.lang.String name)Removes a namedCollectionfrom the system.-
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, 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 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
void removeCollection(java.lang.String name) throws XMLDBExceptionRemoves 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.
-
move
void move(java.lang.String collection, java.lang.String destination, java.lang.String newName) throws XMLDBExceptionMoves either acollectionor- Parameters:
collection- The source collectiondestination- The destination collectionnewName- The new name of the moved collection in the destination collection- Throws:
XMLDBException- with expected error codes.ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
moveResource
void moveResource(java.lang.String resourcePath, java.lang.String destinationPath, java.lang.String newName) throws XMLDBExceptionMoves the resource specified by theresourcePathto the givendestinationPathandnewName.- Parameters:
resourcePath- The source documentdestinationPath- The destination collectionnewName- The new name of the moved source in the destination collection- Throws:
XMLDBException- with expected error codes.ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
copyResource
void copyResource(java.lang.String resourcePath, java.lang.String destinationPath, java.lang.String newName) throws XMLDBExceptionCopy the resource specified by theresourcePathto the givendestinationPathandnewName.- Parameters:
resourcePath- The source documentdestinationPath- The destination collectionnewName- The new name of the copied source in the destination collection- Throws:
XMLDBException- with expected error codes.ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
copy
void copy(java.lang.String collection, java.lang.String destination, java.lang.String newName) throws XMLDBExceptionCopy the collection specified bycollectionto the givendestinationandnewName.- Parameters:
collection- The source collectiondestination- The destination collectionnewName- The new name of the copied collection in the destination collection- Throws:
XMLDBException- with expected error codes.ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
-