org.exist.soap
Interface Admin

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
AdminSoapBindingImpl, AdminSoapBindingSkeleton, AdminSoapBindingStub

public interface Admin
extends java.rmi.Remote

This interface defines eXist's SOAP service for write operations on the database.


Method Summary
 java.lang.String connect(java.lang.String user, java.lang.String password)
          Create a new user session.
 boolean createCollection(java.lang.String sessionId, java.lang.String path)
          Create a new collection using the specified path.
 void disconnect(java.lang.String sessionId)
          Release a user session.
 boolean removeCollection(java.lang.String sessionId, java.lang.String path)
          Remove the specified collection.
 boolean removeDocument(java.lang.String sessionId, java.lang.String path)
          Remove the specified document.
 void store(java.lang.String sessionId, byte[] data, java.lang.String encoding, java.lang.String path, boolean replace)
          Store a new document into the database.
 int xupdate(java.lang.String sessionId, java.lang.String collectionName, java.lang.String xupdate)
          Apply a set of XUpdate modifications to a collection.
 int xupdateResource(java.lang.String sessionId, java.lang.String documentName, java.lang.String xupdate)
          Apply a set of XUpdate modifications to the specified document.
 

Method Detail

connect

public java.lang.String connect(java.lang.String user,
                                java.lang.String password)
                         throws java.rmi.RemoteException
Create a new user session. Authenticates the user against the database. The user has to be a valid database user. If the provided user information is valid, a new session will be registered on the server and a session id will be returned. The session will be valid for at least 60 minutes. Please call disconnect() to release the session. Sessions are shared between the Query and Admin services. A session created through the Query service can be used with the Admin service and vice versa.

Parameters:
user -
password -
Returns:
session-id a unique id for the created session
Throws:
java.rmi.RemoteException - if the user cannot log in

disconnect

public void disconnect(java.lang.String sessionId)
                throws java.rmi.RemoteException
Release a user session. This will free all resources (including result sets).

Parameters:
sessionId - a valid session id as returned by connect().
Throws:
java.rmi.RemoteException

store

public void store(java.lang.String sessionId,
                  byte[] data,
                  java.lang.String encoding,
                  java.lang.String path,
                  boolean replace)
           throws java.rmi.RemoteException
Store a new document into the database. The document will be stored using the name and location as specified by the path argument. To avoid any conflicts with the SOAP transport layer, document contents are passed as base64 encoded binary data. Internally, all documents are stored in UTF-8 encoding. The method will automatically replace an already existing document with the same path if the replace argument is set to true (and the user has sufficient privileges).

Parameters:
sessionId - a unique id for the created session.
data - the document contents as base64 encoded binary data.
encoding - the character encoding used for the document data.
path - the target path for the new document.
replace - should an existing document be replaced?
Throws:
java.rmi.RemoteException

removeCollection

public boolean removeCollection(java.lang.String sessionId,
                                java.lang.String path)
                         throws java.rmi.RemoteException
Remove the specified collection.

Parameters:
sessionId - sessionId a unique id for the created session.
path - the full path to the collection.
Returns:
true on success.
Throws:
java.rmi.RemoteException

removeDocument

public boolean removeDocument(java.lang.String sessionId,
                              java.lang.String path)
                       throws java.rmi.RemoteException
Remove the specified document.

Parameters:
sessionId - a unique id for the created session.
path - the full path to the document.
Returns:
true on success.
Throws:
java.rmi.RemoteException

createCollection

public boolean createCollection(java.lang.String sessionId,
                                java.lang.String path)
                         throws java.rmi.RemoteException
Create a new collection using the specified path.

Parameters:
sessionId - a unique id for the created session.
path - the full path to the collection.
Returns:
Throws:
java.rmi.RemoteException

xupdate

public int xupdate(java.lang.String sessionId,
                   java.lang.String collectionName,
                   java.lang.String xupdate)
            throws java.rmi.RemoteException
Apply a set of XUpdate modifications to a collection.

Parameters:
sessionId - a unique id for the created session.
collectionName - the full path to the collection.
xupdate - the XUpdate document to be applied.
Returns:
Throws:
java.rmi.RemoteException

xupdateResource

public int xupdateResource(java.lang.String sessionId,
                           java.lang.String documentName,
                           java.lang.String xupdate)
                    throws java.rmi.RemoteException
Apply a set of XUpdate modifications to the specified document.

Parameters:
sessionId - a unique id for the created session.
documentName - the full path to the document.
xupdate - the XUpdate document to be applied.
Returns:
Throws:
java.rmi.RemoteException


Copyright (C) Wolfgang Meier. All rights reserved.