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
00254 exception NotImplemented{};
00255
00259 exception TimestampInconsistency{};
00260
00264 boolean exists(in URI identifier)
00265 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00266
00268 void store(in xmlentity::XmlEntityStruct entity)
00269 raises (ArchiveInternalError, IllegalEntity);
00270
00274 void update(in xmlentity::XmlEntityStruct entity)
00275 raises (ArchiveInternalError, IllegalEntity, TimestampInconsistency);
00276
00280 void forceUpdate(in xmlentity::XmlEntityStruct entity)
00281 raises (ArchiveInternalError, IllegalEntity, TimestampInconsistency);
00282
00288 void updateXML(in URI uid, in string schema, in wstring newChild) raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00289
00293 xmlentity::XmlEntityStruct retrieve(in URI identifier)
00294 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00295
00299 StringSeq retrieveFragment(in URI identifier, in string id)
00300 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00301
00303 xmlentity::XmlEntityStruct updateRetrieve(in URI identifier)
00304 raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00305
00307 xmlentity::XmlEntityStruct retrieveDirty(in URI identifier)
00308 raises (ArchiveInternalError, NotFound, MalformedURI);
00309
00313 void delete(in URI identifier)
00314 raises (ArchiveInternalError, NotFound, MalformedURI);
00315
00317 void undelete(in URI identifier)
00318 raises (ArchiveInternalError, NotFound, MalformedURI);
00319
00321 StatusStruct status(in URI identifier)
00322 raises (ArchiveInternalError, NotFound, MalformedURI);
00323
00333 Cursor query( in wstring query, in string schema)
00334 raises (ArchiveInternalError);
00339 Cursor queryContent( in wstring query, in string schema)
00340 raises (ArchiveInternalError);
00341
00343 Cursor queryDirty( in wstring query, in string schema)
00344 raises (ArchiveInternalError);
00345
00350 URISeq queryUIDs( in wstring query, in string schema)
00351 raises (ArchiveInternalError);
00352
00354 URISeq queryUIDsDirty( in wstring query, in string schema)
00355 raises (ArchiveInternalError);
00356
00361 URISeq queryRecent( in string schemaname, in string timestamp)
00362 raises (ArchiveInternalError);
00363
00364
00408 typedef sequence <StringSeq> stringSeqSeq;
00409 stringSeqSeq querySubmissions(in short fieldID, in string searchString,
00410 in boolean caseSensitive, in boolean containsQuery, in string PiCoIfilter)
00411 raises (ArchiveInternalError, NotImplemented);
00412
00413
00417 void addElement(in URI uid, in string schema, in wstring xPath, in wstring xmlElement)
00418 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00419
00423 void updateElement(in URI uid, in string schema, in wstring xPath, in wstring xmlElement)
00424 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00425
00426
00430 void deleteElement(in URI uid, in string schema, in wstring xPath)
00431 raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00432
00433
00438 void close(in string password)
00439 raises (ArchiveInternalError);
00440
00441 };
00442
00447 interface Administrative : ACS::OffShoot, ACS::PingableResource
00448 {
00450 exception NotFound{};
00452 exception MalformedURI{};
00453
00457
00458
00463 void init(in string password)
00464 raises (ArchiveInternalError);
00465
00471 void reinit(in string password)
00472 raises (ArchiveInternalError);
00473
00477 void remove(in URI identifier, in boolean deep)
00478 raises (NotFound,MalformedURI,ArchiveInternalError);
00479
00486 void cleanTestArea()
00487 raises (ArchiveInternalError);
00488
00492 string config(in string name);
00493
00497 void close(in string password)
00498 raises (ArchiveInternalError);
00499 };
00500
00506 interface ArchiveConnection : ACS::ACSComponent
00507 {
00509 exception UserDoesNotExistException{};
00511 exception PermissionException{};
00513 exception ArchiveException{};
00514
00516 Operational getOperational(in string user)
00517 raises (UserDoesNotExistException,ArchiveException,PermissionException);
00518
00520 Administrative getAdministrative(in string user)
00521 raises (UserDoesNotExistException,ArchiveException,PermissionException);
00522
00523 };
00524 };
00525
00526
00527 #endif