• Classes
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

archive_xmlstore_if.idl

Go to the documentation of this file.
00001 #ifndef _ARCHIVE_XMLSTORE_IF_IDL_
00002 #define _ARCHIVE_XMLSTORE_IF_IDL_
00003 
00004 /*
00005  *    ALMA - Atacama Large Millimiter Array
00006  *    (c) European Southern Observatory, 2002
00007  *    Copyright by ESO (in the framework of the ALMA collaboration),
00008  *    All rights reserved
00009  *
00010  *    This library is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 2.1 of the License, or (at your option) any later version.
00014  *
00015  *    This library is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with this library; if not, write to the Free Software
00022  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
00023  *    MA 02111-1307  USA
00024  */
00025 
00026 #include <xmlentity.idl> 
00027 #include <acscommon.idl>
00028 #include <acscomponent.idl>
00029 
00030 // HSO 2006-09-15: it seems that after a year of freedom from this bug, 
00031 // we must again put the pragma after the includes. Otherwise a unit test in ARCHIVE/Archive failed,
00032 // in which a C++ client accesses a Java component.
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}; // TODO add schema operations 
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                 // might need to add some exceptions
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                 // boolean ping();
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 /* _ARCHIVE_XMLSTORE_IF_IDL_ */

Generated on Thu Jan 12 2012 23:13:14 for ACS-10.0 IDL interfaces by  doxygen 1.7.0