View Javadoc

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.configurable.mvc.sections;
17  
18  import java.util.List;
19  
20  import org.kuali.student.common.ui.client.configurable.mvc.FieldDescriptor;
21  import org.kuali.student.common.ui.client.configurable.mvc.HasLayoutController;
22  import org.kuali.student.common.ui.client.mvc.DataModel;
23  import org.kuali.student.common.ui.client.widgets.field.layout.layouts.FieldLayout;
24  import org.kuali.student.common.validation.dto.ValidationResultInfo;
25  import org.kuali.student.common.validation.dto.ValidationResultInfo.ErrorLevel;
26  
27  import com.google.gwt.user.client.ui.Widget;
28  
29  /**
30   * Interface for Section.  Defines the methods necessary for a section.  A section contains fields and other
31   * sections.  A section represents a logical grouping of fields on the screen - it is also responsible for 
32   * automatic validation and layout of validation errors on the screen.
33   * 
34   * @author Kuali Student
35   *
36   */
37  public interface Section extends HasLayoutController{
38  
39  	public String addField(FieldDescriptor field);
40  	public String addSection(Section section);
41  	public String addSection(String key, Section section);
42  	public FieldLayout getLayout();
43  	public void removeField(String fieldKey);
44  	public void removeSection(String sectionKey);
45  	public void removeSection(Section section);
46  	public void removeField(FieldDescriptor field);
47  	public FieldDescriptor getField(String fieldKey);
48  	public Section getSection(String sectionKey);
49  	public List<FieldDescriptor> getUnnestedFields();
50  	public String addWidget(Widget widget);
51  	public void removeWidget(Widget widget);
52  	public void removeWidget(String key);
53  	public void resetFieldInteractionFlags();
54  	public void setFieldHasHadFocusFlags(boolean hadFocus);
55  	public void updateWidgetData(DataModel model);
56  	public void updateModel(DataModel model);
57  	public List<FieldDescriptor> getFields();
58  	public List<Section> getSections();
59  	public void enableValidation(boolean enableValidation);
60  	public boolean isValidationEnabled();
61  	public ErrorLevel processValidationResults(List<ValidationResultInfo> results);
62  	public ErrorLevel processValidationResults(List<ValidationResultInfo> results, boolean clearErrors);
63  	public void clearValidationWarnings();
64  	public boolean isDirty();
65  	public void resetDirtyFlags();
66  	
67  }