View Javadoc

1   /*$Id: BasicWorkflowBuilder.java,v 1.2 2004/03/11 13:53:36 nw Exp $
2    * Created on 09-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.impl;
12  
13  import org.astrogrid.community.beans.v1.Credentials;
14  import org.astrogrid.portal.workflow.intf.WorkflowBuilder;
15  import org.astrogrid.portal.workflow.intf.WorkflowInterfaceException;
16  import org.astrogrid.workflow.beans.v1.Sequence;
17  import org.astrogrid.workflow.beans.v1.Workflow;
18  
19  /***
20   * @author Noel Winstanley nw@jb.man.ac.uk 09-Mar-2004
21   *
22   */
23  public class BasicWorkflowBuilder implements WorkflowBuilder {
24      /*** Construct a new BasicWorkflowBuilder
25       * 
26       */
27      public BasicWorkflowBuilder() {
28          super();
29      }
30      /***
31       * @see org.astrogrid.portal.workflow.intf.WorkflowBuilder#createWorkflow(org.astrogrid.community.beans.v1.Credentials, java.lang.String, java.lang.String)
32       */
33      public Workflow createWorkflow(Credentials creds, String name, String description)
34          throws WorkflowInterfaceException {
35          Workflow wf = new Workflow();
36          wf.setCredentials(creds);
37          wf.setName(name);
38          wf.setDescription(description);
39          Sequence seq = new Sequence();
40          wf.setSequence(seq);
41          assert wf != null;
42          assert wf.isValid();
43          return wf;        
44      }
45  }
46  
47  
48  /* 
49  $Log: BasicWorkflowBuilder.java,v $
50  Revision 1.2  2004/03/11 13:53:36  nw
51  merged in branch bz#236 - implementation of interfaces
52  
53  Revision 1.1.2.2  2004/03/11 13:36:10  nw
54  added implementations for the workflow interfaces
55  
56  Revision 1.1.2.1  2004/03/09 17:41:59  nw
57  created a bunch of implementations,
58   
59  */