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 <acscomponent.idl>
00028
00029
00030
00031
00032 #pragma prefix "alma"
00033
00034
00035 module xmlstore
00036 {
00041 typedef string URI;
00045 typedef sequence <URI> URISeq;
00050 typedef string UniqueIdentifier;
00051
00055 typedef sequence <UniqueIdentifier> UniqueIdentifierSeq;
00056
00060 typedef xmlentity::XmlEntityStruct IdentifierRange;
00061
00066 typedef sequence <string> StringSeq;
00067
00071 exception ArchiveInternalError{};
00072
00077 enum operationType {STORED_XML, UPDATED_XML, DELETED_XML};
00078
00082 struct XmlStoreNotificationEvent {
00084 string uid;
00086 operationType operation;
00087 };
00088
00090 const string CHANNELNAME = "xmlstore";
00096 interface Identifier : ACS::ACSComponent
00097 {
00101 exception NotAvailable{};
00102
00106 exception NotFound{};
00107
00113 UniqueIdentifierSeq getUIDs(in short number)
00114 raises (NotAvailable);
00115
00125 UniqueIdentifier getIdNamespace()
00126 raises (NotAvailable);
00127
00128 IdentifierRange getNewRange()
00129 raises (NotAvailable);
00130
00131 IdentifierRange getNewRestrictedRange(in long number, in string user)
00132 raises (NotAvailable);
00133
00134 IdentifierRange getExistingRange(in URI identifier, in string user)
00135 raises (NotFound);
00136
00140 boolean checkUIDsyntax(in URI identifier);
00141 };
00142
00149 interface Cursor : ACS::OffShoot
00150 {
00155 struct QueryResult
00156 {
00157 URI identifier;
00158 string xml;
00159 };
00160
00164 typedef sequence <QueryResult> QueryResultSeq;
00165
00166
00167
00171 boolean hasNext()
00172 raises (ArchiveInternalError);
00173
00177 QueryResult next()
00178 raises (ArchiveInternalError);
00179
00183 QueryResultSeq nextBlock(in short size)
00184 raises (ArchiveInternalError);
00185
00190 oneway void close();
00191 };
00192
00202 interface Operational : ACS::OffShoot
00203 {
00207 struct StatusStruct
00208 {
00210 URI schema;
00212 string owner;
00214 string locks;
00216 boolean deleted;
00221 boolean dirty;
00223 boolean hidden;
00224 };
00232 exception AlreadyThere{};
00236 exception NotYetThere{};
00239 exception IllegalEntity{};
00241 exception DirtyEntity{};
00245 exception MalformedURI{};
00247 exception NotFound{};
00248
00252 boolean exists(in URI identifier)
00253 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00254
00256 void store(in xmlentity::XmlEntityStruct entity)
00257 raises (ArchiveInternalError, IllegalEntity);
00258
00262 void update(in xmlentity::XmlEntityStruct entity)
00263 raises (ArchiveInternalError, IllegalEntity);
00264
00268 void forceUpdate(in xmlentity::XmlEntityStruct entity)
00269 raises (ArchiveInternalError, IllegalEntity);
00270
00276 void updateXML(in URI uid, in string schema, in string newChild) raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00277
00281 xmlentity::XmlEntityStruct retrieve(in URI identifier)
00282 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00283
00287 StringSeq retrieveFragment(in URI identifier, in string id)
00288 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00289
00291 xmlentity::XmlEntityStruct updateRetrieve(in URI identifier)
00292 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00293
00295 xmlentity::XmlEntityStruct retrieveDirty(in URI identifier)
00296 raises (ArchiveInternalError, NotFound, MalformedURI);
00297
00301 void delete(in URI identifier)
00302 raises (ArchiveInternalError, NotFound, MalformedURI);
00303
00305 void undelete(in URI identifier)
00306 raises (ArchiveInternalError, NotFound, MalformedURI);
00307
00309 StatusStruct status(in URI identifier)
00310 raises (ArchiveInternalError, NotFound, MalformedURI);
00311
00321 Cursor query( in string query, in string schema)
00322 raises (ArchiveInternalError);
00327 Cursor queryContent( in string query, in string schema)
00328 raises (ArchiveInternalError);
00329
00331 Cursor queryDirty( in string query, in string schema)
00332 raises (ArchiveInternalError);
00333
00338 URISeq queryUIDs( in string query, in string schema)
00339 raises (ArchiveInternalError);
00340
00342 URISeq queryUIDsDirty( in string query, in string schema)
00343 raises (ArchiveInternalError);
00344
00349 URISeq queryRecent( in string schemaname, in string timestamp)
00350 raises (ArchiveInternalError);
00351
00352
00356 void addElement(in URI uid, in string schema, in string xPath, in string xmlElement)
00357 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00358
00362 void updateElement(in URI uid, in string schema, in string xPath, in string xmlElement)
00363 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00364
00365
00369 void deleteElement(in URI uid, in string schema, in string xPath)
00370 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00371
00372
00377 void close(in string password)
00378 raises (ArchiveInternalError);
00379
00380 };
00381
00386 interface Administrative : ACS::OffShoot, ACS::PingableResource
00387 {
00389 exception NotFound{};
00391 exception MalformedURI{};
00392
00396
00397
00402 void init(in string password)
00403 raises (ArchiveInternalError);
00404
00410 void reinit(in string password)
00411 raises (ArchiveInternalError);
00412
00416 void remove(in URI identifier, in boolean deep)
00417 raises (NotFound,MalformedURI,ArchiveInternalError);
00418
00425 void cleanTestArea()
00426 raises (ArchiveInternalError);
00427
00431 string config(in string name);
00432
00436 void close(in string password)
00437 raises (ArchiveInternalError);
00438 };
00439
00445 interface ArchiveConnection : ACS::ACSComponent
00446 {
00448 exception UserDoesNotExistException{};
00450 exception PermissionException{};
00452 exception ArchiveException{};
00453
00455 Operational getOperational(in string user)
00456 raises (UserDoesNotExistException,ArchiveException,PermissionException);
00457
00459 Administrative getAdministrative(in string user)
00460 raises (UserDoesNotExistException,ArchiveException,PermissionException);
00461
00462 };
00463 };
00464
00465
00466 #endif