1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.lum.lu.ui.course.client.configuration; |
17 | |
|
18 | |
import java.util.List; |
19 | |
|
20 | |
import org.kuali.student.common.ui.client.configurable.mvc.layouts.TabMenuController; |
21 | |
import org.kuali.student.common.ui.client.mvc.Controller; |
22 | |
import org.kuali.student.common.ui.client.mvc.DataModelDefinition; |
23 | |
import org.kuali.student.core.statement.dto.StatementTypeInfo; |
24 | |
import org.kuali.student.lum.common.client.lu.LUUIConstants; |
25 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.base.MetaInfoConstants; |
26 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.base.RichTextInfoConstants; |
27 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.AffiliatedOrgInfoConstants; |
28 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseActivityConstants; |
29 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseConstants; |
30 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseCourseSpecificLOsConstants; |
31 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseDurationConstants; |
32 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseExpenditureInfoConstants; |
33 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseFormatConstants; |
34 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseJointsConstants; |
35 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseLearningResultsConstants; |
36 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseRevenueInfoConstants; |
37 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.CreditCourseVersionsConstants; |
38 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.FeeInfoConstants; |
39 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.FeeInfoFixedRateFeeConstants; |
40 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.LearningObjectiveConstants; |
41 | |
import org.kuali.student.lum.lu.assembly.data.client.constants.orch.SingleUseLoConstants; |
42 | |
import org.kuali.student.lum.lu.ui.course.client.controllers.ViewCourseController; |
43 | |
|
44 | |
import com.google.gwt.user.client.ui.Widget; |
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | 0 | public class ViewCourseConfigurer |
54 | |
implements |
55 | |
CreditCourseConstants, |
56 | |
CreditCourseFormatConstants, |
57 | |
CreditCourseActivityConstants, |
58 | |
MetaInfoConstants, |
59 | |
CreditCourseDurationConstants, |
60 | |
FeeInfoConstants, |
61 | |
LearningObjectiveConstants, |
62 | |
CreditCourseCourseSpecificLOsConstants, |
63 | |
SingleUseLoConstants, |
64 | |
CreditCourseRevenueInfoConstants, |
65 | |
CreditCourseExpenditureInfoConstants, |
66 | |
AffiliatedOrgInfoConstants, |
67 | |
CreditCourseVersionsConstants, |
68 | |
CreditCourseJointsConstants, |
69 | |
RichTextInfoConstants, |
70 | |
FeeInfoFixedRateFeeConstants, |
71 | |
CreditCourseLearningResultsConstants |
72 | |
{ |
73 | |
|
74 | |
public static final String COURSE_MODEL = "courseModel"; |
75 | |
|
76 | |
|
77 | |
private static final String STATEMENTS_PATH = "statements"; |
78 | |
private static final String ID_TRANSLATION = "id-translation"; |
79 | |
|
80 | |
public static final String CLU_PROPOSAL_MODEL = "cluProposalModel"; |
81 | |
|
82 | |
|
83 | 0 | private String type = "Course"; |
84 | 0 | private String state = "draft"; |
85 | 0 | private String groupName = LUUIConstants.COURSE_GROUP_NAME; |
86 | |
|
87 | |
private DataModelDefinition modelDefinition; |
88 | |
private List<StatementTypeInfo> stmtTypes; |
89 | |
|
90 | 0 | public static enum ViewCourseSections{BRIEF, DETAILED, CATALOG} |
91 | |
|
92 | |
public void setModelDefinition(DataModelDefinition modelDefinition){ |
93 | 0 | this.modelDefinition = modelDefinition; |
94 | 0 | } |
95 | |
|
96 | |
public void setStatementTypes(List<StatementTypeInfo> stmtTypes) { |
97 | 0 | this.stmtTypes = stmtTypes; |
98 | 0 | } |
99 | |
|
100 | |
public void generateLayout(ViewCourseController layoutController) { |
101 | 0 | groupName = LUUIConstants.COURSE_GROUP_NAME; |
102 | |
|
103 | |
|
104 | 0 | this.generateLayout(layoutController, CLU_PROPOSAL_MODEL); |
105 | 0 | layoutController.addContentWidget(layoutController.getStatusLabel()); |
106 | 0 | Widget dropdown = layoutController.generateActionDropDown(); |
107 | 0 | layoutController.addContentWidget(dropdown); |
108 | |
|
109 | |
|
110 | 0 | layoutController.addContentWidget(layoutController.getVersionHistoryWidget()); |
111 | 0 | layoutController.showPrint(true); |
112 | 0 | } |
113 | |
|
114 | |
public void generateLayout(TabMenuController layoutController, String modelId) { |
115 | 0 | groupName = LUUIConstants.COURSE_GROUP_NAME; |
116 | |
|
117 | |
|
118 | 0 | CourseSummaryConfigurer summaryConfigurer = new CourseSummaryConfigurer(type, state, groupName, modelDefinition, stmtTypes, |
119 | |
(Controller)layoutController, modelId); |
120 | 0 | layoutController.addTab(summaryConfigurer.generateCourseBriefSection(), "At a Glance"); |
121 | 0 | layoutController.addTab(summaryConfigurer.generateCourseSummarySection(), "Detailed View"); |
122 | 0 | layoutController.addTab(summaryConfigurer.generateCourseCatalogSection(), "Catalog View"); |
123 | 0 | layoutController.setDefaultView(ViewCourseSections.BRIEF); |
124 | |
|
125 | |
|
126 | |
|
127 | |
|
128 | |
|
129 | 0 | } |
130 | |
} |