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

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
          extended by org.kuali.kfs.module.endow.document.validation.impl.PooledFundValueRule
All Implemented Interfaces:
org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRule, org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddCollectionLineRule, 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 PooledFundValueRule
extends org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Fields inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
boDictionaryService, boService, businessObjectAuthorizationService, configService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceService, persistenceStructureService, personService, priorErrorPath, roleService, workflowDocumentService
 
Constructor Summary
PooledFundValueRule()
           
 
Method Summary
protected  boolean checkCustomRequiredFields(PooledFundValue newPooledFundValue)
           
protected  boolean isDateRequiredField(Date theDate, String errorField, String errorKey)
           
protected  boolean isIncomeDistributionPerUnitNotNegative(BigDecimal incomeDistributionPerUnit)
          The rule is incomeDistributionPerUnit can't be less than zero.
protected  boolean isUnitValuePositive(BigDecimal unitValue)
          The rule is unitValue can only be positive because unitValue is a required field.
protected  boolean isValuationDateLastDayOfMonth(Date valuationDate)
          Checks if the value of the valuation date is the last day of the month.
protected  boolean isValuationDateTheLatest(String pooledSecurityID, Date theValuationDate)
          The rule is "A new record cannot have a VAL_DT that is earlier than the record with the most recent VAL_DT".
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
           
 
Methods inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
apcRuleFails, applyApcRule, checkEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, dataDictionaryValidate, errorAlreadyExists, getBoDictionaryService, getBoService, getBusinessObjectAuthorizationService, getConfigService, getDateTimeService, getDdService, getDictionaryValidationService, getDocumentHelperService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getMaintDocDictionaryService, getNewBo, getOldBo, getPersistenceService, getPersistenceStructureService, getPersonService, getRoleService, getWorkflowDocumentService, isCorrectMaintenanceClass, isDocumentInactivatingBusinessObject, isDocumentValidForSave, primaryKeyCheck, processAddCollectionLineBusinessRules, processApproveDocument, processCustomAddCollectionLineBusinessRules, processCustomApproveDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processGlobalApproveDocumentBusinessRules, processGlobalRouteDocumentBusinessRules, processGlobalSaveDocumentBusinessRules, processInactivationBlockChecking, processInactivationBlockChecking, processRouteDocument, processSaveDocument, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putFieldErrorWithShortLabel, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, putInactivationBlockingErrorOnPage, resumeErrorPath, setBoDictionaryService, setBoService, setBusinessObjectAuthorizationService, setConfigService, setDdService, setDictionaryValidationService, setDocumentHelperService, setMaintDocDictionaryService, setNewBo, setPersistenceService, setPersistenceStructureService, setPersonService, setupBaseConvenienceObjects, setupConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateDocumentStructure, validateDuplicateIdentifierInDataDictionary, validateGlobalBusinessObjectPersistable, validateMaintenanceDocument
 
Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase
getDataDictionaryService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG
Constructor Detail

PooledFundValueRule

public PooledFundValueRule()
Method Detail

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Overrides:
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
See Also:
MaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

checkCustomRequiredFields

protected boolean checkCustomRequiredFields(PooledFundValue newPooledFundValue)

isDateRequiredField

protected boolean isDateRequiredField(Date theDate,
                                      String errorField,
                                      String errorKey)

isValuationDateLastDayOfMonth

protected boolean isValuationDateLastDayOfMonth(Date valuationDate)
Checks if the value of the valuation date is the last day of the month. If yes, return true; otherwise, return false.

Parameters:
valuationDate -
Returns:
true if valuationDate is the last day of the month, false otherwise

isValuationDateTheLatest

protected boolean isValuationDateTheLatest(String pooledSecurityID,
                                           Date theValuationDate)
The rule is "A new record cannot have a VAL_DT that is earlier than the record with the most recent VAL_DT".

Parameters:
pooledSecurityID -
theValuationDate -
Returns:
true if valuationDate is the latest one for the specified pooledSecurityID, false otherwise.

isUnitValuePositive

protected boolean isUnitValuePositive(BigDecimal unitValue)
The rule is unitValue can only be positive because unitValue is a required field.

Parameters:
unitValue -
Returns:
true if unitValue is a positive value, false otherwise

isIncomeDistributionPerUnitNotNegative

protected boolean isIncomeDistributionPerUnitNotNegative(BigDecimal incomeDistributionPerUnit)
The rule is incomeDistributionPerUnit can't be less than zero. Either zero or positive value is an accepted/valid input because incomeDistributionPerUnit is not a required field.

Parameters:
incomeDistributionPerUnit -
Returns:
true if incomeDistributionPerUnit is zero or bigger than zero, false otherwise


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