Coverage Report - org.jtheque.primary.controller.able.ControllerState
 
Classes in this File Line Coverage Branch Coverage Complexity
ControllerState
N/A
N/A
1
 
 1  
 package org.jtheque.primary.controller.able;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.jtheque.primary.od.able.Data;
 20  
 
 21  
 /**
 22  
  * Represents a state of a controller. This is for the controllers of principal datas. The state can change when
 23  
  * a user interaction occurs or a state can be changed by an other state.
 24  
  *
 25  
  * @author Baptiste Wicht
 26  
  */
 27  
 public interface ControllerState {
 28  
         /**
 29  
          * Apply the state.
 30  
          */
 31  
         void apply();
 32  
 
 33  
         /**
 34  
          * Save the current data.
 35  
          *
 36  
          * @param infos The informations of the interface
 37  
          *
 38  
          * @return The new <code>ControllerState</code> or <code>null</code>
 39  
          */
 40  
         ControllerState save(FormBean infos);
 41  
 
 42  
         /**
 43  
          * Cancel the current state.
 44  
          *
 45  
          * @return The new <code>ControllerState</code> or <code>null</code>
 46  
          */
 47  
         ControllerState cancel();
 48  
 
 49  
         /**
 50  
          * Create a new object.
 51  
          *
 52  
          * @return The new <code>ControllerState</code> or <code>null</code>
 53  
          */
 54  
         ControllerState create();
 55  
 
 56  
         /**
 57  
          * Delete the current data.
 58  
          *
 59  
          * @return The new <code>ControllerState</code> or <code>null</code>
 60  
          */
 61  
         ControllerState delete();
 62  
 
 63  
         /**
 64  
          * Edit manually the current data.
 65  
          *
 66  
          * @return The new <code>ControllerState</code> or <code>null</code>
 67  
          */
 68  
         ControllerState manualEdit();
 69  
 
 70  
         /**
 71  
          * Display a data.
 72  
          *
 73  
          * @param data the data to display.
 74  
          *
 75  
          * @return The new <code>ControllerState</code> or <code>null</code>
 76  
          */
 77  
         ControllerState view(Data data);
 78  
 }