org.kuali.kfs.module.ec.document.validation.impl
Class EffortCertificationDocumentRules

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.ec.document.validation.impl.EffortCertificationDocumentRules
All Implemented Interfaces:
AddDetailLineRule<EffortCertificationDocument,EffortCertificationDetail>, CheckDetailLineAmountRule<EffortCertificationDocument,EffortCertificationDetail>, LoadDetailLineRule<EffortCertificationDocument>, UpdateDetailLineRule<EffortCertificationDocument,EffortCertificationDetail>, 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 EffortCertificationDocumentRules
extends org.kuali.rice.kns.rules.TransactionalDocumentRuleBase
implements AddDetailLineRule<EffortCertificationDocument,EffortCertificationDetail>, UpdateDetailLineRule<EffortCertificationDocument,EffortCertificationDetail>, CheckDetailLineAmountRule<EffortCertificationDocument,EffortCertificationDetail>, LoadDetailLineRule<EffortCertificationDocument>

To define the rules that may be applied to the effort certification document, a transactional document


Field Summary
protected  AccountingLineRuleHelperService accountingLineRuleHelperService
           
protected  org.kuali.rice.kns.service.BusinessObjectService businessObjectService
           
protected  EffortCertificationDocumentService effortCertificationDocumentService
           
protected  EffortCertificationExtractService effortCertificationExtractService
           
protected  EffortCertificationReportDefinitionService effortCertificationReportDefinitionService
           
protected  LaborModuleService laborModuleService
           
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
EffortCertificationDocumentRules()
           
 
Method Summary
protected  boolean bypassBusinessRuleIfInitiation(EffortCertificationDocument effortCertificationDocument)
          determine if the business rule needs to be bypassed.
protected  boolean checkDetailLineAttributes(EffortCertificationDetail detailLine)
          check if the attributes in the detail line are valid for the defintions in data dictionary and have valid references
protected  boolean populateEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument)
          determine if the given document can be populated.
 boolean processAddDetailLineRules(EffortCertificationDocument document, EffortCertificationDetail detailLine)
          validate the given effort certification detail line before it can be added into the given document
 boolean processCheckDetailLineAmountRules(EffortCertificationDocument effortCertificationDocument, EffortCertificationDetail effortCertificationDetail)
          validate the amounts on the given effort certification detail line before it can be processed
 boolean processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.rule.event.ApproveDocumentEvent approveEvent)
           
 boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
 boolean processLoadDetailLineRules(EffortCertificationDocument effortCertificationDocument)
          validate the given effort certification document before a set of detail lines can be added into the given document
 boolean processUpdateDetailLineRules(EffortCertificationDocument document, EffortCertificationDetail detailLine)
          validate the given effort certification detail line before it can be updated
protected  void reportError(String propertyName, String errorKey, String... errorParameters)
           
 
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, 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
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

effortCertificationDocumentService

protected EffortCertificationDocumentService effortCertificationDocumentService

effortCertificationReportDefinitionService

protected EffortCertificationReportDefinitionService effortCertificationReportDefinitionService

effortCertificationExtractService

protected EffortCertificationExtractService effortCertificationExtractService

businessObjectService

protected org.kuali.rice.kns.service.BusinessObjectService businessObjectService

laborModuleService

protected LaborModuleService laborModuleService

accountingLineRuleHelperService

protected AccountingLineRuleHelperService accountingLineRuleHelperService
Constructor Detail

EffortCertificationDocumentRules

public EffortCertificationDocumentRules()
Method Detail

processAddDetailLineRules

public boolean processAddDetailLineRules(EffortCertificationDocument document,
                                         EffortCertificationDetail detailLine)
Description copied from interface: AddDetailLineRule
validate the given effort certification detail line before it can be added into the given document

Specified by:
processAddDetailLineRules in interface AddDetailLineRule<EffortCertificationDocument,EffortCertificationDetail>
Parameters:
document - the given effort certification document
detailLine - the given effort certification detail line
Returns:
true if all rules are valid; otherwise, false;
See Also:
AddDetailLineRule.processAddDetailLineRules(org.kuali.kfs.module.ec.document.EffortCertificationDocument, org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail)

processUpdateDetailLineRules

public boolean processUpdateDetailLineRules(EffortCertificationDocument document,
                                            EffortCertificationDetail detailLine)
Description copied from interface: UpdateDetailLineRule
validate the given effort certification detail line before it can be updated

Specified by:
processUpdateDetailLineRules in interface UpdateDetailLineRule<EffortCertificationDocument,EffortCertificationDetail>
Parameters:
document - the given effort certification document
detailLine - the given effort certification detail line
Returns:
true if all rules are valid; otherwise, false;
See Also:
UpdateDetailLineRule.processUpdateDetailLineRules(org.kuali.kfs.module.ec.document.EffortCertificationDocument, org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail)

processCustomApproveDocumentBusinessRules

public boolean processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.rule.event.ApproveDocumentEvent approveEvent)
Overrides:
processCustomApproveDocumentBusinessRules in class org.kuali.rice.kns.rules.DocumentRuleBase
See Also:
DocumentRuleBase.processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.rule.event.ApproveDocumentEvent)

processCustomRouteDocumentBusinessRules

public 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)

processCheckDetailLineAmountRules

public boolean processCheckDetailLineAmountRules(EffortCertificationDocument effortCertificationDocument,
                                                 EffortCertificationDetail effortCertificationDetail)
Description copied from interface: CheckDetailLineAmountRule
validate the amounts on the given effort certification detail line before it can be processed

Specified by:
processCheckDetailLineAmountRules in interface CheckDetailLineAmountRule<EffortCertificationDocument,EffortCertificationDetail>
Parameters:
effortCertificationDocument - the given effort certification document
effortCertificationDetail - the given effort certification detail line
Returns:
true if all rules are valid; otherwise, false
See Also:
CheckDetailLineAmountRule.processCheckDetailLineAmountRules(org.kuali.kfs.module.ec.document.EffortCertificationDocument, org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail)

processLoadDetailLineRules

public boolean processLoadDetailLineRules(EffortCertificationDocument effortCertificationDocument)
Description copied from interface: LoadDetailLineRule
validate the given effort certification document before a set of detail lines can be added into the given document

Specified by:
processLoadDetailLineRules in interface LoadDetailLineRule<EffortCertificationDocument>
Parameters:
effortCertificationDocument - the given effort certification document
Returns:
true if all rules are valid; otherwise, false;
See Also:
LoadDetailLineRule.processLoadDetailLineRules(org.kuali.kfs.module.ec.document.EffortCertificationDocument)

checkDetailLineAttributes

protected boolean checkDetailLineAttributes(EffortCertificationDetail detailLine)
check if the attributes in the detail line are valid for the defintions in data dictionary and have valid references

Parameters:
detailLine - the given effort certification detail line
Returns:
true if the attributes in the detail line are valid for the defintions in data dictionary and have valid references; otherwise, false

bypassBusinessRuleIfInitiation

protected boolean bypassBusinessRuleIfInitiation(EffortCertificationDocument effortCertificationDocument)
determine if the business rule needs to be bypassed. If the given document is in the state of initiation, bypass

Parameters:
effortCertificationDocument - the given document
Returns:
true if the given document is in the state of initiation; otherwise, false

populateEffortCertificationDocument

protected boolean populateEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument)
determine if the given document can be populated. If so, populate it and return true

Parameters:
effortCertificationDocument - the given document
Returns:
true if the given document can be populated; otherwise, return false and the document is not changed

reportError

protected void reportError(String propertyName,
                           String errorKey,
                           String... errorParameters)


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