View Javadoc

1   /*$Id: JobSummary.java,v 1.3 2004/12/03 14:47:41 jdt Exp $
2    * Created on 08-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.jes.delegate;
12  
13  import org.astrogrid.applications.beans.v1.cea.castor.MessageType;
14  import org.astrogrid.applications.beans.v1.cea.castor.types.ExecutionPhase;
15  import org.astrogrid.workflow.beans.v1.execution.Extension;
16  import org.astrogrid.workflow.beans.v1.execution.JobURN;
17  import org.astrogrid.workflow.beans.v1.execution.WorkflowSummaryType;
18  
19  import java.util.Date;
20  import java.util.Enumeration;
21  
22  /*** Data class representing results of querying jes for user's jobs.
23   * @author Noel Winstanley nw@jb.man.ac.uk 08-Mar-2004
24   *@deprecated. just kept for compatability - clients should move to using {@link org.astrogrid.workflow.beans.v1.execution.WorkflowSummaryType} instead
25   */
26  public class JobSummary {
27      public JobSummary(WorkflowSummaryType item) {
28          this.item = item;
29          /*
30          name = item.getWorkflowName();
31          jobID = new JobURN();
32          jobID.setContent(item.getJobId().toString());
33          */
34      }
35      
36      protected final WorkflowSummaryType item;
37      /*** can't really support this one anymore 
38      public JobSummary(String name,JobURN jobID) {
39          this.name = name;
40          this.jobID = jobID;
41      }*/
42      /* don't need these anymore
43      protected final String name;
44      protected final JobURN jobID;
45      */
46  
47      public JobURN getJobURN() {
48          return this.getJobId();
49      }
50      
51      public String getName() {
52          return this.getWorkflowName();
53      }
54          
55    
56      public Enumeration enumerateExtension() {
57          return this.item.enumerateExtension();
58      }
59      public Enumeration enumerateMessage() {
60          return this.item.enumerateMessage();
61      }
62  
63      public String getDescription() {
64          return this.item.getDescription();
65      }
66      public Extension[] getExtension() {
67          return this.item.getExtension();
68      }
69      public Extension getExtension(int arg0) throws IndexOutOfBoundsException {
70          return this.item.getExtension(arg0);
71      }
72      public int getExtensionCount() {
73          return this.item.getExtensionCount();
74      }
75      public Date getFinishTime() {
76          return this.item.getFinishTime();
77      }
78      public JobURN getJobId() {
79          return this.item.getJobId();
80      }
81      public MessageType[] getMessage() {
82          return this.item.getMessage();
83      }
84      public MessageType getMessage(int arg0) throws IndexOutOfBoundsException {
85          return this.item.getMessage(arg0);
86      }
87      public int getMessageCount() {
88          return this.item.getMessageCount();
89      }
90      public Date getStartTime() {
91          return this.item.getStartTime();
92      }
93      public ExecutionPhase getStatus() {
94          return this.item.getStatus();
95      }
96      public String getWorkflowName() {
97          return this.item.getWorkflowName();
98      }
99    
100 }
101 
102 
103 /* 
104 $Log: JobSummary.java,v $
105 Revision 1.3  2004/12/03 14:47:41  jdt
106 Merges from workflow-nww-776
107 
108 Revision 1.2.128.1  2004/12/01 21:48:20  nw
109 adjusted to work with new summary object,
110 and changed package of JobURN
111 
112 Revision 1.2  2004/03/15 01:30:30  nw
113 jazzed up javadoc
114 
115 Revision 1.1  2004/03/09 15:04:42  nw
116 renamed JobInfo to JobSummary
117 
118 Revision 1.1  2004/03/09 14:23:12  nw
119 integrated new JobController wsdl interface
120  
121 */