public class OrgRule extends org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
Org
Maintenance Document.Modifier and Type | Field and Description |
---|---|
protected boolean |
isHrmsOrgActivated |
protected static org.apache.log4j.Logger |
LOG |
protected Organization |
newOrg |
protected Organization |
oldOrg |
protected static OrganizationService |
orgService |
boDictionaryService, boService, businessObjectAuthorizationService, businessObjectMetaDataService, configService, dataObjectMetaDataService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceStructureService, personService, priorErrorPath, roleService, workflowDocumentService
Constructor and Description |
---|
OrgRule()
Constructs a OrgRule and pseudo-injects services
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkDefaultAccountNumber(org.kuali.rice.kns.document.MaintenanceDocument document)
This checks that defaultAccount is present unless ( (orgType = U or C) and ( document is a "create new" or "edit" ))
|
protected boolean |
checkExistenceAndActive()
This checks to see if the org is active
|
protected boolean |
checkHrmsOrgRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This checks to see if the org is active and if it the HRMS org is active
|
protected boolean |
checkOrgClosureRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This method enforces the business rules surrounding when an Org becomes closed/inactive.
|
protected boolean |
checkPlantAttributes()
This checks to see if a user is authorized for plant fields modification.
|
protected boolean |
checkSimpleRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This checks the following conditions:
begin date must be greater than or equal to end date
start date must be greater than or equal to today if new Document
Reports To Chart/Org should not be same as this Chart/Org
|
protected boolean |
fieldsHaveChanged(String oldValue,
String newValue)
This method compares an old and new value, and determines if they've changed.
|
protected boolean |
getOrgMustReportToSelf(Organization organization)
This checks our
Parameter rules to see if this org needs to report to itself |
protected boolean |
isHrmsOrgActivated()
This method looks up in the ParameterService whether ther HRMS Org system is turned on.
|
protected boolean |
isPlantAuthorized(org.kuali.rice.kim.api.identity.Person user)
This method tests whether the specified user is part of the group that grants authorization to the Plant fields.
|
protected boolean |
processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This performs the following checks on document approve:
checkExistenceAndActive()
checkOrgClosureRules(MaintenanceDocument)
checkSimpleRules(MaintenanceDocument)
checkDefaultAccountNumber(MaintenanceDocument)
This rule fails on rule failure |
protected boolean |
processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This performs the following checks on document route:
checkExistenceAndActive()
checkOrgClosureRules(MaintenanceDocument)
checkSimpleRules(MaintenanceDocument)
checkDefaultAccountNumber(MaintenanceDocument)
This rule fails on rule failure |
protected boolean |
processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This performs the following checks on document save:
checkExistenceAndActive()
checkOrgClosureRules(MaintenanceDocument)
checkSimpleRules(MaintenanceDocument)
checkDefaultAccountNumber(MaintenanceDocument)
This rule does not fail on rule failure |
void |
setupConvenienceObjects()
This method sets the convenience objects like newOrg and oldOrg, so you have short and easy handles to the new and old
objects contained in the maintenance document.
|
checkEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, dataDictionaryValidate, errorAlreadyExists, getBoService, getConfigService, getDataObjectMetaDataService, getDateTimeService, getDdService, getDictionaryValidationService, getDocumentHelperService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getMaintDocDictionaryService, getNewBo, getOldBo, getPersistenceStructureService, getPersonService, getRoleService, getWorkflowDocumentService, isCorrectMaintenanceClass, isDocumentInactivatingBusinessObject, isDocumentValidForSave, primaryKeyCheck, processAddCollectionLineBusinessRules, processApproveDocument, processCustomAddCollectionLineBusinessRules, processGlobalApproveDocumentBusinessRules, processGlobalRouteDocumentBusinessRules, processGlobalSaveDocumentBusinessRules, processInactivationBlockChecking, processInactivationBlockChecking, processRouteDocument, processSaveDocument, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putFieldErrorWithShortLabel, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, putInactivationBlockingErrorOnPage, resumeErrorPath, setBoDictionaryService, setBoService, setBusinessObjectAuthorizationService, setBusinessObjectMetaDataService, setConfigService, setDataObjectMetaDataService, setDdService, setDictionaryValidationService, setDocumentHelperService, setMaintDocDictionaryService, setNewBo, setPersistenceStructureService, setPersonService, setupBaseConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateDocumentStructure, validateDuplicateIdentifierInDataDictionary, validateGlobalBusinessObjectPersistable, validateMaintenanceDocument
buildDocumentTypeActionRequestPermissionDetails, buildDocumentTypePermissionDetails, getDataDictionaryService, getDocumentDictionaryService, getGroupService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPermissionService, hasAdHocRouteCompletion, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteCompletionToInitiator, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCompleteDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomCompleteDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setDocumentDictionaryService, setMaxDictionaryValidationDepth, useKimPermission, validateSensitiveDataValue
protected static org.apache.log4j.Logger LOG
protected static OrganizationService orgService
protected Organization oldOrg
protected Organization newOrg
protected boolean isHrmsOrgActivated
public OrgRule()
protected boolean processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomApproveDocumentBusinessRules
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
MaintenanceDocumentRuleBase.processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)
protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomRouteDocumentBusinessRules
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
MaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)
protected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomSaveDocumentBusinessRules
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
MaintenanceDocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)
protected boolean checkExistenceAndActive()
protected boolean checkPlantAttributes()
protected boolean checkOrgClosureRules(org.kuali.rice.kns.document.MaintenanceDocument document)
document
- protected boolean checkHrmsOrgRules(org.kuali.rice.kns.document.MaintenanceDocument document)
document
- protected boolean getOrgMustReportToSelf(Organization organization)
Parameter
rules to see if this org needs to report to itselforganization
- protected boolean checkSimpleRules(org.kuali.rice.kns.document.MaintenanceDocument document)
document
- protected boolean checkDefaultAccountNumber(org.kuali.rice.kns.document.MaintenanceDocument document)
document
- protected boolean fieldsHaveChanged(String oldValue, String newValue)
oldValue
- - Old value to test.newValue
- - New value to test.protected boolean isHrmsOrgActivated()
public void setupConvenienceObjects()
setupConvenienceObjects
in interface org.kuali.rice.kns.rules.MaintenanceDocumentRule
setupConvenienceObjects
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
document
- - the maintenanceDocument being evaluatedprotected boolean isPlantAuthorized(org.kuali.rice.kim.api.identity.Person user)
user
- - the user to testCopyright © 2004–2015 The Kuali Foundation. All rights reserved.