00001 #ifndef _ARCHIVE_XMLSTORE_IF_IDL_
00002 #define _ARCHIVE_XMLSTORE_IF_IDL_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <xmlentity.idl>
00027 #include <acscommon.idl>
00028 #include <acscomponent.idl>
00029
00030
00031
00032
00033 #pragma prefix "alma"
00034
00035
00036 module xmlstore
00037 {
00042 typedef string URI;
00046 typedef sequence <URI> URISeq;
00051 typedef string UniqueIdentifier;
00052
00056 typedef sequence <UniqueIdentifier> UniqueIdentifierSeq;
00057
00061 typedef xmlentity::XmlEntityStruct IdentifierRange;
00062
00067 typedef sequence <string> StringSeq;
00068
00072 exception ArchiveInternalError{};
00073
00078 enum operationType {STORED_XML, UPDATED_XML, DELETED_XML};
00079
00083 struct XmlStoreNotificationEvent {
00085 string uid;
00087 operationType operation;
00088 };
00089
00091 const string CHANNELNAME = "xmlstore";
00097 interface Identifier : ACS::ACSComponent
00098 {
00102 exception NotAvailable{};
00103
00107 exception NotFound{};
00108
00114 UniqueIdentifierSeq getUIDs(in short number)
00115 raises (NotAvailable);
00116
00126 UniqueIdentifier getIdNamespace()
00127 raises (NotAvailable);
00128
00129 IdentifierRange getNewRange()
00130 raises (NotAvailable);
00131
00132 IdentifierRange getNewRestrictedRange(in long number, in string user)
00133 raises (NotAvailable);
00134
00135 IdentifierRange getExistingRange(in URI identifier, in string user)
00136 raises (NotFound);
00137
00141 boolean checkUIDsyntax(in URI identifier);
00142 };
00143
00150 interface Cursor : ACS::OffShoot
00151 {
00156 struct QueryResult
00157 {
00158 URI identifier;
00159 string xml;
00160 };
00161
00165 typedef sequence <QueryResult> QueryResultSeq;
00166
00167
00168
00172 boolean hasNext()
00173 raises (ArchiveInternalError);
00174
00178 QueryResult next()
00179 raises (ArchiveInternalError);
00180
00184 QueryResultSeq nextBlock(in short size)
00185 raises (ArchiveInternalError);
00186
00191 oneway void close();
00192 };
00193
00203 interface Operational : ACS::OffShoot
00204 {
00208 struct StatusStruct
00209 {
00211 URI schema;
00213 string owner;
00215 string locks;
00217 boolean deleted;
00222 boolean dirty;
00224 boolean hidden;
00225 };
00233 exception AlreadyThere{};
00237 exception NotYetThere{};
00240 exception IllegalEntity{};
00242 exception DirtyEntity{};
00246 exception MalformedURI{};
00248 exception NotFound{};
00249
00253 exception TimestampInconsistency{};
00254
00258 boolean exists(in URI identifier)
00259 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00260
00262 void store(in xmlentity::XmlEntityStruct entity)
00263 raises (ArchiveInternalError, IllegalEntity);
00264
00268 void update(in xmlentity::XmlEntityStruct entity)
00269 raises (ArchiveInternalError, IllegalEntity, TimestampInconsistency);
00270
00274 void forceUpdate(in xmlentity::XmlEntityStruct entity)
00275 raises (ArchiveInternalError, IllegalEntity, TimestampInconsistency);
00276
00282 void updateXML(in URI uid, in string schema, in wstring newChild) raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00283
00287 xmlentity::XmlEntityStruct retrieve(in URI identifier)
00288 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00289
00293 StringSeq retrieveFragment(in URI identifier, in string id)
00294 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00295
00297 xmlentity::XmlEntityStruct updateRetrieve(in URI identifier)
00298 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00299
00301 xmlentity::XmlEntityStruct retrieveDirty(in URI identifier)
00302 raises (ArchiveInternalError, NotFound, MalformedURI);
00303
00307 void delete(in URI identifier)
00308 raises (ArchiveInternalError, NotFound, MalformedURI);
00309
00311 void undelete(in URI identifier)
00312 raises (ArchiveInternalError, NotFound, MalformedURI);
00313
00315 StatusStruct status(in URI identifier)
00316 raises (ArchiveInternalError, NotFound, MalformedURI);
00317
00327 Cursor query( in wstring query, in string schema)
00328 raises (ArchiveInternalError);
00333 Cursor queryContent( in wstring query, in string schema)
00334 raises (ArchiveInternalError);
00335
00337 Cursor queryDirty( in wstring query, in string schema)
00338 raises (ArchiveInternalError);
00339
00344 URISeq queryUIDs( in wstring query, in string schema)
00345 raises (ArchiveInternalError);
00346
00348 URISeq queryUIDsDirty( in wstring query, in string schema)
00349 raises (ArchiveInternalError);
00350
00355 URISeq queryRecent( in string schemaname, in string timestamp)
00356 raises (ArchiveInternalError);
00357
00358
00362 void addElement(in URI uid, in string schema, in wstring xPath, in wstring xmlElement)
00363 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00364
00368 void updateElement(in URI uid, in string schema, in wstring xPath, in wstring xmlElement)
00369 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00370
00371
00375 void deleteElement(in URI uid, in string schema, in wstring xPath)
00376 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00377
00378
00383 void close(in string password)
00384 raises (ArchiveInternalError);
00385
00386 };
00387
00392 interface Administrative : ACS::OffShoot, ACS::PingableResource
00393 {
00395 exception NotFound{};
00397 exception MalformedURI{};
00398
00402
00403
00408 void init(in string password)
00409 raises (ArchiveInternalError);
00410
00416 void reinit(in string password)
00417 raises (ArchiveInternalError);
00418
00422 void remove(in URI identifier, in boolean deep)
00423 raises (NotFound,MalformedURI,ArchiveInternalError);
00424
00431 void cleanTestArea()
00432 raises (ArchiveInternalError);
00433
00437 string config(in string name);
00438
00442 void close(in string password)
00443 raises (ArchiveInternalError);
00444 };
00445
00451 interface ArchiveConnection : ACS::ACSComponent
00452 {
00454 exception UserDoesNotExistException{};
00456 exception PermissionException{};
00458 exception ArchiveException{};
00459
00461 Operational getOperational(in string user)
00462 raises (UserDoesNotExistException,ArchiveException,PermissionException);
00463
00465 Administrative getAdministrative(in string user)
00466 raises (UserDoesNotExistException,ArchiveException,PermissionException);
00467
00468 };
00469 };
00470
00471
00472 #endif