View Javadoc

1   package fr.in2p3.jsaga.sync.logicalfile;
2   
3   import fr.in2p3.jsaga.sync.namespace.SyncNSEntry;
4   import org.ogf.saga.error.*;
5   import org.ogf.saga.url.URL;
6   
7   import java.util.List;
8   
9   /**
10   * A LogicalFile provides the means to handle the contents of logical files.
11   */
12  public interface SyncLogicalFile extends SyncNSEntry {
13  
14      /**
15       * Adds a replica location to the replica set. Note: does never throw an
16       * <code>AlreadyExists</code> exception!
17       *
18       * @param name
19       *            the location to add.
20       */
21      public void addLocationSync(URL name) throws NotImplementedException,
22              IncorrectURLException, AuthenticationFailedException,
23              AuthorizationFailedException, PermissionDeniedException,
24              BadParameterException, IncorrectStateException, TimeoutException,
25              NoSuccessException;
26  
27      /**
28       * Removes a replica location from the replica set.
29       *
30       * @param name
31       *            the location to remove.
32       */
33      public void removeLocationSync(URL name) throws NotImplementedException,
34              IncorrectURLException, AuthenticationFailedException,
35              AuthorizationFailedException, PermissionDeniedException,
36              BadParameterException, IncorrectStateException,
37              DoesNotExistException, TimeoutException, NoSuccessException;
38  
39      /**
40       * Changes a replica location in the replica set.
41       *
42       * @param nameOld
43       *            the location to be updated.
44       * @param nameNew
45       *            the updated location.
46       */
47      public void updateLocationSync(URL nameOld, URL nameNew)
48              throws NotImplementedException, IncorrectURLException,
49              AuthenticationFailedException, AuthorizationFailedException,
50              PermissionDeniedException, BadParameterException,
51              IncorrectStateException, AlreadyExistsException,
52              DoesNotExistException, TimeoutException, NoSuccessException;
53  
54      /**
55       * Lists the locations in this location set.
56       *
57       * @return the location list.
58       */
59      public List<URL> listLocationsSync() throws NotImplementedException,
60              AuthenticationFailedException, AuthorizationFailedException,
61              PermissionDeniedException, IncorrectStateException,
62              TimeoutException, NoSuccessException;
63  
64      /**
65       * Replicates a file from any of the known locations to a new location.
66       *
67       * @param name
68       *            location to replicate to.
69       * @param flags
70       *            flags defining the operation modus.
71       */
72      public void replicateSync(URL name, int flags) throws NotImplementedException,
73              IncorrectURLException, AuthenticationFailedException,
74              AuthorizationFailedException, PermissionDeniedException,
75              BadParameterException, IncorrectStateException,
76              AlreadyExistsException, DoesNotExistException, TimeoutException,
77              NoSuccessException;
78  
79      /**
80       * Replicates a file from any of the known locations to a new location, with
81       * default flags NONE.
82       *
83       * @param name
84       *            location to replicate to.
85       */
86      public void replicateSync(URL name) throws NotImplementedException,
87              IncorrectURLException, AuthenticationFailedException,
88              AuthorizationFailedException, PermissionDeniedException,
89              BadParameterException, IncorrectStateException,
90              AlreadyExistsException, DoesNotExistException, TimeoutException,
91              NoSuccessException;
92  }