org.kuali.kfs.module.cg.document.validation.impl
Class SubcontractorRule

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


Field Summary
protected  SubContractor newSubcontractor
           
 
Fields inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
boDictionaryService, boService, businessObjectAuthorizationService, configService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, LOG, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceService, persistenceStructureService, personService, priorErrorPath, roleService, workflowDocumentService
 
Constructor Summary
SubcontractorRule()
           
 
Method Summary
protected  boolean validateCountryCode(String countryCode)
          This method retrieves the entered country code and checks that this value is valid by comparing it against known values in the SH_COUNTRY_T database table.
protected  boolean validateMaintenanceDocument(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method has been overridden to add some additional validation checks to the Subcontractor maintenance document.
protected  boolean validateStateCode(String countryCode, String stateCode)
          This method retrieves the entered state code and checks that this value is valid by comparing it against known values in the SH_STATE_T database table.
 
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, processCustomRouteDocumentBusinessRules, 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
 
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

newSubcontractor

protected SubContractor newSubcontractor
Constructor Detail

SubcontractorRule

public SubcontractorRule()
Method Detail

validateMaintenanceDocument

protected boolean validateMaintenanceDocument(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method has been overridden to add some additional validation checks to the Subcontractor maintenance document.

Overrides:
validateMaintenanceDocument in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
Parameters:
maintenanceDocument - - document to be tested
Returns:
whether maintenance doc passes
Throws:
org.kuali.rice.kns.exception.ValidationException

validateStateCode

protected boolean validateStateCode(String countryCode,
                                    String stateCode)
This method retrieves the entered state code and checks that this value is valid by comparing it against known values in the SH_STATE_T database table.

Parameters:
stateCode -
Returns:
Whether state code entered is valid

validateCountryCode

protected boolean validateCountryCode(String countryCode)
This method retrieves the entered country code and checks that this value is valid by comparing it against known values in the SH_COUNTRY_T database table.

Parameters:
countryCode -
Returns:
Whether country code entered is valid.


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