org.kuali.kfs.module.endow.document.validation.impl
Class HoldingAdjustmentDocumentRules

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.rules.TransactionalDocumentRuleBase
          extended by org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionalDocumentBaseRule
              extended by org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionLinesDocumentBaseRules
                  extended by org.kuali.kfs.module.endow.document.validation.impl.HoldingAdjustmentDocumentRules
All Implemented Interfaces:
AddTransactionLineRule<EndowmentTransactionLinesDocument,EndowmentTransactionLine>, DeleteTaxLotLineRule<EndowmentTaxLotLinesDocument,EndowmentTransactionTaxLotLine,EndowmentTransactionLine,Number,Number>, DeleteTransactionLineRule<EndowmentTransactionLinesDocument,EndowmentTransactionLine>, RefreshTransactionLineRule<EndowmentTransactionLinesDocument,EndowmentTransactionLine,Number>, org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddNoteRule, org.kuali.rice.kns.rule.ApproveDocumentRule, org.kuali.rice.kns.rule.BusinessRule, org.kuali.rice.kns.rule.RouteDocumentRule, org.kuali.rice.kns.rule.SaveDocumentRule, org.kuali.rice.kns.rule.SendAdHocRequestsRule

public class HoldingAdjustmentDocumentRules
extends EndowmentTransactionLinesDocumentBaseRules
implements DeleteTaxLotLineRule<EndowmentTaxLotLinesDocument,EndowmentTransactionTaxLotLine,EndowmentTransactionLine,Number,Number>


Constructor Summary
HoldingAdjustmentDocumentRules()
           
 
Method Summary
protected  boolean canOnlyAddSourceOrTargetTransactionLines(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument, EndowmentTransactionLine transLine, int index)
          Validates that the user can only enter to or from transaction lines not both.
protected  boolean checkIfBothTransactionAmountAndUnitAdjustmentAmountEmpty(EndowmentTransactionLine line, int index)
          Check if the transaction amount and unit adjustment amount are empty
protected  boolean checkIfBothTransactionAmountAndUnitAdjustmentAmountEntered(EndowmentTransactionLine line, int index)
          Check if the transaction amount and unit adjustment amount are filled in then do not allow the validation to succeed
protected  boolean hasOnlySourceOrTargetTransactionLines(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument)
          Validates that the document has only source or target transaction lines, not both.
 boolean processAddTransactionLineRules(EndowmentTransactionLinesDocument document, EndowmentTransactionLine line)
           
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
 boolean processDeleteTaxLotLineRules(EndowmentTaxLotLinesDocument endowmentTaxLotLinesDocument, EndowmentTransactionTaxLotLine endowmentTransactionTaxLotLine, EndowmentTransactionLine endowmentTransactionLine, Number transLineIndex, Number taxLotLineIndex)
           
protected  boolean validateKemidHasTaxLots(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument, EndowmentTransactionLine transLine, int index)
          Checks that there are holding tax lots with positive units for the given kemid, security, registration code and IP indicator.
protected  boolean validateSecurityClassTypeCode(EndowmentSecurityDetailsDocument document, boolean isSource, String classCodeType)
          This method validates the Security Class Type Code.
protected  boolean validateTransactionLine(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument, EndowmentTransactionLine line, int index)
          This method validates a transaction line.
 
Methods inherited from class org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionLinesDocumentBaseRules
canKEMIDHaveAPrincipalTransaction, checkCashTransactionEndowmentCode, checkWhetherHaveSufficientFundsForCashBasedTransaction, checkWhetherReducePermanentlyRestrictedFund, getErrorPrefix, getRegistrationForValidation, getSecurityForValidation, getSecurityIDForValidation, hasEtranCode, isActiveKemId, isEndowmentTransactionCodeEmpty, isKemIdCodeEmpty, nonCashTransaction, processDeleteTransactionLineRules, processRefreshTransactionLineRules, templateMethod, transactionLineSizeGreaterThanZero, validateChartMatch, validateEndowmentTransactionCode, validateEndowmentTransactionTypeCode, validateKemId, validateNonDuplicateSecurityCodes, validateNoTransactionRestriction, validateRegistration, validateSecurity, validateSecurityEtranChartMatch, validateSourceTargetAmountEqual, validateSourceTargetUnitsEqual, validateSufficientUnits, validateTaxLots, validateTotalUnits, validateTransactionAmountGreaterThanZero, validateTransactionAmountLessThanZero, validateTransactionUnitsAmountEqual, validateTransactionUnitsGreaterThanZero, validateTransactionUnitsLessThanZero
 
Methods inherited from class org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionalDocumentBaseRule
errorAlreadyExists, getEndowmentTransactionSecurity, getEndowmentTransactionSecurityPrefix, isRegistrationCodeActive, isRegistrationCodeEmpty, isSecurityActive, isSecurityCodeEmpty, isSubTypeEmpty, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, validateRegistrationCode, validateSecurityClassCodeTypeNotLiability, validateSecurityCode
 
Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase
getDataDictionaryService, getDictionaryValidationService, getDocumentHelperService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPersonService, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processApproveDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processRouteDocument, processSaveDocument, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HoldingAdjustmentDocumentRules

public HoldingAdjustmentDocumentRules()
Method Detail

processAddTransactionLineRules

public boolean processAddTransactionLineRules(EndowmentTransactionLinesDocument document,
                                              EndowmentTransactionLine line)
Specified by:
processAddTransactionLineRules in interface AddTransactionLineRule<EndowmentTransactionLinesDocument,EndowmentTransactionLine>
Overrides:
processAddTransactionLineRules in class EndowmentTransactionLinesDocumentBaseRules
See Also:
EndowmentTransactionLinesDocumentBaseRules.processAddTransactionLineRules(org.kuali.kfs.module.endow.document.EndowmentTransactionLinesDocument, org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine)

checkIfBothTransactionAmountAndUnitAdjustmentAmountEmpty

protected boolean checkIfBothTransactionAmountAndUnitAdjustmentAmountEmpty(EndowmentTransactionLine line,
                                                                           int index)
Check if the transaction amount and unit adjustment amount are empty

Returns:
true if valid, false otherwise

checkIfBothTransactionAmountAndUnitAdjustmentAmountEntered

protected boolean checkIfBothTransactionAmountAndUnitAdjustmentAmountEntered(EndowmentTransactionLine line,
                                                                             int index)
Check if the transaction amount and unit adjustment amount are filled in then do not allow the validation to succeed

Returns:
true if valid, false otherwise

validateTransactionLine

protected boolean validateTransactionLine(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument,
                                          EndowmentTransactionLine line,
                                          int index)
Description copied from class: EndowmentTransactionLinesDocumentBaseRules
This method validates a transaction line.

Overrides:
validateTransactionLine in class EndowmentTransactionLinesDocumentBaseRules
Returns:
See Also:
EndowmentTransactionLinesDocumentBaseRules.validateTransactionLine(org.kuali.kfs.module.endow.document.EndowmentTransactionLinesDocument, org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine, int)

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
Overrides:
processCustomRouteDocumentBusinessRules in class EndowmentTransactionLinesDocumentBaseRules
See Also:
DocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document)

validateSecurityClassTypeCode

protected boolean validateSecurityClassTypeCode(EndowmentSecurityDetailsDocument document,
                                                boolean isSource,
                                                String classCodeType)
Description copied from class: EndowmentTransactionalDocumentBaseRule
This method validates the Security Class Type Code.

Overrides:
validateSecurityClassTypeCode in class EndowmentTransactionalDocumentBaseRule
Returns:
See Also:
EndowmentTransactionalDocumentBaseRule.validateSecurityClassTypeCode(org.kuali.kfs.module.endow.document.EndowmentSecurityDetailsDocument, boolean, java.lang.String)

hasOnlySourceOrTargetTransactionLines

protected boolean hasOnlySourceOrTargetTransactionLines(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument)
Validates that the document has only source or target transaction lines, not both.

Parameters:
endowmentTransactionLinesDocument -
Returns:
true if valid, false otherwise

canOnlyAddSourceOrTargetTransactionLines

protected boolean canOnlyAddSourceOrTargetTransactionLines(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument,
                                                           EndowmentTransactionLine transLine,
                                                           int index)
Validates that the user can only enter to or from transaction lines not both.

Parameters:
endowmentTransactionLinesDocument -
transLine -
index -
Returns:
true if valid, false otherwise

validateKemidHasTaxLots

protected boolean validateKemidHasTaxLots(EndowmentTransactionLinesDocument endowmentTransactionLinesDocument,
                                          EndowmentTransactionLine transLine,
                                          int index)
Checks that there are holding tax lots with positive units for the given kemid, security, registration code and IP indicator.

Parameters:
endowmentTransactionLinesDocument -
transLine -
index -
Returns:
true if there are tax lots that meet the criteria, false otherwise

processDeleteTaxLotLineRules

public boolean processDeleteTaxLotLineRules(EndowmentTaxLotLinesDocument endowmentTaxLotLinesDocument,
                                            EndowmentTransactionTaxLotLine endowmentTransactionTaxLotLine,
                                            EndowmentTransactionLine endowmentTransactionLine,
                                            Number transLineIndex,
                                            Number taxLotLineIndex)
Specified by:
processDeleteTaxLotLineRules in interface DeleteTaxLotLineRule<EndowmentTaxLotLinesDocument,EndowmentTransactionTaxLotLine,EndowmentTransactionLine,Number,Number>
See Also:
DeleteTaxLotLineRule.processDeleteTaxLotLineRules(org.kuali.kfs.module.endow.document.EndowmentTaxLotLinesDocument, org.kuali.kfs.module.endow.businessobject.EndowmentTransactionTaxLotLine, org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine, java.lang.Number, java.lang.Number)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.