1 /**
2 * Admin.java
3 *
4 * This file was auto-generated from WSDL
5 * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.
6 */
7
8 package net.kwfgrid.gwes.xmldbclient;
9
10 import javax.activation.DataHandler;
11 import java.rmi.RemoteException;
12
13 public interface AdminInterface extends java.rmi.Remote {
14 /**
15 * Store a new document into the database. The document will be stored using
16 * the name and location as specified by the path argument. To avoid any conflicts
17 * with the SOAP transport layer, document contents are passed as base64 encoded
18 * binary data. Internally, all documents are stored in UTF-8 encoding.
19 *
20 * The method will automatically replace an already existing document with the same
21 * path if the replace argument is set to true (and the user has sufficient privileges).
22 *
23 * @param sessionId a unique id for the created session.
24 * @param data the document contents as base64 encoded binary data.
25 * @param encoding the character encoding used for the document data.
26 * @param path the target path for the new document.
27 * @param replace should an existing document be replaced?
28 * @throws RemoteException
29 */
30 public void store(java.lang.String sessionId, DataHandler data, java.lang.String encoding, java.lang.String path, boolean replace) throws java.rmi.RemoteException;
31 /**
32 * Create a new user session. Authenticates the user against the database.
33 * The user has to be a valid database user. If the provided user information
34 * is valid, a new session will be registered on the server and a session id
35 * will be returned.
36 *
37 * The session will be valid for at least 60 minutes. Please call disconnect() to
38 * release the session.
39 *
40 * Sessions are shared between the Query and Admin services. A session created
41 * through the Query service can be used with the Admin service and vice versa.
42 *
43 * @param userId
44 * @param password
45 * @return session-id a unique id for the created session
46 * @throws RemoteException if the user cannot log in
47 */
48 public java.lang.String connect(java.lang.String userId, java.lang.String password) throws java.rmi.RemoteException;
49 /**
50 * Release a user session. This will free all resources (including result sets).
51 *
52 * @param sessionId a valid session id as returned by connect().
53 * @throws java.rmi.RemoteException
54 */
55 public void disconnect(java.lang.String sessionId) throws java.rmi.RemoteException;
56 /**
57 * Remove the specified collection.
58 *
59 * @param sessionId sessionId a unique id for the created session.
60 * @param path the full path to the collection.
61 * @return true on success.
62 *
63 * @throws RemoteException
64 */
65 public boolean removeCollection(java.lang.String sessionId, java.lang.String path) throws java.rmi.RemoteException;
66 /**
67 * Remove the specified document.
68 *
69 * @param sessionId a unique id for the created session.
70 * @param path the full path to the document.
71 * @return true on success.
72 *
73 * @throws RemoteException
74 */
75 public boolean removeDocument(java.lang.String sessionId, java.lang.String path) throws java.rmi.RemoteException;
76 /**
77 * Create a new collection using the specified path.
78 *
79 * @param sessionId a unique id for the created session.
80 * @param path the full path to the collection.
81 * @throws RemoteException
82 */
83 public boolean createCollection(java.lang.String sessionId, java.lang.String path) throws java.rmi.RemoteException;
84 /**
85 * Apply a set of XUpdate modifications to a collection.
86 *
87 * @param sessionId a unique id for the created session.
88 * @param collectionName the full path to the collection.
89 * @param xupdate the XUpdate document to be applied.
90 * @throws RemoteException
91 */
92 public int xupdate(java.lang.String sessionId, java.lang.String collectionName, java.lang.String xupdate) throws java.rmi.RemoteException;
93 /**
94 * Apply a set of XUpdate modifications to the specified document.
95 *
96 * @param sessionId a unique id for the created session.
97 * @param documentName the full path to the document.
98 * @param xupdate the XUpdate document to be applied.
99 * @throws RemoteException
100 */
101 public int xupdateResource(java.lang.String sessionId, java.lang.String documentName, java.lang.String xupdate) throws java.rmi.RemoteException;
102 /**
103 * Retrieve a binary resource from the database
104 * @param sessionId the session identifier
105 * @param name the name of the binary resource
106 * @return the binary resource data
107 * @throws java.rmi.RemoteException
108 */
109 public DataHandler getBinaryResource(java.lang.String sessionId, java.lang.String name) throws java.rmi.RemoteException;
110 /**
111 * Obtain a description of the specified collection.
112 *
113 * The description contains
114 * - the collection permissions
115 * - list of sub-collections
116 * - list of documents and their permissions
117 *
118 * @param sessionId the session identifier
119 * @param collectionName the collection
120 * @return the collection descriptor
121 * @throws java.rmi.RemoteException
122 */
123 public AdminServiceStub.CollectionDesc getCollectionDesc(java.lang.String sessionId, java.lang.String collectionName) throws java.rmi.RemoteException;
124 /**
125 * Set the owner, group and access permissions for a document or collection
126 * @param sessionId the session id
127 * @param resource the document/collection that will get new permissions
128 * @param owner the new owner
129 * @param ownerGroup the new group
130 * @param permissions the new access permissions
131 * @throws java.rmi.RemoteException
132 */
133 public void setPermissions(java.lang.String sessionId, java.lang.String resource, java.lang.String owner, java.lang.String ownerGroup, int permissions) throws java.rmi.RemoteException;
134 /**
135 * Copy a resource to the destination collection and rename it.
136 * @param sessionId the session identifier
137 * @param docPath the resource to cop
138 * @param destinationPath the destination collection
139 * @param newName the new name for the resource
140 * @throws java.rmi.RemoteException
141 */
142 public void copyResource(java.lang.String sessionId, java.lang.String docPath, java.lang.String destinationPath, java.lang.String newName) throws java.rmi.RemoteException;
143 /**
144 * Copy a collection to the destination collection and rename it.
145 * @param sessionId the session identifier
146 * @param collectionPath the collection to rename
147 * @param destinationPath the destination collection
148 * @param newName the new name of the collection.
149 * @throws java.rmi.RemoteException
150 */
151 public void copyCollection(java.lang.String sessionId, java.lang.String collectionPath, java.lang.String destinationPath, java.lang.String newName) throws java.rmi.RemoteException;
152 /** Create a new user.
153 * Requires Admin privilege.
154 * @param sessionId the session identifier
155 * @param name the name of the new user
156 * @param password the password for the new user
157 * @param groups the new user should belong to these groups
158 * @throws java.rmi.RemoteException
159 */
160 public void setUser(java.lang.String sessionId, java.lang.String name, java.lang.String password, AdminServiceStub.Strings groups, java.lang.String home) throws java.rmi.RemoteException;
161 /**
162 * Obtain information about an eXist user.
163 *
164 * @param sessionId the session identifier
165 * @param user the user
166 * @return the user information - name, groups and home collection
167 * @throws java.rmi.RemoteException if user doesn't exist
168 */
169 public AdminServiceStub.UserDesc getUser(java.lang.String sessionId, java.lang.String user) throws java.rmi.RemoteException;
170 /**
171 * Remove an eXist user account.
172 *
173 * Requires Admin privilege
174 * @param sessionId the session identifier
175 * @param name the name of the user
176 * @throws java.rmi.RemoteException
177 */
178 public void removeUser(java.lang.String sessionId, java.lang.String name) throws java.rmi.RemoteException;
179 /**
180 * Get an list of users
181 *
182 * @param sessionId the session identifier
183 * @return an array of user infomation (name, groups, home collection)
184 * @throws java.rmi.RemoteException
185 */
186 public AdminServiceStub.UserDescs getUsers(java.lang.String sessionId) throws java.rmi.RemoteException;
187 /**
188 * Obtain a list of the defined database groups
189 *
190 * @param sessionId the session identifier
191 * @return the list of groups
192 * @throws java.rmi.RemoteException
193 */
194 public AdminServiceStub.Strings getGroups(java.lang.String sessionId) throws java.rmi.RemoteException;
195 /**
196 * Move a collection and its contents.
197 *
198 * @param sessionId the session isentifier
199 * @param collectionPath the collection to move
200 * @param destinationPath the new parent collection
201 * @param newName the new collection name
202 * @throws java.rmi.RemoteException
203 */
204 public void moveCollection(java.lang.String sessionId, java.lang.String collectionPath, java.lang.String destinationPath, java.lang.String newName) throws java.rmi.RemoteException;
205 /**
206 * Move a resource.
207 *
208 * @param sessionId the session identifier
209 * @param docPath the resource to move
210 * @param destinationPath the collection to receive the moved resource
211 * @param newName the new name for the resource
212 * @throws java.rmi.RemoteException
213 */
214 public void moveResource(java.lang.String sessionId, java.lang.String docPath, java.lang.String destinationPath, java.lang.String newName) throws java.rmi.RemoteException;
215 /** Place a write lock on the specified resource
216 * @param sessionId the session identifier
217 * @param path the path of the resource to lock
218 * @param userName the user name of the lock owner
219 * @throws java.rmi.RemoteException
220 */
221 public void lockResource(java.lang.String sessionId, java.lang.String path, java.lang.String userName) throws java.rmi.RemoteException;
222 /** Release the lock on the specified resource
223 * @param sessionId the session identifier
224 * @param path path of the resource to unlock
225 * @throws java.rmi.RemoteException
226 */
227 public void unlockResource(java.lang.String sessionId, java.lang.String path) throws java.rmi.RemoteException;
228 /** Return the name of the user owning the lock on the specified resource
229 * @param sessionId the session identifier
230 * @param path the resource
231 * @return the name of the lock owner or "" if there is no lock
232 * @throws java.rmi.RemoteException
233 */
234 public java.lang.String hasUserLock(java.lang.String sessionId, java.lang.String path) throws java.rmi.RemoteException;
235 /** Return the permissions of the specified collection/document
236 * @param sessionId the session identifier
237 * @param resource the collection or document
238 * @return the permissions (owner, group, access permissions)
239 * @throws java.rmi.RemoteException
240 */
241 public AdminServiceStub.Permissions getPermissions(java.lang.String sessionId, java.lang.String resource) throws java.rmi.RemoteException;
242 /** Return a list of the permissions of the child collections of the specified parent collection
243 * @param sessionId the session identifier
244 * @param name the name of the parent collection
245 * @return array containing child collections with their permissions
246 * @throws java.rmi.RemoteException
247 */
248 public AdminServiceStub.EntityPermissionsList listCollectionPermissions(java.lang.String sessionId, java.lang.String name) throws java.rmi.RemoteException;
249 /** Return a list of the permissions of the child documents of the specified parent collection
250 * @param sessionId the session identifier
251 * @param name name of the parent collection
252 * @return array containing documents with their permissions
253 * @throws java.rmi.RemoteException
254 */
255 public AdminServiceStub.EntityPermissionsList listDocumentPermissions(java.lang.String sessionId, java.lang.String name) throws java.rmi.RemoteException;
256 /**
257 * Return a list of Indexed Elements for a collection
258 * @param sessionId the session identifier
259 * @param collectionName the collection name
260 * @param inclusive include sub-collections ?
261 * @return the list of Indexed Elements
262 * @throws java.rmi.RemoteException
263 */
264 public AdminServiceStub.IndexedElements getIndexedElements(java.lang.String sessionId, java.lang.String collectionName, boolean inclusive) throws java.rmi.RemoteException;
265 /**
266 * Store a binary resource in the database
267 *
268 * @param sessionId the session identifier
269 * @param data the binary data
270 * @param path the path for the new resource
271 * @param mimeType the mime type for the resource
272 * @param replace replace resource if it already exists
273 * @throws java.rmi.RemoteException
274 */
275 public void storeBinary(java.lang.String sessionId, DataHandler data, java.lang.String path, java.lang.String mimeType, boolean replace) throws java.rmi.RemoteException;
276 }