1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.coa.service.impl;
17
18 import java.util.Map;
19
20 import org.kuali.ole.coa.businessobject.ObjectCode;
21 import org.kuali.ole.sys.service.UniversityDateService;
22 import org.kuali.rice.krad.bo.BusinessObject;
23 import org.kuali.rice.krad.datadictionary.InactivationBlockingMetadata;
24 import org.kuali.rice.krad.service.impl.InactivationBlockingDetectionServiceImpl;
25
26
27
28
29
30 public class ObjectCodeCurrentInactivationBlockingDetectionServiceImpl extends InactivationBlockingDetectionServiceImpl {
31 private UniversityDateService universityDateService;
32
33 @Override
34 protected Map<String, String> buildInactivationBlockerQueryMap(BusinessObject blockedBo, InactivationBlockingMetadata inactivationBlockingMetadata) {
35 ObjectCode blockedObjectCode = (ObjectCode) blockedBo;
36 if (universityDateService.getCurrentFiscalYear().equals(blockedObjectCode.getUniversityFiscalYear())) {
37 return super.buildInactivationBlockerQueryMap(blockedBo, inactivationBlockingMetadata);
38 }
39 return null;
40
41 }
42
43 public void setUniversityDateService(UniversityDateService universityDateService) {
44 this.universityDateService = universityDateService;
45 }
46
47 }