60
60
*
61
61
* @since 8.0.0
62
62
*/
63
- public class CmsGroupPrincipalDepemdenciesList extends A_CmsListDialog {
63
+ public class CmsGroupPrincipalDependenciesList extends A_CmsListDialog {
64
64
65
65
/** list action id constant. */
66
66
public static final String LIST_ACTION_ICON = "ai" ;
@@ -91,7 +91,7 @@ public class CmsGroupPrincipalDepemdenciesList extends A_CmsListDialog {
91
91
*
92
92
* @param jsp an initialized JSP action element
93
93
*/
94
- public CmsGroupPrincipalDepemdenciesList (CmsJspActionElement jsp ) {
94
+ public CmsGroupPrincipalDependenciesList (CmsJspActionElement jsp ) {
95
95
96
96
this (LIST_ID , jsp );
97
97
m_showAttributes = false ;
@@ -104,7 +104,7 @@ public CmsGroupPrincipalDepemdenciesList(CmsJspActionElement jsp) {
104
104
* @param req the JSP request
105
105
* @param res the JSP response
106
106
*/
107
- public CmsGroupPrincipalDepemdenciesList (PageContext context , HttpServletRequest req , HttpServletResponse res ) {
107
+ public CmsGroupPrincipalDependenciesList (PageContext context , HttpServletRequest req , HttpServletResponse res ) {
108
108
109
109
this (new CmsJspActionElement (context , req , res ));
110
110
m_showAttributes = false ;
@@ -116,7 +116,7 @@ public CmsGroupPrincipalDepemdenciesList(PageContext context, HttpServletRequest
116
116
* @param listId the id of the specialized list
117
117
* @param jsp an initialized JSP action element
118
118
*/
119
- protected CmsGroupPrincipalDepemdenciesList (String listId , CmsJspActionElement jsp ) {
119
+ protected CmsGroupPrincipalDependenciesList (String listId , CmsJspActionElement jsp ) {
120
120
121
121
super (
122
122
jsp ,
@@ -131,6 +131,7 @@ protected CmsGroupPrincipalDepemdenciesList(String listId, CmsJspActionElement j
131
131
/**
132
132
* @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions()
133
133
*/
134
+ @ Override
134
135
public void executeListMultiActions () {
135
136
136
137
throwListUnsupportedActionException ();
@@ -139,6 +140,7 @@ public void executeListMultiActions() {
139
140
/**
140
141
* @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions()
141
142
*/
143
+ @ Override
142
144
public void executeListSingleActions () {
143
145
144
146
throwListUnsupportedActionException ();
@@ -167,6 +169,7 @@ public void setParamGroupid(String groupId) {
167
169
/**
168
170
* @see org.opencms.workplace.list.A_CmsListDialog#fillDetails(java.lang.String)
169
171
*/
172
+ @ Override
170
173
protected void fillDetails (String detailId ) {
171
174
172
175
// no-op
@@ -175,28 +178,31 @@ protected void fillDetails(String detailId) {
175
178
/**
176
179
* @see org.opencms.workplace.list.A_CmsListDialog#getListItems()
177
180
*/
178
- protected List getListItems () throws CmsException {
181
+ @ Override
182
+ protected List <CmsListItem > getListItems () throws CmsException {
179
183
180
- CmsIdentifiableObjectContainer ret = new CmsIdentifiableObjectContainer (true , false );
181
- Iterator itGroups = CmsStringUtil .splitAsList (getParamGroupid (), CmsHtmlList .ITEM_SEPARATOR , true ).iterator ();
184
+ CmsIdentifiableObjectContainer < CmsListItem > ret = new CmsIdentifiableObjectContainer < CmsListItem > (true , false );
185
+ Iterator < String > itGroups = CmsStringUtil .splitAsList (getParamGroupid (), CmsHtmlList .ITEM_SEPARATOR , true ).iterator ();
182
186
String storedSiteRoot = getCms ().getRequestContext ().getSiteRoot ();
183
187
try {
184
188
getCms ().getRequestContext ().setSiteRoot ("/" );
185
189
while (itGroups .hasNext ()) {
186
- CmsGroup group = getCms ().readGroup (new CmsUUID (itGroups .next (). toString () ));
190
+ CmsGroup group = getCms ().readGroup (new CmsUUID (itGroups .next ()));
187
191
// get content
188
- Set resources = getCms ().getResourcesForPrincipal (group .getId (), null , m_showAttributes );
189
- Iterator itRes = resources .iterator ();
192
+ Set < CmsResource > resources = getCms ().getResourcesForPrincipal (group .getId (), null , m_showAttributes );
193
+ Iterator < CmsResource > itRes = resources .iterator ();
190
194
while (itRes .hasNext ()) {
191
- CmsResource resource = ( CmsResource ) itRes .next ();
192
- CmsListItem item = ( CmsListItem ) ret .getObject (resource .getResourceId ().toString ());
195
+ CmsResource resource = itRes .next ();
196
+ CmsListItem item = ret .getObject (resource .getResourceId ().toString ());
193
197
if (item == null ) {
194
198
item = getList ().newItem (resource .getResourceId ().toString ());
195
199
item .set (LIST_COLUMN_NAME , resource .getRootPath ());
196
200
item .set (LIST_COLUMN_TYPE , new Integer (resource .getTypeId ()));
197
- Iterator itAces = getCms ().getAccessControlEntries (resource .getRootPath (), false ).iterator ();
201
+ Iterator <CmsAccessControlEntry > itAces = getCms ().getAccessControlEntries (
202
+ resource .getRootPath (),
203
+ false ).iterator ();
198
204
while (itAces .hasNext ()) {
199
- CmsAccessControlEntry ace = ( CmsAccessControlEntry ) itAces .next ();
205
+ CmsAccessControlEntry ace = itAces .next ();
200
206
if (ace .getPrincipal ().equals (group .getId ())) {
201
207
if (CmsStringUtil .isNotEmptyOrWhitespaceOnly (ace .getPermissions ().getPermissionString ())) {
202
208
item .set (LIST_COLUMN_PERMISSIONS , group .getName ()
@@ -209,9 +215,11 @@ protected List getListItems() throws CmsException {
209
215
ret .addIdentifiableObject (item .getId (), item );
210
216
} else {
211
217
String oldData = (String )item .get (LIST_COLUMN_PERMISSIONS );
212
- Iterator itAces = getCms ().getAccessControlEntries (resource .getRootPath (), false ).iterator ();
218
+ Iterator <CmsAccessControlEntry > itAces = getCms ().getAccessControlEntries (
219
+ resource .getRootPath (),
220
+ false ).iterator ();
213
221
while (itAces .hasNext ()) {
214
- CmsAccessControlEntry ace = ( CmsAccessControlEntry ) itAces .next ();
222
+ CmsAccessControlEntry ace = itAces .next ();
215
223
if (ace .getPrincipal ().equals (group .getId ())) {
216
224
if (CmsStringUtil .isNotEmptyOrWhitespaceOnly (ace .getPermissions ().getPermissionString ())) {
217
225
String data = group .getName () + ": " + ace .getPermissions ().getPermissionString ();
@@ -226,10 +234,10 @@ protected List getListItems() throws CmsException {
226
234
}
227
235
}
228
236
// add users
229
- Iterator itUsers = getCms ().getUsersOfGroup (group .getName ()).iterator ();
237
+ Iterator < CmsUser > itUsers = getCms ().getUsersOfGroup (group .getName ()).iterator ();
230
238
while (itUsers .hasNext ()) {
231
- CmsUser user = ( CmsUser ) itUsers .next ();
232
- CmsListItem item = ( CmsListItem ) ret .getObject (user .getId ().toString ());
239
+ CmsUser user = itUsers .next ();
240
+ CmsListItem item = ret .getObject (user .getId ().toString ());
233
241
if (item == null ) {
234
242
item = getList ().newItem (user .getId ().toString ());
235
243
item .set (LIST_COLUMN_NAME , user .getName ());
@@ -238,10 +246,10 @@ protected List getListItems() throws CmsException {
238
246
}
239
247
}
240
248
// add child groups
241
- Iterator itChildren = getCms ().getChildren (group .getName (), false ).iterator ();
249
+ Iterator < CmsGroup > itChildren = getCms ().getChildren (group .getName (), false ).iterator ();
242
250
while (itChildren .hasNext ()) {
243
- CmsGroup child = ( CmsGroup ) itChildren .next ();
244
- CmsListItem item = ( CmsListItem ) ret .getObject (child .getId ().toString ());
251
+ CmsGroup child = itChildren .next ();
252
+ CmsListItem item = ret .getObject (child .getId ().toString ());
245
253
if (item == null ) {
246
254
item = getList ().newItem (child .getId ().toString ());
247
255
item .set (LIST_COLUMN_NAME , child .getName ());
@@ -259,6 +267,7 @@ protected List getListItems() throws CmsException {
259
267
/**
260
268
* @see org.opencms.workplace.CmsWorkplace#initMessages()
261
269
*/
270
+ @ Override
262
271
protected void initMessages () {
263
272
264
273
// add specific dialog resource bundle
@@ -272,6 +281,7 @@ protected void initMessages() {
272
281
/**
273
282
* @see org.opencms.workplace.list.A_CmsListDialog#setColumns(org.opencms.workplace.list.CmsListMetadata)
274
283
*/
284
+ @ Override
275
285
protected void setColumns (CmsListMetadata metadata ) {
276
286
277
287
// create column for edit
@@ -348,6 +358,7 @@ protected void setIconActions(CmsListColumnDefinition iconCol) {
348
358
/**
349
359
* @see org.opencms.workplace.list.A_CmsListDialog#setIndependentActions(org.opencms.workplace.list.CmsListMetadata)
350
360
*/
361
+ @ Override
351
362
protected void setIndependentActions (CmsListMetadata metadata ) {
352
363
353
364
// no-op
@@ -356,6 +367,7 @@ protected void setIndependentActions(CmsListMetadata metadata) {
356
367
/**
357
368
* @see org.opencms.workplace.list.A_CmsListDialog#setMultiActions(org.opencms.workplace.list.CmsListMetadata)
358
369
*/
370
+ @ Override
359
371
protected void setMultiActions (CmsListMetadata metadata ) {
360
372
361
373
// no-op
0 commit comments