1 | |
package org.kuali.student.lum.program.client; |
2 | |
|
3 | |
import java.util.ArrayList; |
4 | |
import java.util.HashMap; |
5 | |
|
6 | |
import org.kuali.student.lum.program.client.requirements.ProgramRequirementsViewController; |
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | 0 | public enum ProgramSections { |
14 | 0 | PROGRAM_PROPOSAL_VIEW, |
15 | 0 | PROGRAM_PROPOSAL_EDIT, |
16 | 0 | PROGRAM_PROPOSAL_CHANGE_IMPACT_VIEW, |
17 | 0 | PROGRAM_PROPOSAL_CHANGE_IMPACT_EDIT, |
18 | 0 | PROGRAM_DETAILS_VIEW, |
19 | 0 | PROGRAM_DETAILS_EDIT, |
20 | 0 | SPECIALIZATIONS_VIEW, |
21 | 0 | SPECIALIZATIONS_EDIT, |
22 | 0 | PROGRAM_REQUIREMENTS_VIEW, |
23 | 0 | PROGRAM_REQUIREMENTS_EDIT, |
24 | 0 | MANAGE_BODIES_VIEW, |
25 | 0 | MANAGE_BODIES_EDIT, |
26 | 0 | CATALOG_INFO_VIEW, |
27 | 0 | CATALOG_INFO_EDIT, |
28 | 0 | LEARNING_OBJECTIVES_VIEW, |
29 | 0 | LEARNING_OBJECTIVES_EDIT, |
30 | 0 | SUPPORTING_DOCUMENTS_VIEW, |
31 | 0 | SUPPORTING_DOCUMENTS_EDIT, |
32 | 0 | COLLABORATORS_EDIT, |
33 | 0 | VIEW_ALL, |
34 | 0 | SUMMARY, |
35 | 0 | COMMENTS, |
36 | 0 | EMPTY; |
37 | |
|
38 | 0 | private static HashMap<Enum<?>, Enum<?>> sectionMap = new HashMap<Enum<?>, Enum<?>>(); |
39 | |
|
40 | 0 | private static ArrayList<String> viewForUpdate = new ArrayList<String>(); |
41 | |
|
42 | |
static{ |
43 | 0 | viewForUpdate.add(SPECIALIZATIONS_EDIT.name()); |
44 | 0 | viewForUpdate.add(MANAGE_BODIES_EDIT.name()); |
45 | 0 | viewForUpdate.add(LEARNING_OBJECTIVES_EDIT.name()); |
46 | |
} |
47 | |
|
48 | |
static { |
49 | 0 | sectionMap.put(PROGRAM_PROPOSAL_VIEW, PROGRAM_PROPOSAL_EDIT); |
50 | 0 | sectionMap.put(PROGRAM_PROPOSAL_CHANGE_IMPACT_VIEW, PROGRAM_PROPOSAL_CHANGE_IMPACT_EDIT); |
51 | 0 | sectionMap.put(PROGRAM_DETAILS_VIEW, PROGRAM_DETAILS_EDIT); |
52 | 0 | sectionMap.put(SPECIALIZATIONS_VIEW, SPECIALIZATIONS_EDIT); |
53 | 0 | sectionMap.put(ProgramRequirementsViewController.ProgramRequirementsViews.PREVIEW, PROGRAM_REQUIREMENTS_EDIT); |
54 | 0 | sectionMap.put(MANAGE_BODIES_VIEW, MANAGE_BODIES_EDIT); |
55 | 0 | sectionMap.put(CATALOG_INFO_VIEW, CATALOG_INFO_EDIT); |
56 | 0 | sectionMap.put(LEARNING_OBJECTIVES_VIEW, LEARNING_OBJECTIVES_EDIT); |
57 | 0 | sectionMap.put(SUPPORTING_DOCUMENTS_VIEW, SUPPORTING_DOCUMENTS_EDIT); |
58 | 0 | } |
59 | |
|
60 | |
public static Enum<?> getEditSection(Enum<?> viewSection) { |
61 | 0 | return sectionMap.get(viewSection); |
62 | |
} |
63 | |
|
64 | |
public static ArrayList<String> getViewForUpdate() { |
65 | 0 | return viewForUpdate; |
66 | |
} |
67 | |
} |