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.endow.document.service;
017
018 import java.math.BigDecimal;
019 import java.util.Date;
020
021 import org.kuali.rice.kns.util.KualiInteger;
022
023 /**
024 * This interface provides utility methods for the KEM module like mod10 calculation.
025 */
026 public interface KEMService {
027
028
029 /**
030 * Computes the check digit based on the given prefix.
031 *
032 * @param prefix
033 * @return the string formed by the prefix + check digit
034 */
035 public String mod10(String prefix);
036
037
038 /**
039 * Computes the market value as the Sum of the HLDG _MVAL for all records for the Security in END_CURR_TAX_LOT_BAL_T.
040 *
041 * @param securityId
042 * @return the market value for the given security
043 */
044 public BigDecimal getMarketValue(String securityId);
045
046 /**
047 * Gets the market value as the HLDG _MVAL for the record in END_CURR_TAX_LOT_BAL_T for the given kemid, securityId,
048 * registrationCode, lotNumber, ipIndicator.
049 *
050 * @param kemid
051 * @param securityId
052 * @param registrationCode
053 * @param lotNumber
054 * @param ipIndicator
055 * @return the market value for the given kemid, securityId, registrationCode, lotNumber, ipIndicator.
056 */
057 public BigDecimal getMarketValue(String kemid, String securityId, String registrationCode, KualiInteger lotNumber, String ipIndicator);
058
059 /**
060 * Gets the current system process date.
061 *
062 * @return a String representing the value of the current system process date
063 */
064 public String getCurrentSystemProcessDate();
065
066 public String getCurrentSystemProcessDateFormated() throws Exception;
067
068 public Date getCurrentSystemProcessDateObject();
069
070 /**
071 * Gets the current date based on a system parameter USE_PROCESS_DATE_IND: <br>
072 * 1) If USE_PROCESS_DATE_IND = Y (true), get the value from CURRENT_PROCESS_DATE. <br>
073 * 2) If USE_PROCESS_DATE_IND = N (false), get the current date from the local system using standard Java API.
074 *
075 * @return the current date
076 */
077 public java.sql.Date getCurrentDate();
078
079
080 /**
081 * Gets the current process date from the CURRENT_PROCESS_DATE parameter
082 *
083 * @return current process date
084 */
085 public java.sql.Date getCurrentProcessDate();
086
087 /**
088 * Gets the AVAILABLE_CASH_PERCENT system parameter
089 *
090 * @return AVAILABLE_CASH_PERCENT value
091 */
092 public BigDecimal getAvailableCashPercent();
093
094 /**
095 * Gets the FISCAL_YEAR_END_DAY_AND_MONTH system parameter
096 *
097 * @return FISCAL_YEAR_END_DAY_AND_MONTH value
098 */
099 public Date getFiscalYearEndDayAndMonth();
100
101 /**
102 * Gets the DISTRIBUTION_TIMES_PER_YEAR system parameter
103 *
104 * @return DISTRIBUTION_TIMES_PER_YEAR value
105 */
106 public long getTotalNumberOfPaymentsForFiscalYear();
107
108 /**
109 * Gets the number of days in the calendar year.
110 *
111 * @return the number of days in the calendar year
112 */
113 public int getNumberOfDaysInCalendarYear();
114
115 /**
116 * Gets the first day after the fiscal year End Day and Month system parameter.
117 *
118 */
119 public java.sql.Date getFirstDayAfterFiscalYearEndDayAndMonth();
120
121 /**
122 * Gets MAXIMUM_TRANSACTION_LINES value from the system parameter.
123 *
124 */
125 public int getMaxNumberOfTransactionLinesPerDocument();
126 }