View Javadoc

1   /** 2007, Digitalis Informatica. All rights reserved.
2    *
3    * Distribuicao e Gestao de Informatica, Lda.
4    * Estrada de Paco de Arcos num.9 - Piso -1
5    * 2780-666 Paco de Arcos
6    * Telefone: (351) 21 4408990
7    * Fax: (351) 21 4408999
8    * http://www.digitalis.pt
9    */
10  
11  package pt.digitalis.dif.controller.interfaces;
12  
13  import java.util.Map;
14  
15  import pt.digitalis.dif.controller.objects.ResultMessage;
16  import pt.digitalis.dif.dem.interfaces.IStageInstance;
17  import pt.digitalis.dif.dem.objects.ViewObject;
18  
19  /**
20   * Defines the expected behavior for a DIF response.
21   *
22   * @author Rodrigo Gonçalves <a href="mailto:rgoncalves@digitalis.pt">rgoncalves@digitalis.pt</a><br/>
23   * @author Luis Pinto <a href="mailto:lpinto@digitalis.pt">lpinto@digitalis.pt</a>
24   * @created 2007/12/05
25   */
26  public interface IDIFResponse {
27  
28      /**
29       * Adds an entry to the stage results map.
30       *
31       * @param resultName
32       *            the result name
33       * @param resultValue
34       *            the result value
35       */
36      public void addStageResult(String resultName, Object resultValue);
37  
38  
39      /**
40       * @return the request
41       */
42      public IDIFRequest getRequest();
43  
44      /**
45       * Inspector for the 'resultMessage' attribute.
46       *
47       * @return the resultMessage value
48       */
49      public ResultMessage getResultMessage();
50  
51      /**
52       * @return the stageInstance
53       */
54      public IStageInstance getStageInstance();
55  
56      /**
57       * Returns the value of the result with a given name, if it exists
58       *
59       * @param resultName the result name
60       *
61       * @return the value of the result with the supplied name, if it exists
62       */
63      public Object getStageResult(String resultName);
64  
65      /**
66       * Returns the DIFResponse stage results.
67       *
68       * @return The map with the stage results
69       */
70      public Map<String, Object> getStageResults();
71  
72      /**
73       * ViewObject inspector.
74       *
75       * @return the theView
76       */
77      public ViewObject getView();
78  
79      /**
80       * @param request the request to set
81       */
82      public void setRequest(IDIFRequest request);
83  
84      /**
85       * Modifier for the 'resultMessage' attribute.
86       *
87       * @param resultMessage the new resultMessage value to set
88       */
89      public void setResultMessage(ResultMessage resultMessage);
90  
91      /**
92       * @param stageInstance the stageInstance to set
93       */
94      public void setStageInstance(IStageInstance stageInstance);
95  
96      /**
97       * Builds the DIFResponse stage results based on an external map.
98       *
99       * @param map
100      *            The map with the original stage results
101      */
102     public void setStageResults(Map<String, Object> map);
103 
104     /**
105      * ViewObject modifier.
106      *
107      * @param newView
108      *            the theView to set
109      */
110     public void setView(ViewObject newView);
111 }