1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.coa.document.authorization;
17
18 import java.util.Set;
19
20 import org.kuali.ole.coa.service.AccountService;
21 import org.kuali.ole.sys.OLEPropertyConstants;
22 import org.kuali.ole.sys.context.SpringContext;
23 import org.kuali.ole.sys.document.authorization.FinancialSystemMaintenanceDocumentPresentationControllerBase;
24 import org.kuali.rice.kns.document.MaintenanceDocument;
25 import org.kuali.rice.krad.util.KRADConstants;
26
27 public class IndirectCostRecoveryRateMaintenanceDocumentPresentationController extends FinancialSystemMaintenanceDocumentPresentationControllerBase {
28 public static final String COA_CODE_NAME = KRADConstants.ADD_PREFIX + "." + OLEPropertyConstants.INDIRECT_COST_RECOVERY_RATE_DETAILS + "." + OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE;
29
30
31
32
33
34
35
36 @Override
37 public Set<String> getConditionallyReadOnlyPropertyNames(MaintenanceDocument document) {
38 Set<String> readOnlyPropertyNames = super.getConditionallyReadOnlyPropertyNames(document);
39
40
41 if (!SpringContext.getBean(AccountService.class).accountsCanCrossCharts()) {
42 readOnlyPropertyNames.add(COA_CODE_NAME);
43 }
44
45 return readOnlyPropertyNames;
46 }
47
48 }