Calculation
Calculation
arrangement
/**
*The Calculation class allows an implementor to attach bespoke calculation
behaviour to events in a Contract's lifecycle
*/
public class Calculation {
    /**
    * This interface enables the implementer to calculate and return a charge
amount.<br>
    * The charge amount will be stored to the CALC.AMOUNT field in
AA.ARR.PAYMENT.SCHEDULE.
    * The interface is invoked from the AA.CALC.CHARGE method when creating or
amending an arrangement or processing a schedule or a simulation from an enquiry.
    * <br><b>T24 Details:</b> The EB.API hook used by this interface is
HOOK.AA.CALCULATE.CHARGE.
    * The T24 field specifying this hook is the CHARGE.ROUTINE field in the
AA.PRD.DES.CHARGE table.<br>
    * If an exception is thrown in the implementing class, the transaction will be
aborted and the exception message will be displayed on the screen.
    * <br>
    * @param chargePropertyId String : The charge property Id. In T24 terms this is
an id to the AA.PROPERTY table.<br>
    * @param chargePropertyRecord
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord : The charge
property record. In T24 terms this is a record from the AA.ARR.CHARGE table.<br>
    * @param baseAmount TNumber : The base amount for the charge calculation.<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : The account
details record. In T24 terms this is a record from the AA.ACCOUNT.DETAILS
table.<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord : The
current arrangement activity record. In T24 terms this is a record from the
AA.ARRANGEMENT.ACTIVITY table.<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : Details of the
current arrangement. In T24 terms this contains values from I_AA.LOCAL.COMMON
insert file.<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : The arrangement
record . In T24 terms this is a record from AA.ARRANGEMENT table.<br>
    * @param productPropertyRecord TStructure : The product property record. In T24
terms this is a record from AA.PRD.DES.CHARGE table.<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : The product
record . In T24 terms this is a record from AA.PRODUCT table.<br>
    * @param record TStructure : The record currently being processed. e.g. An
arrangement activity record. In T24 terms this is the R.NEW common variable.<br>
    * @param masterArrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord : The
master activity record. In T24 terms this is a record from AA.ARRANGEMENT.ACTIVITY
table.<br>
    * @param chargeCalculationContext
com.temenos.t24.api.complex.aa.calculationhook.ChargeCalculationContext : Context
relating to the charge calculation . This currently contains data related to
Enquiry when applicable.<br>
    * @return TNumber : the charge amount.<br>
    */
    public TNumber getChargeAmount(String chargePropertyId,
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord
chargePropertyRecord, TNumber baseAmount,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
TStructure productPropertyRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TStructure record,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterArrangementActivityRecord,
com.temenos.t24.api.complex.aa.calculationhook.ChargeCalculationContext
chargeCalculationContext){}
    /**
    * This interface enables the implementer to get Custom Interest Rate for
requested
    * start and end date of the period for interest property of the arrangement.
    * It returns effective dates on which rate revision has happened till this date
    * and the effective rates as on each of these dates in complex type
InterestCustomRate. <br>
    * This interface is invoked when processing an activity with a interest
property
    * with custom rate set up. <br>
    * <br><b>T24 Details: </b> Interface method for the ROUTINE.NAME field in
    * AA.CUSTOM.RATE.TYPE table and it is invoked from AA.BUILD.INTEREST.INFO
    * and AA.GET.EFFECTIVE.RATE to get custom rate.<br>
    * If an exception is thrown error is raised and transaction will not be
committed.<br>
    * @param arrangementId String : Id of the Arrangement for which details are
sought<br>
    * @param propertyId String : The current property for calculating interest
rate<br>
    * @param effectiveDate TDate : The effective date on which the activity is
run<br>
    * @param currency String : Currency of the arrangement Id<br>
    * @param calcPeriod List<TDate> : Record Start Date, Start Date of the period
and End date of the period for which the rate is requested<br>
    * @param interestRecord
com.temenos.t24.api.records.aaprddesinterest.AaPrdDesInterestRecord : The interest
record for the date<br>
    * @param arrangementRecord String : arrangementRecord<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Current Arrangement Activity Record<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : Published
product record<br>
    * @param record TStructure : R.NEW record<br>
    * @param productPropertyRecord TStructure : Published Product Property
record<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : ArrangmentContext
complex type<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord :
accountDetailRecord<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Master Activity Record<br>
    * @param interestCustomRate
com.temenos.t24.api.complex.aa.calculationhook.InterestCustomRate :
InterestCustomRate complex type returned from getInterestCustomRate interface<br>
    */
    public void getInterestCustomRate(String arrangementId, String propertyId,
TDate effectiveDate, String currency, List<TDate> calcPeriod,
com.temenos.t24.api.records.aaprddesinterest.AaPrdDesInterestRecord interestRecord,
String arrangementRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TStructure record, TStructure productPropertyRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord,
com.temenos.t24.api.complex.aa.calculationhook.InterestCustomRate
interestCustomRate){}
    /**
    * This interface enables the implementer to calculate the charge amount for the
arrangement. <br>
    * This interface is invoked when processing an arrangement which has a charge
property.
    * <br><b>T24 Details: </b>Interface method for the CHARGE.ROUTINE field in the
AA.CHARGE table. It is invoked
    * from AA.CALC.CHARGE and AA.MC.GET.CHARGE.AMOUNT to calculate new charge
amount.<br>
    * If an exception is thrown error is raised and transaction will not be
committed.<br>
    * @param chargePropertyId String : Charge Property Id<br>
    * @param chargePropertyRecord
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord : Charge Property
Record<br>
    * @param baseAmount TNumber : Base Amount for calculate charge<br>
    * @param arrangementId String : Arrangement Id ,eg 'AA16082SXNN3'<br>
    * @param activityId String : Activity Id<br>
    * @param activityEffectiveDate TDate : Activity effective date ,eg
'20170523'<br>
    * @param chargeAmount TNumber : Charge Amount returned from calculation
interface<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : Account
details record<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Current Arrangement Activity Record<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : ArrangmentContext
complex type<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : Arrangement
Record<br>
    * @param productPropertyRecord TStructure : Product Property Record<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : Product
Record<br>
    * @param record TStructure : Record<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Master Activity Record<br>
    */
    public void calculateCharge(String chargePropertyId,
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord
chargePropertyRecord, TNumber baseAmount, String arrangementId, String activityId,
TDate activityEffectiveDate, TNumber chargeAmount,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
TStructure productPropertyRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TStructure record,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord){}
    /**
    * This interface enables the implementer to calculate and return a data element
value.
    * The interface is invoked on processing the acceptance activity for the
EV.EVIDENCE application.
    * The returned data value (e.g. '15') will be used to evaluate the rule defined
in the evidence requirement of the arrangement. E.g., drawdown% should be over 20.
    * <br><b>T24 Details:</b>The EB.API hook used by this interface is
AA.DATA.ELEMENTS.DATA.ROUTINE.HOOK.
    * The T24 field to specify this hook is DATA.ROUTINE field in the
AA.DATA.ELEMENTS table.
    * The interface is invoked from the AA.GET.DATA.ELEMENT.VALUE method.
    * If an exception is thrown in the implementing class, the transaction will be
aborted and the exception message will be displayed on the screen.</br>
    * <br>
    * @param arrangementId String : The Id of the arrangement currently being
processed. In T24 terms, this is a valid Id to the AA.ARRANGEMENT table<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : The arrangement
record being processed. In T24 terms, this is a valid record of the AA.ARRANGEMENT
table<br>
    * @param customerId String : The Primary owner of the arrangement being
processed. In T24 terms, this is a valid Id to the CUSTOMER table<br>
    * @param evidenceId String : The Id of the evidence being processed for
acceptance. In T24 terms, this is a valid Id to the EV.EVIDENCE table<br>
    * @param evidenceRecord com.temenos.t24.api.records.evevidence.EvEvidenceRecord
: Evidence record being processed for acceptance. In T24 terms, this is a valid
record of to the EV.EVIDENCE table<br>
    * @param evidenceConditionRecord TStructure : Evidence Class Condition record
submitted as Evidence, if any. In T24 terms, this is a valid record of the
EV.EVIDENCE.XXX table<br>
    * @param arrangementActivityId String : The Id of the arrangement activity
being processed. In T24 terms, this is a valid Id to the AA.ARRANGEMENT.ACTIVITY
table<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord : The
arrangement activity record being processed. In T24 terms, this is a valid record
of the AA.ARRANGEMENT.ACTIVITY table<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : Details of the
current arrangement. In T24 terms, this contains values from I_AA.LOCAL.COMMON
insert file.<br>
    * @param accountDetailsRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : Account
details record of the arrangement. In T24 terms, this is a valid record of the
AA.ACCOUNT.DETAILS table<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : Product
record of the arrrangement. In T24 terms, this is a valid record of the
AA.PRODUCT.CATALOG table<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Master Activity record through which the transaction is initiated. In T24 terms,
this is a valid record of the AA.ARRANGEMENT.ACTIVITY table<br>
    * @param dataElementContext
com.temenos.t24.api.complex.aa.calculationhook.DataElementContext : The data
required to evaluate the value of the data element<br>
    * @return String : the calculated data element value to be applied for the rule
evaluation.<br>
    */
    public String getDataElementValue(String arrangementId,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
String customerId, String evidenceId,
com.temenos.t24.api.records.evevidence.EvEvidenceRecord evidenceRecord, TStructure
evidenceConditionRecord, String arrangementActivityId,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailsRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord,
com.temenos.t24.api.complex.aa.calculationhook.DataElementContext
dataElementContext){}
    /**
    * This interface enables the implementer to calculate the charge override
amount for the arrangement. <br>
    * This interface is invoked when processing an arrangement which has charge
property.
    * <br><b>T24 Details: </b>Interface method for the CHARGE.OVERRIDE.ROUTINE
field in the AA.CHARGE table
    * and it is invoked from AA.CACL.CHARGE to calculate new charge amount after
adjustment.<br>
    * If an exception is thrown error is raised and transaction will not be
committed.<br>
    * @param arrangementId String : Arrangement Id, eg 'AA16082SXNN3'<br>
    * @param arrangementCcy String : Arrangement Curreny, eg 'USD'<br>
    * @param adjustEffectiveDate TDate : Adjustment effective Date,eg
'20170523'<br>
    * @param adjustChargeProperty String : Adjustment Charge property<br>
    * @param chargeType String : Charge type<br>
    * @param chargePropertyRecord
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord : Adjustment Charge
Record<br>
    * @param adjustBaseAmount TNumber : AdjustBase Amount<br>
    * @param adjustPeriodStartDate String : Adjust Period Start date, eg
'20180217'<br>
    * @param adjustPeriodEndDate String : Adjust Period End date, eg '20180314'<br>
    * @param sourceActivity String : Source Activity<br>
    * @param chargeAmount String : Charge Amount<br>
    * @param activityId String : Activity Id<br>
    * @param adjustChargeAmount TNumber : Adjust Charge Amount<br>
    * @param newChargeAmount TNumber : New Charge Amount<br>
    * @param adjustReason TString : Adjust reason<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : Account
details record<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Current Arrangement Activity Record<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : ArrangmentContext
complex type<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : Arrangement
Record<br>
    * @param productPropertyRecord TStructure : Product Property Record<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : Product
Record<br>
    * @param record TStructure : Record<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Master Activity Record<br>
    */
    public void calculateAdjustedCharge(String arrangementId, String
arrangementCcy, TDate adjustEffectiveDate, String adjustChargeProperty, String
chargeType, com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord
chargePropertyRecord, TNumber adjustBaseAmount, String adjustPeriodStartDate,
String adjustPeriodEndDate, String sourceActivity, String chargeAmount, String
activityId, TNumber adjustChargeAmount, TNumber newChargeAmount, TString
adjustReason, com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
TStructure productPropertyRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TStructure record,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord){}
    /**
    * This interface enables the implementer to calculate and return charge
adjustment for the arrangement.<br>
    * The new charge amount will be stored to the TOT.DEF.AMOUNT field in
AA.ARR.CHARGE.OVERRIDE.<br>
    * The interface is invoked from the AA.CALC.CHARGE method when creating or
amending an arrangement which has a charge override property while processing a
schedule or a simulation from an enquiry.
    * <br><b>T24 Details:</b> The EB.API hook used by this interface is
HOOK.AA.CHARGE.OVERRIDE
    * The T24 field specifying this hook is the CHARGE.OVERRIDE.ROUTINE field in
the AA.PRD.DES.CHARGE table.<br>
    * If an exception is thrown in the implementing class, the transaction will be
aborted and the exception message will be displayed on the screen.
    * <br>
    * @param effectiveDate TDate : The effective date of the adjustment ,eg
'20170523'.<br>
    * @param adjustChargePropertyId String : The adjustment charge property Id. In
T24 terms this is an id to the AA.PROPERTY table.<br>
    * @param chargeType String : The charge type. This can be either 'CREDIT' or
'DEBIT'.<br>
    * @param chargeRecord
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord : The adjustment
charge record. In T24 terms this is a record from the AA.ARR.CHARGE table.<br>
    * @param baseAmount TNumber : The adjustment base amount for the charge
calculation.<br>
    * @param periodStartDate TDate : The adjustment period start date, eg
'20180217'.<br>
    * @param periodEndDate TDate : The adjustment period end date, eg
'20180314'.<br>
    * @param sourceActivityId String : The source activity Id .In T24 terms this is
an id to the AA.ARRANGEMENT.ACTIVITY table.<br>
    * @param chargeAmount String : The initial charge amount.<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : The account
details record.In T24 terms this is a record from the AA.ACCOUNT.DETAILS table.<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord : The
current arrangement activity record .In T24 terms this is a record from the
AA.ARRANGEMENT.ACTIVITY table.<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : Details of the
current arrangement. In T24 terms this contains values from I_AA.LOCAL.COMMON
insert file.<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : The arrangement
Record .In T24 terms this is a record from the AA.ARRANGEMENT table.<br>
    * @param productPropertyRecord TStructure : The product property record. In T24
terms this is a record from AA.PRD.DES.CHARGE table.<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : The product
Record . In T24 terms this is a record from AA.PRODUCT table.<br>
    * @param record TStructure : The record currently being processed. e.g. An
arrangement activity record. In T24 terms this is the R.NEW common variable.<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord : The
master Activity Record. In T24 terms this is a record from AA.ARRANGEMENT.ACTIVITY
table.<br>
    * @param chargeCalculationContext
com.temenos.t24.api.complex.aa.calculationhook.ChargeCalculationContext : Context
relating to the charge calculation . This currently contains data related to
Enquiry when applicable.<br>
    * @return com.temenos.t24.api.complex.aa.calculationhook.ChargeAdjustment : the
ChargeAdjustment.<br>
    */
    public com.temenos.t24.api.complex.aa.calculationhook.ChargeAdjustment
getAdjustedChargeAmount(TDate effectiveDate, String adjustChargePropertyId, String
chargeType, com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord
chargeRecord, TNumber baseAmount, TDate periodStartDate, TDate periodEndDate,
String sourceActivityId, String chargeAmount,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
TStructure productPropertyRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TStructure record,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord,
com.temenos.t24.api.complex.aa.calculationhook.ChargeCalculationContext
chargeCalculationContext){}
    /**
    * This interface enables the implementer to get the settlement date of an
accounting entry for the deposit funding so that payments during 'grace' period
could be managed.
    * <br><b>T24 Details: </b> Interface method for the VD.CALC.AP field in
    * AA.PAYMENT.RULE.TYPE table and it is invoked from AA.PAYMENT.RULES to get
settlement date and decide whether repayment is required or not.<br>
    * If an exception is thrown error is raised and transaction will not be
committed.
    * <br>
    * @param arrangementId String : The Id of the arrangement currently being
processed. In T24 terms, this is a valid Id to the AA.ARRANGEMENT table<br>
    * @param billReference String : The bill reference being processed for payment.
In T24 terms, this is a valid Id to the AA.BILL.DETAILS table<br>
    * @param billDetailsRecord
com.temenos.t24.api.records.aabilldetails.AaBillDetailsRecord : The bill details of
the bill reference being processed for payment. In T24 terms, this is a record to
the AA.BILL.DETAILS table<br>
    * @param settlementContext
com.temenos.t24.api.complex.aa.calculationhook.SettlementContext : The data
required to evaluate the settlement<br>
    * @param settlementDate TDate : The settled date of the bill reference being
processed for payment<br>
    * @param isRepaymentNotRequired TBoolean : This indicates whether the repayment
of the bill is required or not. If the flag is set to true then bill repayment will
not happen<br>
    */
    public void setSettlementDate(String arrangementId, String billReference,
com.temenos.t24.api.records.aabilldetails.AaBillDetailsRecord billDetailsRecord,
com.temenos.t24.api.complex.aa.calculationhook.SettlementContext settlementContext,
TDate settlementDate, TBoolean isRepaymentNotRequired){}
    /**
    * This interface enables the implementer to calculate how much should be
settled to the UNC balance
    * of the arrangement. <br>
    * This interface is invoked when processing an activity with a property that
has a repayment.
    * <br><b>T24 Details: </b>Interface method for the CALC.ROUTINE field in the
AA.PAYMENT.RULE.TYPE table and
    * It is invoked from AA.ALLOCATE.PAYMENT.AMOUNT to calculate the new settlement
amount.<br>
    * If an exception is thrown error is raised and transaction will not be
committed.
    * <br>
    * @param totalAdvanceBalance TNumber : Total amount which can be allocated to
UNC balance from the total repaid amount<br>
    * @param currentAdvanceBalance TNumber : Current balance in UNC balance
type<br>
    * @param arrangementId String : ArrangementId, eg 'AA16082SXNN3'<br>
    * @param accountId TNumber : Account Id of the arrangement, eg '70876'<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : Product
Record of the arrangement<br>
    * @param activityEffectiveDate TDate : Activity Effective Date ,eg
'20170523'<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : Account
details record<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Current Arrangement Activity Record<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : ArrangmentContext
complex type<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : Arrangement
Record<br>
    * @param productPropertyRecord TStructure : Product Property Record<br>
    * @param record TStructure : Record<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Master Activity Record<br>
    * @return TNumber : returns the settlement amount<br>
    */
    public TNumber calculateUncSettledAmount(TNumber totalAdvanceBalance, TNumber
currentAdvanceBalance, String arrangementId, TNumber accountId,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TDate activityEffectiveDate,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
TStructure productPropertyRecord, TStructure record,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord){}
    /**
    * This interface enables the implementer to return the adjust dates, penalty
rates, adjust rates and adjust amounts to calcluate the breakcostfee. <br>
    * This interface is invoked from the AA.CALCULATE.ADJUSTED.CHARGE.AMOUNT
subroutine in T24 during partial withdrawl or redeem activity. <br>
    * <br><b>T24 Details: </b>The EB.API hook used by this interface is
AA.CHARGE.ADJUST.RATE.HOOK. </br>
    * The T24 field specifying this hook is the ADJUST.RATE in the
AA.PRD.DES.CHARGE table. <br>
    * If an exception is thrown in the implementing class an error is raised and
the transaction will not be committed. <br>
    * <br>
    * @param arrangement com.temenos.t24.api.complex.aa.calculationhook.Arrangement
: The arrangement Id and effective date.<br>
    * @param property com.temenos.t24.api.complex.aa.calculationhook.Property : The
charge and interest details.<br>
    * @param chargePropertyRecord
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord : The current
AA.PRD.DES.CHARGE record. In T24 term this is the valid record to the
AA.PRD.CAT.CHARGE table..<br>
    * @param interest com.temenos.t24.api.complex.aa.calculationhook.Interest : The
required interest data from interest property record.<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : The current
AA.ACCOUNT.DETAILS record. In T24 term this is the valid record to the
AA.ACCOUNT.DETAILS table.<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord : The
current AA.ARRANGEMENT.ACTIVITY record. In T24 term this is the valid record to the
AA.ARRANGEMENT.ACTIVITY table.<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : The current
AA.ARRANGEMENT record. In T24 term this is the valid record to the AA.ARRANGEMENT
table.<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord : The
master AA.ARRANGEMENT.ACTIVITY record. In T24 term this is the valid record to the
AA.ARRANGEMENT.ACTIVITY table.<br>
    * @param breakCostFeeContext
com.temenos.t24.api.complex.aa.calculationhook.BreakCostFeeContext : Breakcostfee
context variables.<br>
    * @return com.temenos.t24.api.complex.aa.calculationhook.AdjustedInterest : The
new interest rates with respective dates to calculate the breakcostfee. <br>
    */
    public com.temenos.t24.api.complex.aa.calculationhook.AdjustedInterest
getBreakCostFeeInterestRates(com.temenos.t24.api.complex.aa.calculationhook.Arrange
ment arrangement, com.temenos.t24.api.complex.aa.calculationhook.Property property,
com.temenos.t24.api.records.aaprddescharge.AaPrdDesChargeRecord
chargePropertyRecord, com.temenos.t24.api.complex.aa.calculationhook.Interest
interest, com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord,
com.temenos.t24.api.complex.aa.calculationhook.BreakCostFeeContext
breakCostFeeContext){}
    /**
    * This interface enables the implementer to calculate Source Balance Amount.
    * It returns source balance based for the property of the arrangement. <br>
    * This interface is invoked when processing an activity with a property
    * that has a source balance.<br>
    * <br><b>T24 Details: </b> Interface method for the CALC.ROUTINE field in
    * AA.SOURCE.CALC.TYPE table and it is invoked from AA.GET.BASE.BALANCE to
    * calculate the balance amount.<br>
    * If an exception is thrown error is raised and transaction will not be
committed.<br>
    * @param arrangementId String : ArrangementId, eg 'AA16082SXNN3'<br>
    * @param propertyId String : Property of an arrangement, eg 'NEWARRFEE'<br>
    * @param currency String : Currency of the arrangement, eg 'USD'<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : Arrangement
Record<br>
    * @param activityId String : Current Activity<br>
    * @param activityEffectiveDate TDate : Activity Effective Date, eg
'20170523'<br>
    * @param sourceBalance TNumber : Source Balance Amount<br>
    * @param startDate TDate : Required Start Date<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : Account
details record<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Current Arrangement Activity Record<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : ArrangmentContext
complex type<br>
    * @param productPropertyRecord TStructure : Product Property Record<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : Product
Record<br>
    * @param record TStructure : Record<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Master Activity Record<br>
    */
    public void calculateSourceBalance(String arrangementId, String propertyId,
String currency, com.temenos.t24.api.records.aaarrangement.AaArrangementRecord
arrangementRecord, String activityId, TDate activityEffectiveDate, TNumber
sourceBalance, TDate startDate,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
TStructure productPropertyRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TStructure record,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord){}
    /**
    * This interface enables the implementer to sort arrangements based on drawings
arrangement details.<br>
    * @param MasterArrId String : Master Arrangement Id<br>
    * @param LinkedArrIds TNumber : Drawings arrangement Id<br>
    * @param SortedArrIds TString : Sorted Arrangement Id<br>
    */
    public void SortDrawingsArrangements(String MasterArrId, TNumber LinkedArrIds,
TString SortedArrIds){}
      /**
      * This interface enables the implementer to calculate payment Amount based on
the
    * payment property of the arrangement. <br>
    * This interface is invoked when processing an activity with a property that
has a payment amount.
    * <br><b>T24 Details: </b>Interface method for the CALC.ROUTINE field in the
AA.PAYMENT.TYPE table.
    * it is invoked from
AA.PAYMENT.SCHEDULE.USER.CALCULATION,AA.BUILD.PAYMENT.SCHEDULE.SCHEDULES
    * to calculate user defined component and from AA.CALC.INTEREST to return the
fixed interest amount.<br>
    * If an exception is thrown error is raised and transaction will not be
committed.
    * <br>
    * @param arrangementId String : ArrangementId, eg 'AA16082SXNN3'<br>
    * @param paymentPropertyId String : Payment Property Id of the Arrangement<br>
    * @param paymentScheduleRecord
com.temenos.t24.api.records.aaprddespaymentschedule.AaPrdDesPaymentScheduleRecord :
Payment Schedule Record of the arrangement ,<br>
    * @param paymentDate TDate : Payment Date, eg '20170523'<br>
    * @param activityId String : Current Activity<br>
    * @param activityEffectiveDate TDate : Activity Effective Date, eg
'20170523'<br>
    * @param applicationId String : T24 application<br>
    * @param enquirySelectionId String : Selection Id<br>
    * @param accountDetailRecord
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord : Account
details record<br>
    * @param arrangementActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Current Arrangement Activity Record<br>
    * @param arrangementContext
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext : ArrangmentContext
complex type<br>
    * @param arrangementRecord
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord : Arrangement
Record<br>
    * @param productPropertyRecord TStructure : Product Property Record<br>
    * @param productRecord
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord : Product
Record<br>
    * @param record TStructure : Record<br>
    * @param masterActivityRecord
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord :
Master Activity Record<br>
    * @return TNumber : returns the payment amount<br>
    */
    public TNumber calculatePayment(String arrangementId, String paymentPropertyId,
com.temenos.t24.api.records.aaprddespaymentschedule.AaPrdDesPaymentScheduleRecord
paymentScheduleRecord, TDate paymentDate, String activityId, TDate
activityEffectiveDate, String applicationId, String enquirySelectionId,
com.temenos.t24.api.records.aaaccountdetails.AaAccountDetailsRecord
accountDetailRecord,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
arrangementActivityRecord,
com.temenos.t24.api.complex.aa.activityhook.ArrangementContext arrangementContext,
com.temenos.t24.api.records.aaarrangement.AaArrangementRecord arrangementRecord,
TStructure productPropertyRecord,
com.temenos.t24.api.records.aaproductcatalog.AaProductCatalogRecord productRecord,
TStructure record,
com.temenos.t24.api.records.aaarrangementactivity.AaArrangementActivityRecord
masterActivityRecord){}