View Javadoc
1   /*
2    * #%L
3    * IsisFish
4    * 
5    * $Id: RuleMock.java 4156 2014-12-09 11:27:18Z echatellier $
6    * $HeadURL: https://svn.codelutin.com/isis-fish/tags/isis-fish-4.4.0.2/src/test/java/fr/ifremer/isisfish/rule/RuleMock.java $
7    * %%
8    * Copyright (C) 2010 - 2012 Ifremer, CodeLutin, Chatellier Eric
9    * %%
10   * This program is free software: you can redistribute it and/or modify
11   * it under the terms of the GNU General Public License as
12   * published by the Free Software Foundation, either version 3 of the 
13   * License, or (at your option) any later version.
14   * 
15   * This program is distributed in the hope that it will be useful,
16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18   * GNU General Public License for more details.
19   * 
20   * You should have received a copy of the GNU General Public 
21   * License along with this program.  If not, see
22   * <http://www.gnu.org/licenses/gpl-3.0.html>.
23   * #L%
24   */
25  
26  package fr.ifremer.isisfish.rule;
27  
28  import fr.ifremer.isisfish.entities.Metier;
29  import fr.ifremer.isisfish.simulator.SimulationContext;
30  import fr.ifremer.isisfish.types.TimeStep;
31  
32  /**
33   * A basic rule implementation.
34   * 
35   * @author chatellier
36   * @version $Revision: 4156 $
37   * 
38   * Last update : $Date: 2014-12-09 12:27:18 +0100 (Tue, 09 Dec 2014) $
39   * By : $Author: echatellier $
40   */
41  public class RuleMock extends AbstractRule {
42  
43      public String description;
44      
45      public RuleMock(String description) {
46          this.description = description;
47      }
48  
49      /*
50       * @see fr.ifremer.isisfish.rule.Rule#getNecessaryResult()
51       */
52      @Override
53      public String[] getNecessaryResult() {
54          return null;
55      }
56  
57      /*
58       * @see fr.ifremer.isisfish.rule.Rule#getDescription()
59       */
60      @Override
61      public String getDescription() throws Exception {
62          return description;
63      }
64  
65      /*
66       * @see fr.ifremer.isisfish.rule.Rule#init(fr.ifremer.isisfish.simulator.SimulationContext)
67       */
68      @Override
69      public void init(SimulationContext context) throws Exception {
70  
71      }
72  
73      /*
74       * @see fr.ifremer.isisfish.rule.Rule#condition(fr.ifremer.isisfish.simulator.SimulationContext, fr.ifremer.isisfish.types.TimeStep, fr.ifremer.isisfish.entities.Metier)
75       */
76      @Override
77      public boolean condition(SimulationContext context, TimeStep step, Metier metier)
78              throws Exception {
79          return false;
80      }
81  
82      /*
83       * @see fr.ifremer.isisfish.rule.Rule#preAction(fr.ifremer.isisfish.simulator.SimulationContext, fr.ifremer.isisfish.types.TimeStep, fr.ifremer.isisfish.entities.Metier)
84       */
85      @Override
86      public void preAction(SimulationContext context, TimeStep step, Metier metier)
87              throws Exception {
88          // TODO Auto-generated method stub
89  
90      }
91  
92      /*
93       * @see fr.ifremer.isisfish.rule.Rule#postAction(fr.ifremer.isisfish.simulator.SimulationContext, fr.ifremer.isisfish.types.TimeStep, fr.ifremer.isisfish.entities.Metier)
94       */
95      @Override
96      public void postAction(SimulationContext context, TimeStep step, Metier metier)
97              throws Exception {
98  
99      }
100 }