001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     * http://www.opensource.org/licenses/ecl2.php
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.kfs.module.ar.document.service.impl;
017    
018    import org.kuali.kfs.module.ar.businessobject.SystemInformation;
019    import org.kuali.kfs.module.ar.dataaccess.SystemInformationDao;
020    import org.kuali.kfs.module.ar.document.service.SystemInformationService;
021    import org.kuali.kfs.sys.service.UniversityDateService;
022    import org.springframework.transaction.annotation.Transactional;
023    
024    /**
025     * This class...
026     */
027    @Transactional
028    public class SystemInformationServiceImpl implements SystemInformationService {
029    
030        private SystemInformationDao systemInformationDao;  
031        private UniversityDateService universityDateService;
032        
033        public SystemInformation getByLockboxNumberForCurrentFiscalYear(String lockboxNumber) {
034            Integer universityFiscalYear = universityDateService.getCurrentFiscalYear();
035            return getByLockboxNumber(lockboxNumber, universityFiscalYear);
036        }
037        
038        public SystemInformation getByLockboxNumber(String lockboxNumber, Integer universityFiscalYear) {
039            return systemInformationDao.getByLockboxNumber(lockboxNumber, universityFiscalYear);
040        }
041    
042        public SystemInformation getByProcessingChartOrgAndFiscalYear(String chartCode, String orgCode, Integer fiscalYear) {
043            return getSystemInformationDao().getByProcessingChartOrgAndFiscalYear(chartCode, orgCode, fiscalYear);
044        }
045        
046        public int getCountByChartOrgAndLockboxNumber(String processingChartCode, String processingOrgCode, String lockboxNumber) {
047            return getSystemInformationDao().getCountByChartOrgAndLockboxNumber(processingChartCode, processingOrgCode, lockboxNumber);
048        }
049        
050        public SystemInformationDao getSystemInformationDao() {
051            return systemInformationDao;
052        }
053        
054        public void setSystemInformationDao(SystemInformationDao systemInformationDao) {
055            this.systemInformationDao = systemInformationDao;
056        }
057        
058        public void setUniversityDateService(UniversityDateService universityDateService) {
059            this.universityDateService = universityDateService;
060        }
061    
062    }