View Javadoc

1   /*$Id: WorkflowStore.java,v 1.8 2005/04/26 15:28:46 clq2 Exp $
2    * Created on 01-Mar-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
9    *
10  **/
11  package org.astrogrid.portal.workflow.intf;
12  
13  import org.astrogrid.community.User;
14  import org.astrogrid.community.beans.v1.Account;
15  import org.astrogrid.filemanager.client.FileManagerClient;
16  import org.astrogrid.filemanager.client.FileManagerNode;
17  import org.astrogrid.store.Ivorn;
18  import org.astrogrid.workflow.beans.v1.Workflow;
19  
20  /*** A component that can store and retreive workflow documents from VoSpace.
21   * (i.e. myspace)
22   * @author Noel Winstanley nw@jb.man.ac.uk 01-Mar-2004
23   *
24   */
25  public interface WorkflowStore {
26  
27      /*** delete a workflow from the store
28       * 
29       * @param acc account details of the owner of the workflow
30       * @param name name of the workflow
31       * @throws WorkflowInterfaceException
32       */
33     // void deleteWorkflow(Account acc, String name) throws WorkflowInterfaceException;
34  
35      /*** Read a query from the store
36       * 
37       * @param acc account details of the ownder of the query
38       * @param name name of the query
39       * @return a string representation of the query. will never return null
40       * @throws WorkflowInterfaceException if fails to read query
41       */
42      /*String readQuery( Account acc
43                                    , String name ) throws WorkflowInterfaceException ;
44  */
45      /*** return list of names of queries present in the store
46       * 
47       * @param acc account details for the owner of the list of queries
48       * @return list of query names. never returns null
49       * @throws WorkflowInterfaceException
50       */
51     // String[] listQueries(Account acc) throws WorkflowInterfaceException;
52                                             
53  
54      /*** read workflow from the store 
55       * 
56       * @param user account details for the owner of the workflow document 
57       * @param  locationToReadFrom ivorn location to read the workflow from.
58       * @return workflow document object. will never return null
59       * @throws WorkflowInterfaceException if document can't be loaded
60       * @deprecated use readWorkflow( FileManagerClient...)
61       */
62      Workflow readWorkflow(User user, Ivorn locationToReadFrom) throws WorkflowInterfaceException;
63      
64      
65      /*** read workflow from the store.
66       * @param userId user account to operate store as.
67       * @param password password for this user/
68       * @param locationToReadFrom location to read document from
69       * @return document object
70       * @throws WorkflowInterfaceException
71       * @deprecated use readWorkflow( FileManagerClient...)
72       */
73      Workflow readWorkflow(Ivorn userId, String password, Ivorn locationToReadFrom) throws WorkflowInterfaceException;
74      
75     
76      
77      /*** read workflow from the store.
78       * @param authenticated FileManagerClient
79       * @return document object
80       * @throws WorkflowInterfaceException
81       */
82      Workflow readWorkflow( FileManagerClient fileManagerClient, Ivorn locationToReadFrom) throws WorkflowInterfaceException;
83      
84      
85     /* Workflow readWorkflow( Account acc
86                                         , String name ) throws WorkflowInterfaceException;
87  */
88     /*** read list of workflow names from myspace 
89      * 
90      * @param acc account details for the owner of the workflow documents listed
91      * @return list of workflow names. never returns null
92      * @throws WorkflowInterfaceException
93      */                                        
94     //String[] listWorkflows(Account acc) throws WorkflowInterfaceException;                                         
95      /*** save workflow to myspace 
96       * 
97       * @param user account details for the owner of the workflow
98       * @param locationToSaveTo ivorn location to save the document
99       * @param workflow workflow document to save
100      * @throws WorkflowInterfaceException
101      * @deprecated use saveWorkflow( FileManagerClient...)
102      */
103     void saveWorkflow(User user,Ivorn locationToSaveTo,  Workflow workflow) throws WorkflowInterfaceException;
104 
105     
106     /*** save workflow to myspace
107      * @param userId user ivorn to operate store as
108      * @param password password for this user
109      * @param locationToSaveTo location to save workflow to 
110      * @param workflow workflow documet.
111      * @throws WorkflowInterfaceException
112      * @deprecated use saveWorkflow( FileManagerClient...)
113      */
114     void saveWorkflow(Ivorn userId,String password, Ivorn locationToSaveTo, Workflow workflow) throws WorkflowInterfaceException;
115     
116     
117     /*** save workflow to myspace
118      * @param authenticated fileManagerClient
119      * @param locationToSaveTo location to save workflow to 
120      * @param workflow workflow document.
121      * @throws WorkflowInterfaceException
122      */
123     FileManagerNode saveWorkflow( FileManagerClient fileManagerClient, Ivorn locationToSaveTo, Workflow workflow) throws WorkflowInterfaceException;
124     
125   /*  void saveWorkflow( Account acc
126                                       , Workflow workflow ) throws WorkflowInterfaceException;
127 */
128 
129 
130 
131 }
132 
133 
134 /* 
135 $Log: WorkflowStore.java,v $
136 Revision 1.8  2005/04/26 15:28:46  clq2
137 jl_wor_1085
138 
139 Revision 1.7.20.1  2005/04/14 10:04:17  jl99
140 Read and write of workflows can now be passed an authenticated FileManagerClient.
141 
142 Revision 1.7  2005/03/13 07:13:39  clq2
143 merging jes-nww-686 common-nww-686 workflow-nww-996 scripting-nww-995 cea-nww-994
144 
145 Revision 1.6.18.1  2005/03/11 12:39:30  nw
146 replaced vospaceClient with FileManagerClient
147 
148 Revision 1.6  2004/12/03 14:47:41  jdt
149 Merges from workflow-nww-776
150 
151 Revision 1.5.124.1  2004/12/01 21:08:35  nw
152 scripting documentation
153 
154 Revision 1.5  2004/04/14 13:02:57  nw
155 cut down workflow store interface. now to implement it.
156 
157 Revision 1.4  2004/03/09 15:32:19  nw
158 removed deprecated methods - no need for them
159 
160 Revision 1.3  2004/03/03 11:15:23  nw
161 tarted up javadocs, reviewed types
162 
163 Revision 1.2  2004/03/03 01:36:38  nw
164 merged interfaces in from branch nww-int05-bz#146
165 
166 Revision 1.1.2.2  2004/03/03 01:18:00  nw
167 commited first draft of interface design
168 
169 Revision 1.1.2.1  2004/03/01 19:02:57  nw
170 refined interfaces. almost ready to publish
171  
172 */