1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.util;
17
18 import java.util.Set;
19
20 import org.kuali.rice.kim.api.identity.Person;
21 import org.kuali.rice.krad.uif.container.CollectionGroup;
22 import org.kuali.rice.krad.uif.container.Group;
23 import org.kuali.rice.krad.uif.element.Action;
24 import org.kuali.rice.krad.uif.field.DataField;
25 import org.kuali.rice.krad.uif.field.Field;
26 import org.kuali.rice.krad.uif.view.RequestAuthorizationCache;
27 import org.kuali.rice.krad.uif.view.View;
28 import org.kuali.rice.krad.uif.view.ViewAuthorizer;
29 import org.kuali.rice.krad.uif.view.ViewModel;
30 import org.kuali.rice.krad.uif.widget.Widget;
31
32 class MockViewAuthorizer implements ViewAuthorizer {
33
34 @Override
35 public Set<String> getActionFlags(View view, ViewModel model, Person user, Set<String> actions) {
36 return new java.util.HashSet<String>();
37 }
38
39 @Override
40 public Set<String> getEditModes(View view, ViewModel model, Person user, Set<String> editModes) {
41 return new java.util.HashSet<String>();
42 }
43
44 @Override
45 public boolean canOpenView(View view, ViewModel model, Person user) {
46 return true;
47 }
48
49 @Override
50 public boolean canEditView(View view, ViewModel model, Person user) {
51 return true;
52 }
53
54 @Override
55 public boolean canUnmaskField(View view, ViewModel model, DataField field, String propertyName, Person user) {
56 return true;
57 }
58
59 @Override
60 public boolean canPartialUnmaskField(View view, ViewModel model, DataField field, String propertyName,
61 Person user) {
62 return true;
63 }
64
65 @Override
66 public boolean canEditField(View view, ViewModel model, Field field, String propertyName, Person user) {
67 return true;
68 }
69
70 @Override
71 public boolean canViewField(View view, ViewModel model, Field field, String propertyName, Person user) {
72 return true;
73 }
74
75 @Override
76 public boolean canEditGroup(View view, ViewModel model, Group group, String groupId, Person user) {
77 return true;
78 }
79
80 @Override
81 public boolean canViewGroup(View view, ViewModel model, Group group, String groupId, Person user) {
82 return true;
83 }
84
85 @Override
86 public boolean canEditWidget(View view, ViewModel model, Widget widget, String widgetId, Person user) {
87 return true;
88 }
89
90 @Override
91 public boolean canViewWidget(View view, ViewModel model, Widget widget, String widgetId, Person user) {
92 return true;
93 }
94
95 @Override
96 public boolean canPerformAction(View view, ViewModel model, Action action, String actionEvent, String actionId,
97 Person user) {
98 return true;
99 }
100
101 @Override
102 public boolean canEditLine(View view, ViewModel model, CollectionGroup collectionGroup,
103 String collectionPropertyName, Object line, Person user) {
104 return true;
105 }
106
107 @Override
108 public boolean canViewLine(View view, ViewModel model, CollectionGroup collectionGroup,
109 String collectionPropertyName, Object line, Person user) {
110 return true;
111 }
112
113 @Override
114 public boolean canEditLineField(View view, ViewModel model, CollectionGroup collectionGroup,
115 String collectionPropertyName, Object line, Field field, String propertyName, Person user) {
116 return true;
117 }
118
119 @Override
120 public boolean canViewLineField(View view, ViewModel model, CollectionGroup collectionGroup,
121 String collectionPropertyName, Object line, Field field, String propertyName, Person user) {
122 return true;
123 }
124
125 @Override
126 public boolean canPerformLineAction(View view, ViewModel model, CollectionGroup collectionGroup,
127 String collectionPropertyName, Object line, Action action, String actionEvent, String actionId,
128 Person user) {
129 return true;
130 }
131
132 @Override
133 public void setRequestAuthorizationCache(RequestAuthorizationCache requestAuthorizationCache) {
134
135 }
136 }