1 /**
2 * Copyright 2004-2012 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.hr.time.graceperiod.service;
17
18 import java.sql.Date;
19 import java.sql.Timestamp;
20
21 import org.kuali.hr.time.graceperiod.rule.GracePeriodRule;
22 import org.springframework.cache.annotation.Cacheable;
23
24 public interface GracePeriodService {
25 /**
26 * Fetch GracePeriodRule as of a particular date
27 * @param asOfDate
28 * @return
29 */
30 @Cacheable(value= GracePeriodRule.CACHE_NAME, key="'asOfDate=' + #p0")
31 public GracePeriodRule getGracePeriodRule(Date asOfDate);
32 /**
33 * Process grace period rule as of a particular date with the corresponding timestamp
34 * @param actualTime
35 * @param asOfDate
36 * @return
37 */
38 public Timestamp processGracePeriodRule(Timestamp actualTime, Date asOfDate);
39
40 /**
41 * Fetch Grace period rule by id
42 * @param tkGracePeriodId
43 * @return
44 */
45 @Cacheable(value= GracePeriodRule.CACHE_NAME, key="'tkGracePeriodId=' + #p0")
46 public GracePeriodRule getGracePeriodRule(String tkGracePeriodId);
47 }