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

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.HoldingHistoryValueAdjustmentDocumentRules
All Implemented Interfaces:
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 HoldingHistoryValueAdjustmentDocumentRules
extends org.kuali.rice.kns.rules.TransactionalDocumentRuleBase


Constructor Summary
HoldingHistoryValueAdjustmentDocumentRules()
           
 
Method Summary
protected  BigDecimal calculateUnitValueWhenMarketValueEntered(HoldingHistoryValueAdjustmentDocument document)
          Calculates unit value when security id's valuation method is M and market value is entered.
protected  boolean checkValuationMethodForUnitOrSecurityValue(HoldingHistoryValueAdjustmentDocument document)
          Checks if security valuation method is Unit value and if so make sure nothing entered for Market Value
protected  boolean isMarketValuePositive(HoldingHistoryValueAdjustmentDocument document)
          Checks if the market value entered is positive value
protected  boolean isSecurityActive(HoldingHistoryValueAdjustmentDocument document)
          Checks if the Security is Active.
protected  boolean isSecurityCodeEmpty(HoldingHistoryValueAdjustmentDocument document)
          Validates the Security code to make sure the value is not empty.
protected  boolean isUnitValuePositive(HoldingHistoryValueAdjustmentDocument document)
          Checks if the unit value entered is positive value
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
protected  void resetMarketValueToNullWhenUnitValueEntered(HoldingHistoryValueAdjustmentDocument document)
          Reset the value for Market Value that the user entered if the valuation method is U (Unit Value)
protected  boolean validateSecurityClassCodeTypeNotLiability(HoldingHistoryValueAdjustmentDocument document)
          Validates that the security class code type is not Liability.
protected  boolean validateSecurityCode(HoldingHistoryValueAdjustmentDocument document)
          Validates the Security code by trying to create a Security object from the code.
 
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

HoldingHistoryValueAdjustmentDocumentRules

public HoldingHistoryValueAdjustmentDocumentRules()
Method Detail

processCustomRouteDocumentBusinessRules

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

isSecurityCodeEmpty

protected boolean isSecurityCodeEmpty(HoldingHistoryValueAdjustmentDocument document)
Validates the Security code to make sure the value is not empty.

Parameters:
tranSecurity -
Returns:
true if security code is empty, else false.

validateSecurityCode

protected boolean validateSecurityCode(HoldingHistoryValueAdjustmentDocument document)
Validates the Security code by trying to create a Security object from the code.

Parameters:
document -
Returns:
true if security code is valid one, false otherwise

isSecurityActive

protected boolean isSecurityActive(HoldingHistoryValueAdjustmentDocument document)
Checks if the Security is Active.

Parameters:
document -
Returns:
true if the security is active, else false

validateSecurityClassCodeTypeNotLiability

protected boolean validateSecurityClassCodeTypeNotLiability(HoldingHistoryValueAdjustmentDocument document)
Validates that the security class code type is not Liability.

Parameters:
document -
Returns:
true is valid, false otherwise

isUnitValuePositive

protected boolean isUnitValuePositive(HoldingHistoryValueAdjustmentDocument document)
Checks if the unit value entered is positive value

Parameters:
document -
Returns:
true if positive, else false

isMarketValuePositive

protected boolean isMarketValuePositive(HoldingHistoryValueAdjustmentDocument document)
Checks if the market value entered is positive value

Parameters:
document -
Returns:
true if positive, else false

checkValuationMethodForUnitOrSecurityValue

protected boolean checkValuationMethodForUnitOrSecurityValue(HoldingHistoryValueAdjustmentDocument document)
Checks if security valuation method is Unit value and if so make sure nothing entered for Market Value

Parameters:
document -
Returns:
true if only Unit Value is entered, else false

resetMarketValueToNullWhenUnitValueEntered

protected void resetMarketValueToNullWhenUnitValueEntered(HoldingHistoryValueAdjustmentDocument document)
Reset the value for Market Value that the user entered if the valuation method is U (Unit Value)

Parameters:
document -

calculateUnitValueWhenMarketValueEntered

protected BigDecimal calculateUnitValueWhenMarketValueEntered(HoldingHistoryValueAdjustmentDocument document)
Calculates unit value when security id's valuation method is M and market value is entered.



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