View Javadoc

1   /*
2    * Copyright 2010 Fraunhofer Gesellschaft, Munich, Germany,
3    * for its Fraunhofer Institute for Computer Architecture and Software
4    * Technology (FIRST), Berlin, Germany. All rights reserved.
5    * http://www.first.fraunhofer.de/
6    */
7   
8   package net.kwfgrid.gworkflowdl.structure;
9   
10  
11  
12  /***
13   * Transitions can be linked to operations which are represented by this class.
14   * The operation can have a specific abstraction level:
15   * <ul>
16   * <li>Operation.RED = abstract empty operation with no additional information.
17   * <li>Operation.YELLOW = operation contains an operation class that specifies the name of the functionality.
18   * <li>Operation.BLUE = operation contains operation class and a set of candidates which fullfill the required functionality.
19   * <li>Operation.GREEN = one of the candidates has been selected for execution.
20   * </ul>
21   *
22   * @version $Id: Operation.java 1344 2010-01-27 15:36:48Z andreas.hoheisel@first.fraunhofer.de $
23   * @author Andreas Hoheisel &copy; 2008 <a href="http://www.first.fraunhofer.de/">Fraunhofer FIRST</a>  
24   *
25   */
26  public interface Operation {
27  
28      Object DEFAULT_OBJECT = null;
29  
30      /***
31       * no operation
32       */
33      int BLACK = -1;
34  
35      /***
36       * no operation class specified
37       */
38      int RED    = 0;
39  
40      /***
41       * operation class specified
42       */
43      int YELLOW = 1;
44  
45      /***
46       * List of operation candidates given, non (or more than one) selected
47       */
48      int BLUE   = 2;
49  
50      /***
51       * List given and one operation candidate selected
52       */
53      int GREEN  = 3;
54  
55      /***
56       * get operation object. Can be of class <code>Element</code> or <code>OperationClass</code>.
57       */
58      Object get();
59  
60      /***
61       * set operation object.
62       */
63      void set(Object object);
64  
65      /***
66       * set operation class
67       */
68      void set(OperationClass operationClass);
69  
70      /***
71       * get abstraction degree of operation
72       * @return  color
73       */
74      int getAbstractionLevel();
75  
76      String toXML();
77  
78      /***
79       * @param s representation of element
80       * @exception WorkflowFormatException If the given String could not be parsed.
81       */
82      void fromXML(String s) throws WorkflowFormatException;
83      
84  }