/**
   * Sets the match values to the chart code and its child charts (if any)
   *
   * @see org.kuali.kfs.sec.service.impl.AccessPermissionEvaluatorImpl#setMatchValues()
   */
  @Override
  protected void setMatchValues() {
    ChartService chartService = SpringContext.getBean(ChartService.class);

    List<String> matchChartCodes = new ArrayList<String>();
    matchChartCodes.add(propertyValue);

    List<String> allChartCodes = chartService.getAllChartCodes();
    for (String chart : allChartCodes) {
      if (chartService.isParentChart(chart, propertyValue)) {
        matchChartCodes.add(chart);
      }
    }

    matchValues = new String[matchChartCodes.size()];
    matchValues = (String[]) matchChartCodes.toArray(matchValues);
  }
コード例 #2
0
 @Override
 public boolean isValidChartCode(String chartOfAccountsCode) {
   Chart chart = chartService.getByPrimaryId(chartOfAccountsCode);
   return (chart != null);
 }