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