1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sec.service.impl;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.ole.coa.service.ChartService;
22 import org.kuali.ole.sys.context.SpringContext;
23
24
25
26
27 public class DescendChartAccessPermissionEvaluatorImpl extends AccessPermissionEvaluatorImpl {
28
29
30
31
32
33
34 @Override
35 protected void setMatchValues() {
36 ChartService chartService = SpringContext.getBean(ChartService.class);
37
38 List<String> matchChartCodes = new ArrayList<String>();
39 matchChartCodes.add(propertyValue);
40
41 List<String> allChartCodes = chartService.getAllChartCodes();
42 for (String chart : allChartCodes) {
43 if (chartService.isParentChart(chart, propertyValue)) {
44 matchChartCodes.add(chart);
45 }
46 }
47
48 matchValues = new String[matchChartCodes.size()];
49 matchValues = (String[]) matchChartCodes.toArray(matchValues);
50 }
51
52 }