View Javadoc

1   /*$Id: JobExecutionService.java,v 1.5 2004/12/03 14:47:41 jdt 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.beans.v1.Account;
14  import org.astrogrid.jes.delegate.JobSummary;
15  import org.astrogrid.workflow.beans.v1.Workflow;
16  import org.astrogrid.workflow.beans.v1.execution.JobURN;
17  import org.astrogrid.workflow.beans.v1.execution.WorkflowSummaryType;
18  
19  /*** A component that can execute and manage jobs
20   * @author Noel Winstanley nw@jb.man.ac.uk 01-Mar-2004
21   *
22   */
23  public interface JobExecutionService {
24      /*** submit a workflow to the job controller
25       * 
26       * @param workflow workflow document to submit (contains user credentials to execute under)
27       * @return new unique identifier for the job. never null
28       * @throws WorkflowInterfaceException if job cannot be submitted
29       */
30      JobURN submitWorkflow( Workflow workflow ) throws WorkflowInterfaceException;                               
31      
32      /***
33       * delete a job - remove all record of it from the jes store
34       * <p>does nothing at the moment
35       * @param jobURN unique identifier of the job to delete 
36       */    
37      void deleteJob(JobURN jobURN) throws WorkflowInterfaceException;
38      /***cancel a job - halt the execution of it
39       * <p> does nothing at the momenr
40       * @param jobURN unique identifier of the job
41       * @throws WorkflowInterfaceException
42       */
43      void cancelJob(JobURN jobURN) throws WorkflowInterfaceException;
44      /*** Retreive an annotated workflow document from the jes store
45       * 
46       * @param jobURN unique job id
47       * @return workflow document, plus annotations. never null
48       * @throws WorkflowInterfaceException if document cannot be retreived.
49       */
50      Workflow readJob(JobURN jobURN) throws WorkflowInterfaceException;
51      /*** retreive list of jobs for a particular user
52       * 
53       * @param account identifies a user
54       * @return array of job summaries
55       * @throws WorkflowInterfaceException
56       * @deprecated - use {@link #listJobs}
57       */
58      JobSummary[] readJobList(Account account) throws WorkflowInterfaceException;
59      
60      /*** list jobs for a particulat user.
61       * 
62       * @param account identifies the user
63       * @return array of workflow summaries
64       * @throws WorkflowInterfaceException
65       */
66      WorkflowSummaryType[] listJobs(Account account) throws WorkflowInterfaceException;
67      
68      
69  }
70  
71  
72  /* 
73  $Log: JobExecutionService.java,v $
74  Revision 1.5  2004/12/03 14:47:41  jdt
75  Merges from workflow-nww-776
76  
77  Revision 1.4.126.1  2004/12/01 21:08:44  nw
78  fixed to work with new summary type
79  
80  Revision 1.4  2004/03/09 15:33:41  nw
81  updated types
82  
83  Revision 1.3  2004/03/03 11:15:23  nw
84  tarted up javadocs, reviewed types
85  
86  Revision 1.2  2004/03/03 01:36:38  nw
87  merged interfaces in from branch nww-int05-bz#146
88  
89  Revision 1.1.2.2  2004/03/03 01:18:00  nw
90  commited first draft of interface design
91  
92  Revision 1.1.2.1  2004/03/01 19:02:57  nw
93  refined interfaces. almost ready to publish
94   
95  */