1 /*
2 * Copyright 2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with the
6 * License. You may obtain a copy of the License at
7 *
8 * http://www.osedu.org/licenses/ECL-2.0
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
13 * implied. See the License for the specific language governing
14 * permissions and limitations under the License.
15 */
16
17 package org.kuali.student.core.rate.infc;
18
19 import org.kuali.student.r2.common.infc.IdEntity;
20 import org.kuali.student.r2.common.infc.CurrencyAmount;
21
22 import java.util.Date;
23 import java.util.List;
24
25
26 /**
27 * The Rate is drawn from the CatalogRate. The CatalogRate constrains
28 * the Rate.
29 *
30 * The Rate has one of three flavors indicated by its Type:
31 *
32 * <dl> <dt>Flat</dt> <dd>A rate that doesn't vary. The amount is
33 * constrained by the minimum and maximum amount
34 * range in the Rate Catalog.</dd>
35 *
36 * <dt>Fixed Unit</dt> <dd>A rate per unit where the total amount
37 * is the rate multiplied by the units
38 * determined by what this Rate applies
39 * to. The amount is constrained by the
40 * minimum and maximum amount range in the
41 * Rate Catalog.</dd>
42 *
43 * <dt>Flexible Unit</dt> <dd>A specific rate for each unit
44 * value. The list of flexible unit
45 * amounts is constrained by the list of
46 * acceptable units amounts in the Rate
47 * Catalog.</dd> </dl>
48 *
49 * @author Kuali Student Services
50 */
51
52 public interface Rate
53 extends IdEntity {
54
55 /**
56 * The CatalogRate identifier to which this Rate belongs.
57 *
58 * @return the catalog rate Id
59 * @name Catalog Rate Id
60 * @required
61 * @readOnly
62 */
63 public String getCatalogRateId();
64
65 /**
66 * The ATP for which this Rate is in effect. The ATP should be
67 * constrained by the list of applicable ATP Ids in the Rate
68 * Catalog.
69 *
70 * In the case of a Course Offering, this ATP is the same as (or a
71 * parent of) the Course Offering ATP.
72 *
73 * @return the ATP Id
74 * @name ATP Id
75 */
76 public String getAtpId();
77
78 /**
79 * The amount for a flat or fixed unit rate. This amount should
80 * be constrained by the minimum and maxmimum range in the Rate
81 * Catalog for flat and fixed unit Rates.
82 *
83 * @return the amount
84 * @name Amount
85 */
86 public CurrencyAmount getAmount();
87
88 /**
89 * The list of flexible unit amounts. This list should be
90 * constrained by the list of flexible unit amounts in the Rate
91 * Catalog.
92 *
93 * @return the list of flexible unit amounts
94 * @name Flexible Unit Amounts
95 */
96 public List<? extends FlexibleUnitAmount> getFlexibleUnitAmounts();
97
98 /**
99 * The transaction code. The transaction code can differ from the
100 * default type in the Rate Catalog of
101 * CatlogRate.canOverrideTransactionCode is true.
102 *
103 * @return the transaction code
104 * @name Transaction Code
105 */
106 public String getTransactionCode();
107
108 /**
109 * The transaction date type key. The transaction date type can
110 * differ from the default type in the Rate Catalog of
111 * CatlogRate.canOverrideTransactionDateTypeKey is true.
112 *
113 * @return the transaction date type key
114 * @name Transaction Date Type Key
115 */
116 public String getTransactionDateTypeKey();
117
118 /**
119 * The transaction date used for rate processing.
120 *
121 * @return the transaction date
122 * @name Transaction Date
123 */
124 public Date getTransactionDate();
125
126 /**
127 * The recognition date used for rate processing.
128 *
129 * @return the recognition date
130 * @name Recognition Date
131 */
132 public Date getRecognitionDate();
133
134 /**
135 * Tests if this is a "limit" rate. A limit rate has a minimum and
136 * maximum limit unit range at which the rate is the limitAmount.
137 *
138 * @return true if this is a limit rate, false otherwise
139 * @name Is Limit Rate
140 */
141 public Boolean getIsLimitRate();
142
143 /**
144 * Gets the minimum, or low end of the unit range, for a limit
145 * rate. This field is only applicable if isLimitRate() is true.
146 *
147 * @return the low end of the limit units range
148 * @name Minimum Limit Units
149 */
150 public Integer getMinimumLimitUnits();
151
152 /**
153 * Gets the maximum, or high end of the unit range, for a limit
154 * rate. This field is only applicable if isLimitRate() is true.
155 *
156 * @return the low end of the limit units range
157 * @name Maximum Limit Units
158 */
159 public Integer getMaximumLimitUnits();
160
161 /**
162 * Gets the amount for the limit when the number of units false
163 * in between the minimum and maximum limit range inclusive.
164 *
165 * @return the limit amount
166 * @name Limit Amount
167 */
168 public CurrencyAmount getLimitAmount();
169 }