org.kuali.kfs.module.ar.document.validation.impl
Class InvoiceRecurrenceRule

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.ar.document.validation.impl.InvoiceRecurrenceRule
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 InvoiceRecurrenceRule
extends org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase


Field Summary
protected  org.kuali.rice.kns.service.DateTimeService dateTimeService
           
protected static org.apache.log4j.Logger LOG
           
protected  InvoiceRecurrence newInvoiceRecurrence
           
protected  InvoiceRecurrence oldInvoiceRecurrence
           
 
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
InvoiceRecurrenceRule()
           
 
Method Summary
protected  boolean checkIfInvoiceIsApproved(String recurrenceInvoiceNumber)
          Validate if the invoice has an approved status.
protected  boolean checkIfRecurrenceMaintenanceAlreadyExists(InvoiceRecurrence newInvoiceRecurrence)
          Check if an Invoice Recurrence Maintenance document already exists.
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
           
protected  boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
           
 void setupConvenienceObjects()
           
protected  boolean validateDocumentRecurrenceBeginDate(InvoiceRecurrence newInvoiceRecurrence)
          Validate Begin Date.
 boolean validateDocumentRecurrenceEndDate(Date newInvoiceRecurrenceBeginDate, Date newInvoiceRecurrenceEndDate)
          Validate End Date.
protected  boolean validateEndDateOrTotalNumberofRecurrences(Date recurrenceEndDate, Integer totalRecurrenceNumber)
          Validate that either End Date or Total Number of Recurrences must be entered.
protected  boolean validateIfBothEndDateAndTotalRecurrenceNumberAreEntered(Date recurrenceBeginDate, Date recurrenceEndDate, Integer totalRecurrenceNumber, String recurrenceIntervalCode)
          This method checks that End Date and Total Recurrence Number are valid when both are entered.
protected  boolean validateMaximumNumberOfRecurrences(Integer totalRecurrenceNumber, String recurrenceIntervalCode)
          Total number of recurrences may not be greater than the number defined in system parameter MAXIMUM_RECURRENCES_BY_INTERVAL.
 
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, 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, 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

oldInvoiceRecurrence

protected InvoiceRecurrence oldInvoiceRecurrence

newInvoiceRecurrence

protected InvoiceRecurrence newInvoiceRecurrence

dateTimeService

protected org.kuali.rice.kns.service.DateTimeService dateTimeService
Constructor Detail

InvoiceRecurrenceRule

public InvoiceRecurrenceRule()
Method Detail

setupConvenienceObjects

public void setupConvenienceObjects()
Specified by:
setupConvenienceObjects in interface org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRule
Overrides:
setupConvenienceObjects in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase

processCustomRouteDocumentBusinessRules

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

processCustomSaveDocumentBusinessRules

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

checkIfRecurrenceMaintenanceAlreadyExists

protected boolean checkIfRecurrenceMaintenanceAlreadyExists(InvoiceRecurrence newInvoiceRecurrence)
Check if an Invoice Recurrence Maintenance document already exists.


checkIfInvoiceIsApproved

protected boolean checkIfInvoiceIsApproved(String recurrenceInvoiceNumber)
Validate if the invoice has an approved status.


validateDocumentRecurrenceBeginDate

protected boolean validateDocumentRecurrenceBeginDate(InvoiceRecurrence newInvoiceRecurrence)
Validate Begin Date.


validateDocumentRecurrenceEndDate

public boolean validateDocumentRecurrenceEndDate(Date newInvoiceRecurrenceBeginDate,
                                                 Date newInvoiceRecurrenceEndDate)
Validate End Date.


validateIfBothEndDateAndTotalRecurrenceNumberAreEntered

protected boolean validateIfBothEndDateAndTotalRecurrenceNumberAreEntered(Date recurrenceBeginDate,
                                                                          Date recurrenceEndDate,
                                                                          Integer totalRecurrenceNumber,
                                                                          String recurrenceIntervalCode)
This method checks that End Date and Total Recurrence Number are valid when both are entered.

Parameters:
document - the maintenance document
Returns:

validateEndDateOrTotalNumberofRecurrences

protected boolean validateEndDateOrTotalNumberofRecurrences(Date recurrenceEndDate,
                                                            Integer totalRecurrenceNumber)
Validate that either End Date or Total Number of Recurrences must be entered.


validateMaximumNumberOfRecurrences

protected boolean validateMaximumNumberOfRecurrences(Integer totalRecurrenceNumber,
                                                     String recurrenceIntervalCode)
Total number of recurrences may not be greater than the number defined in system parameter MAXIMUM_RECURRENCES_BY_INTERVAL.



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