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.sys.service; 017 018 import org.kuali.kfs.sys.businessobject.UniversityDate; 019 020 /** 021 * 022 * This service interface defines methods that a UniversityDateService implementation must provide. 023 * 024 */ 025 public interface UniversityDateService { 026 027 /** 028 * Returns the current university date. 029 * 030 * @return The current university date. 031 */ 032 public UniversityDate getCurrentUniversityDate(); 033 034 /** 035 * Given a Date, returns the fiscal year corresponding to that date. 036 * 037 * @return Fiscal year associated with the given Date. 038 * @throws IllegalArgumentException if the given Date is null. 039 */ 040 public Integer getFiscalYear(java.util.Date date); 041 042 /** 043 * Returns the first date of the specified Fiscal Year. 044 * 045 * @param fiscalYear The fiscal year to retrieve the first date for. 046 * @return java.util.Date The first date of the fiscal year given. 047 */ 048 public java.util.Date getFirstDateOfFiscalYear(Integer fiscalYear); 049 050 /** 051 * Returns the last date of the specified Fiscal Year. 052 * 053 * @param fiscalYear The fiscal year to retrieve the last date for. 054 * @return java.util.Date The last date of the fiscal year given. 055 */ 056 public java.util.Date getLastDateOfFiscalYear(Integer fiscalYear); 057 058 /** 059 * Returns the current fiscal year. 060 * 061 * @return The current fiscal year 062 */ 063 public Integer getCurrentFiscalYear(); 064 065 }