1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 package org.astrogrid.filemanager.client.delegate ;
49
50 import org.astrogrid.store.Ivorn ;
51
52 import org.astrogrid.filemanager.common.exception.NodeNotFoundException ;
53 import org.astrogrid.filemanager.common.exception.DuplicateNodeException;
54 import org.astrogrid.filemanager.common.exception.FileManagerIdentifierException;
55 import org.astrogrid.filemanager.common.exception.FileManagerServiceException;
56
57 import org.astrogrid.filemanager.client.FileManagerNode;
58
59 /***
60 * The public API for a FileManager delegate.
61 *
62 */
63 public interface FileManagerDelegate
64 {
65 /***
66 * Get the manager identifier.
67 * @return The manager ivorn identifier.
68 * @throws FileManagerServiceException If a problem occurs when handling the request.
69 *
70 */
71 public Ivorn getServiceIvorn()
72 throws FileManagerServiceException;
73
74 /***
75 * Create a node for a new account.
76 * @param ivorn The ivorn identifier for the account.
77 * @return A node representing the account home.
78 * @throws DuplicateNodeException If the the account already exists.
79 * @throws FileManagerServiceException If a problem occurs when handling the request.
80 *
81 */
82 public FileManagerNode addAccount(Ivorn ident)
83 throws
84 FileManagerServiceException,
85 DuplicateNodeException;
86
87 /***
88 * Get the root node for an account
89 * @param ivorn The identifier of the account.
90 * @return An new node for the account home.
91 * @throws NodeNotFoundException If the account does not exist.
92 * @throws FileManagerServiceException If a problem occurs when handling the request.
93 *
94 */
95 public FileManagerNode getAccount(Ivorn ivorn)
96 throws
97 FileManagerServiceException,
98 NodeNotFoundException;
99
100 /***
101 * Get a node from the node Ivorn
102 * @param ivorn The identifier of the node.
103 * @return The node for the ivorn.
104 * @throws NodeNotFoundException If the node does not exist.
105 * @throws FileManagerIdentifierException If the node identifier is invalid.
106 * @throws FileManagerServiceException If a problem occurs when handling the request.
107 *
108 */
109 public FileManagerNode getNode(Ivorn ivorn)
110 throws
111 FileManagerServiceException,
112 FileManagerIdentifierException,
113 NodeNotFoundException;
114
115 }
116