Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/DATT/src/org/litesoft/datt/client/ViewDefs.java

Diff revisions: vs.
  @@ -1,138 +1,138 @@
1 - package org.litesoft.datt.client;
2 -
3 - import org.litesoft.datt.client.support.*;
4 - import org.litesoft.uispecification.*;
5 -
6 - import java.util.*;
7 -
8 - public interface ViewDefs {
9 - public static final ViewDef HOME = ViewDef.HOME;
10 - // Home View...
11 -
12 - public static final String HOME_SECTION_HOME_SWITCH_VIEW = "HOME VIEW";
13 -
14 - // End User Role Based
15 -
16 - public static final ViewDef ENDUSERS_SWITCH_HOME = new ViewDef( "EndUsersHomeView", "END USER" );
17 -
18 - public static final ViewDef ENDUSERS_SAMPLE = new ViewDef( "EndUsersSample", "END USERS SAMPLE" );
19 -
20 - static final ViewDef[] EndUser_Options = {ENDUSERS_SWITCH_HOME, ENDUSERS_SAMPLE,};
21 -
22 - // End User Manager Role Based
23 -
24 - public static final ViewDef ENDUSERMANAGERS_SWITCH_HOME = new ViewDef( "EndUserMangersHomeView", "END USER MANAGER" );
25 -
26 - public static final ViewDef ENDUSERMANAGERS_SAMPLE = new ViewDef( "EndUserMangersSample", "END USER MANAGER SAMPLE" );
27 -
28 - static final ViewDef[] EndUserManager_Options = {ENDUSERMANAGERS_SWITCH_HOME, ENDUSERMANAGERS_SAMPLE,};
29 -
30 - // Developer Role Based
31 -
32 - public static final ViewDef DEVELOPERS_SWITCH_HOME = new ViewDef( "DevelopersHomeView", "DEVELOPER" );
33 -
34 - public static final ViewDef DEVELOPERS_SAMPLE = new ViewDef( "DevelopersSample", "DEVELOPERS SAMPLE" );
35 -
36 - static final ViewDef[] Developer_Options = {DEVELOPERS_SWITCH_HOME, DEVELOPERS_SAMPLE,};
37 -
38 - // Customer Role Based
39 -
40 - public static final ViewDef REPRIORITIZE_STORIES = new ViewDef( "ReprioritizeStories", "REPRIORITIZE" );
41 -
42 - public static final ViewDef INITIAL_PRIORITIZING_STORIES = new ViewDef( "InitialPrioritizingStories", "INITIAL PRIORITIZING" );
43 -
44 - public static final ViewDef CUSTOMERS_SWITCH_HOME = new ViewDef( "CustomersHomeView", "CUSTOMER" );
45 -
46 - public static final ViewDef CUSTOMERS_SAMPLE = new ViewDef( "CustomersSample", "CUSTOMERS SAMPLE" );
47 -
48 - static final ViewDef[] Customer_Options = {CUSTOMERS_SWITCH_HOME, CUSTOMERS_SAMPLE,};
49 -
50 - // ProjectAdmin Role Based
51 -
52 - public static final ViewDef PROJECTADMINS_SWITCH_HOME = new ViewDef( "ProjectAdminsHomeView", "PROJECT ADMIN" );
53 -
54 - public static final ViewDef PROJECTADMINS_SAMPLE = new ViewDef( "ProjectAdminsSample", "PROJECT ADMIN SAMPLE" );
55 -
56 - static final ViewDef[] ProjectAdmin_Options = {PROJECTADMINS_SWITCH_HOME, PROJECTADMINS_SAMPLE,};
57 -
58 - // Admin...
59 -
60 - public static final String HOME_SECTION_ADMIN = "ADMIN";
61 -
62 - // Button: CHANGE PASSWORD
63 - public static final ViewDef ADMIN_CHANGE_PASSWORD = new ViewDef( "ChangePassword", "CHANGE PASSWORD" ); // Dialog
64 -
65 - // Button: MY PROFILE
66 - public static final ViewDef ADMIN_MY_PROFILE = new ViewDef( "MyProfile", "MY PROFILE" );
67 -
68 - // Button: REPORTS
69 - public static final ViewDef ADMIN_REPORTS = new ViewDef( "Reports", "REPORTS" );
70 -
71 - // Button: USERS
72 - public static final ViewDef ADMIN_USERS = new ViewDef( "Users", "USERS" );
73 -
74 - public static final String HOME_SECTION_STORIES = "STORIES";
75 -
76 - // Button: Stories
77 - public static final ViewDef STORY_STORIES = new ViewDef( "Stories", "STORIES" );
78 - public static final ViewDef STORY_TASKS = new ViewDef( "StoryTasks", "STORY TASKS" );
79 -
80 - // Button: MERGE STORIES
81 - public static final ViewDef STORY_MERGE_STORIES = new ViewDef( "MergeStories", "MERGE STORIES" );
82 - public static final ViewDef STORY_MERGE_STORIES_STEP_TWO = new ViewDef( "MergeStoriesStepTwo", "MERGE STORIES" );
83 - public static final ViewDef STORY_MERGE_STORIES_STEP_THREE = new ViewDef( "MergeStoriesStepThree", "MERGE STORIES" );
84 -
85 - // Button: EDIT PROJECT & MANAGE PROJECT(S) & MANAGE PROJECT GROUP(S)
86 - public static final ViewDef ADMIN_RESTRICTED_RESOURCE_EDITOR = new ViewDef( "RestrictedResourceEditor", "EDIT PROJECT" );
87 - public static final ViewDef ADMIN_RESTRICTED_RESOURCE_MANAGEMENT = new ViewDef( "RestrictedResourceManagement", "MANAGE PROJECT(S)" );
88 -
89 - public static final ViewDefSecuredSet[] SECURITY_SETS = //
90 - { //
91 - new ViewDefSecuredSet( Permissions.sAdminFlag, //
92 - ADMIN_USERS, ADMIN_RESTRICTED_RESOURCE_EDITOR, //
93 - // MERGE STORIES
94 - // STORY_MERGE_STORIES, STORY_MERGE_STORIES_STEP_TWO, STORY_MERGE_STORIES_STEP_THREE, //
95 - // Reports:
96 - // todo: XXX_REPORT_BASIC, XXX_REPORT_DETAILED, //
97 - HOME ), //
98 - new ViewDefSecuredSet( Permissions.sRestrictedResourceMgrFlag, //
99 - ADMIN_USERS, ADMIN_RESTRICTED_RESOURCE_MANAGEMENT, //
100 - // Reports:
101 - HOME ), //
102 - new ViewDefSecuredSet( Permissions.sSprAdminFlag, //
103 - ADMIN_USERS, ADMIN_RESTRICTED_RESOURCE_MANAGEMENT, //
104 - // Reports:
105 - HOME ), //
106 - new ViewDefSecuredSet( Permissions.sHelpDeskFlag, //
107 - ADMIN_USERS, //
108 - // Reports:
109 - HOME ), //
110 - new ViewDefSecuredSet( Permissions.sNonGuestFlag, //
111 - STORY_STORIES, //
112 - // Reports:
113 - HOME ), //
114 - new ViewDefSecuredSet( Permissions.sCustomerFlag, //
115 - // MERGE STORIES
116 - STORY_MERGE_STORIES, STORY_MERGE_STORIES_STEP_TWO, STORY_MERGE_STORIES_STEP_THREE, REPRIORITIZE_STORIES,
117 - INITIAL_PRIORITIZING_STORIES, STORY_TASKS, //
118 - // Reports:
119 - HOME ), //
120 - new ViewDefSecuredSet( // Any User
121 - ADMIN_CHANGE_PASSWORD, ADMIN_MY_PROFILE, ADMIN_REPORTS, //
122 - HOME ) //
123 - };
124 -
125 - public static final Map<Role, ViewDef[]> ROLES_MAP = Helper.createRolesMap();
126 -
127 - class Helper {
128 - public static Map<Role, ViewDef[]> createRolesMap() {
129 - Map<Role, ViewDef[]> zMap = new HashMap<Role, ViewDef[]>();
130 - zMap.put( Role.EndUser, EndUser_Options );
131 - zMap.put( Role.EndUserManager, EndUserManager_Options );
132 - zMap.put( Role.Developer, Developer_Options );
133 - zMap.put( Role.Customer, Customer_Options );
134 - zMap.put( Role.ProjectAdmin, ProjectAdmin_Options );
135 - return zMap;
136 - }
137 - }
138 - }
1 + package org.litesoft.datt.client;
2 +
3 + import org.litesoft.datt.client.support.*;
4 + import org.litesoft.uispecification.*;
5 +
6 + import java.util.*;
7 +
8 + public interface ViewDefs {
9 + public static final ViewDef HOME = ViewDef.HOME;
10 + // Home View...
11 +
12 + public static final String HOME_SECTION_HOME_SWITCH_VIEW = "HOME VIEW";
13 +
14 + // End User Role Based
15 +
16 + public static final ViewDef ENDUSERS_SWITCH_HOME = new ViewDef( "EndUsersHomeView", "END USER" );
17 +
18 + public static final ViewDef ENDUSERS_SAMPLE = new ViewDef( "EndUsersSample", "END USERS SAMPLE" );
19 +
20 + static final ViewDef[] EndUser_Options = {ENDUSERS_SWITCH_HOME, ENDUSERS_SAMPLE,};
21 +
22 + // End User Manager Role Based
23 +
24 + public static final ViewDef ENDUSERMANAGERS_SWITCH_HOME = new ViewDef( "EndUserMangersHomeView", "END USER MANAGER" );
25 +
26 + public static final ViewDef ENDUSERMANAGERS_SAMPLE = new ViewDef( "EndUserMangersSample", "END USER MANAGER SAMPLE" );
27 +
28 + static final ViewDef[] EndUserManager_Options = {ENDUSERMANAGERS_SWITCH_HOME, ENDUSERMANAGERS_SAMPLE,};
29 +
30 + // Developer Role Based
31 +
32 + public static final ViewDef DEVELOPERS_SWITCH_HOME = new ViewDef( "DevelopersHomeView", "DEVELOPER" );
33 +
34 + public static final ViewDef DEVELOPERS_SAMPLE = new ViewDef( "DevelopersSample", "DEVELOPERS SAMPLE" );
35 +
36 + static final ViewDef[] Developer_Options = {DEVELOPERS_SWITCH_HOME, DEVELOPERS_SAMPLE,};
37 +
38 + // Customer Role Based
39 +
40 + public static final ViewDef REPRIORITIZE_STORIES = new ViewDef( "ReprioritizeStories", "REPRIORITIZE" );
41 +
42 + public static final ViewDef INITIAL_PRIORITIZING_STORIES = new ViewDef( "InitialPrioritizingStories", "INITIAL PRIORITIZING" );
43 +
44 + public static final ViewDef CUSTOMERS_SWITCH_HOME = new ViewDef( "CustomersHomeView", "CUSTOMER" );
45 +
46 + public static final ViewDef CUSTOMERS_SAMPLE = new ViewDef( "CustomersSample", "CUSTOMERS SAMPLE" );
47 +
48 + static final ViewDef[] Customer_Options = {CUSTOMERS_SWITCH_HOME, CUSTOMERS_SAMPLE,};
49 +
50 + // ProjectAdmin Role Based
51 +
52 + public static final ViewDef PROJECTADMINS_SWITCH_HOME = new ViewDef( "ProjectAdminsHomeView", "PROJECT ADMIN" );
53 +
54 + public static final ViewDef PROJECTADMINS_SAMPLE = new ViewDef( "ProjectAdminsSample", "PROJECT ADMIN SAMPLE" );
55 +
56 + static final ViewDef[] ProjectAdmin_Options = {PROJECTADMINS_SWITCH_HOME, PROJECTADMINS_SAMPLE,};
57 +
58 + // Admin...
59 +
60 + public static final String HOME_SECTION_ADMIN = "ADMIN";
61 +
62 + // Button: CHANGE PASSWORD
63 + public static final ViewDef ADMIN_CHANGE_PASSWORD = new ViewDef( "ChangePassword", "CHANGE PASSWORD" ); // Dialog
64 +
65 + // Button: MY PROFILE
66 + public static final ViewDef ADMIN_MY_PROFILE = new ViewDef( "MyProfile", "MY PROFILE" );
67 +
68 + // Button: REPORTS
69 + public static final ViewDef ADMIN_REPORTS = new ViewDef( "Reports", "REPORTS" );
70 +
71 + // Button: USERS
72 + public static final ViewDef ADMIN_USERS = new ViewDef( "Users", "USERS" );
73 +
74 + public static final String HOME_SECTION_STORIES = "STORIES";
75 +
76 + // Button: Stories
77 + public static final ViewDef STORY_STORIES = new ViewDef( "Stories", "STORIES" );
78 + public static final ViewDef STORY_TASKS = new ViewDef( "StoryTasks", "STORY TASKS" );
79 +
80 + // Button: MERGE STORIES
81 + public static final ViewDef STORY_MERGE_STORIES = new ViewDef( "MergeStories", "MERGE STORIES" );
82 + public static final ViewDef STORY_MERGE_STORIES_STEP_TWO = new ViewDef( "MergeStoriesStepTwo", "MERGE STORIES" );
83 + public static final ViewDef STORY_MERGE_STORIES_STEP_THREE = new ViewDef( "MergeStoriesStepThree", "MERGE STORIES" );
84 +
85 + // Button: EDIT PROJECT & MANAGE PROJECT(S) & MANAGE PROJECT GROUP(S)
86 + public static final ViewDef ADMIN_RESTRICTED_RESOURCE_EDITOR = new ViewDef( "RestrictedResourceEditor", "EDIT PROJECT" );
87 + public static final ViewDef ADMIN_RESTRICTED_RESOURCE_MANAGEMENT = new ViewDef( "RestrictedResourceManagement", "MANAGE PROJECT(S)" );
88 +
89 + public static final ViewDefSecuredSet[] SECURITY_SETS = //
90 + { //
91 + new ViewDefSecuredSet( Permissions.sAdminFlag, //
92 + ADMIN_USERS, ADMIN_RESTRICTED_RESOURCE_EDITOR, //
93 + // MERGE STORIES
94 + // STORY_MERGE_STORIES, STORY_MERGE_STORIES_STEP_TWO, STORY_MERGE_STORIES_STEP_THREE, //
95 + // Reports:
96 + // todo: XXX_REPORT_BASIC, XXX_REPORT_DETAILED, //
97 + HOME ), //
98 + new ViewDefSecuredSet( Permissions.sRestrictedResourceMgrFlag, //
99 + ADMIN_USERS, ADMIN_RESTRICTED_RESOURCE_MANAGEMENT, //
100 + // Reports:
101 + HOME ), //
102 + new ViewDefSecuredSet( Permissions.sSprAdminFlag, //
103 + ADMIN_USERS, ADMIN_RESTRICTED_RESOURCE_MANAGEMENT, //
104 + // Reports:
105 + HOME ), //
106 + new ViewDefSecuredSet( Permissions.sHelpDeskFlag, //
107 + ADMIN_USERS, //
108 + // Reports:
109 + HOME ), //
110 + new ViewDefSecuredSet( Permissions.sNonGuestFlag, //
111 + STORY_STORIES, //
112 + // Reports:
113 + HOME ), //
114 + new ViewDefSecuredSet( Permissions.sCustomerFlag, //
115 + // MERGE STORIES
116 + STORY_MERGE_STORIES, STORY_MERGE_STORIES_STEP_TWO, STORY_MERGE_STORIES_STEP_THREE, REPRIORITIZE_STORIES,
117 + INITIAL_PRIORITIZING_STORIES, STORY_TASKS, //
118 + // Reports:
119 + HOME ), //
120 + new ViewDefSecuredSet( // Any User
121 + ADMIN_CHANGE_PASSWORD, ADMIN_MY_PROFILE, ADMIN_REPORTS, //
122 + HOME ) //
123 + };
124 +
125 + public static final Map<Role, ViewDef[]> ROLES_MAP = Helper.createRolesMap();
126 +
127 + class Helper {
128 + public static Map<Role, ViewDef[]> createRolesMap() {
129 + Map<Role, ViewDef[]> zMap = new HashMap<Role, ViewDef[]>();
130 + zMap.put( Role.EndUser, EndUser_Options );
131 + zMap.put( Role.EndUserManager, EndUserManager_Options );
132 + zMap.put( Role.Developer, Developer_Options );
133 + zMap.put( Role.Customer, Customer_Options );
134 + zMap.put( Role.ProjectAdmin, ProjectAdmin_Options );
135 + return zMap;
136 + }
137 + }
138 + }