| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| View | 
 | 
 | 1.0;1 | 
| 1 |  /** | |
| 2 |   * Copyright 2010 The Kuali Foundation Licensed under the | |
| 3 |   * Educational Community License, Version 2.0 (the "License"); you may | |
| 4 |   * not use this file except in compliance with the License. You may | |
| 5 |   * obtain a copy of the License at | |
| 6 |   * | |
| 7 |   * http://www.osedu.org/licenses/ECL-2.0 | |
| 8 |   * | |
| 9 |   * Unless required by applicable law or agreed to in writing, | |
| 10 |   * software distributed under the License is distributed on an "AS IS" | |
| 11 |   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
| 12 |   * or implied. See the License for the specific language governing | |
| 13 |   * permissions and limitations under the License. | |
| 14 |   */ | |
| 15 | ||
| 16 |  package org.kuali.student.common.ui.client.mvc; | |
| 17 | ||
| 18 |  import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView; | |
| 19 |  import org.kuali.student.common.ui.client.mvc.breadcrumb.BreadcrumbSupport; | |
| 20 |  import org.kuali.student.common.ui.client.mvc.history.HistorySupport; | |
| 21 | ||
| 22 |  import com.google.gwt.user.client.ui.Widget; | |
| 23 | ||
| 24 |  /** | |
| 25 |   * Interface defining the operations necessary to implement a view. | |
| 26 |   *  | |
| 27 |   * @author Kuali Student Team | |
| 28 |   */ | |
| 29 | public interface View extends HistorySupport, BreadcrumbSupport { | |
| 30 |      /** | |
| 31 |       * Called by controller before the view is displayed to allow lazy initialization or any other preparatory work to be | |
| 32 |       * done.  Executes the callback with true if when the view is ready to be shown. | |
| 33 |       */ | |
| 34 | public void beforeShow(Callback<Boolean> onReadyCallback); | |
| 35 | ||
| 36 |      /** | |
| 37 |       * Called by the controller before the view is hidden to allow the view to perform cleanup or request confirmation from | |
| 38 |       * the user, etc. Can cancel the action by returning false. | |
| 39 |       *  | |
| 40 |       * @return true if the view can be hidden, or false to cancel the action. | |
| 41 |       */ | |
| 42 | public boolean beforeHide(); | |
| 43 | ||
| 44 |      /** | |
| 45 |       * Returns the controller associated with the view | |
| 46 |       *  | |
| 47 |       * @return | |
| 48 |       */ | |
| 49 |      public Controller getController(); | |
| 50 | ||
| 51 |      /** | |
| 52 |       * Returns the view's name | |
| 53 |       *  | |
| 54 |       * @return | |
| 55 |       */ | |
| 56 |      public String getName(); | |
| 57 | ||
| 58 |      public Enum<?> getViewEnum(); | |
| 59 | ||
| 60 |      /**  | |
| 61 |       * Can be called to reset a view to a cleared state. | |
| 62 |       * | |
| 63 |       */ | |
| 64 | public void clear(); | |
| 65 | ||
| 66 |      /** | |
| 67 |       * Updates the model with information from this view. If this view does not need to update the model | |
| 68 |       * leave this method empty. | |
| 69 |       */ | |
| 70 | public void updateModel(); | |
| 71 | ||
| 72 |      /** | |
| 73 |       * Get the attachable widget which represents this view | |
| 74 |       * @see SectionView | |
| 75 |       * @return | |
| 76 |       */ | |
| 77 |      public Widget asWidget(); | |
| 78 | ||
| 79 |      /** | |
| 80 |       *  | |
| 81 |       * This method needs to be implemented only on views that want the export button to display. | |
| 82 |       * The default implementation is not to display the export button | |
| 83 |       *  | |
| 84 |       * @return | |
| 85 |       */ | |
| 86 | public boolean isExportButtonActive(); | |
| 87 | ||
| 88 | public void showExport(boolean show); | |
| 89 | ||
| 90 | ||
| 91 | } |