View Javadoc

1   /*
2    * Copyright (c) 2005, The K-Wf Grid Consortium
3    * Fraunhofer Institute for Computer Architecture and Software Technology
4    * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
5    */
6   package net.kwfgrid.gworkflowdl.protocol.service;
7   
8   import net.kwfgrid.gworkflowdl.protocol.IncompatibleVersionsException;
9   import net.kwfgrid.gworkflowdl.protocol.IllegalModificationException;
10  
11  import java.rmi.RemoteException;
12  
13  /***
14     Interface for a service handling a set of distributed structures.
15     This must be implemented on server and on client side.
16   */
17  public interface IStructureService {
18      /***
19         Commit a modification to the server.
20       @param structureid The id of the structure to modify.
21        * @param clientversion The version number of the client.
22       * @param modification The modification.
23       * @param userID
24         @return The version number of the structure after the modification has been applied.
25         @exception IncompatibleVersionsException If the specified version of the client is not equal to the version of the server.
26         @exception IllegalModificationException If one the specified modification could not be applied.
27         @exception RemoteException If the server is unreachable (only appears on client side.)
28       */
29      int commitModification(String structureid, int clientversion, String modification, String userID) throws IllegalModificationException, IncompatibleVersionsException, RemoteException;
30  
31      /***
32         Get the modifications necessary to update the client of a distributed structure.
33       @param structureid The id of the structure to update.
34        * @param clientversion The version number of the client.
35       * @param userID
36         @return An array of modifications which need to be applied on the client side.
37         @exception RemoteException If the server is unreachable (only appears on client side.)
38       */
39      String[][] getModificationsForUpdate(String structureid, int clientversion, String userID) throws RemoteException;
40  }