| org.kuali.core.maintenance.rules.MaintenanceDocumentRuleBase org.kuali.module.chart.rules.OrgRule
Field Summary | |
protected static org.apache.log4j.Logger | LOG |
Constructor Summary | |
public | OrgRule() |
LOG | protected static org.apache.log4j.Logger LOG(Code) | | |
OrgRule | public OrgRule()(Code) | | Constructs a OrgRule and pseudo-injects services
|
checkDefaultAccountNumber | protected boolean checkDefaultAccountNumber(MaintenanceDocument document)(Code) | | This checks that defaultAccount is present unless
( (orgType = U or C) and ( document is a "create new" or "edit" ))
Parameters: document - false if missing default account number and it is not an exempt type code |
checkExistenceAndActive | protected boolean checkExistenceAndActive()(Code) | | This checks to see if the org is active
true if the org is inactive or false otherwise |
checkHrmsOrgRules | protected boolean checkHrmsOrgRules(MaintenanceDocument document)(Code) | | This checks to see if the org is active and if it the HRMS org is active
Parameters: document - true if either the org is inactive or isHrmsOrgActivated is false |
checkOrgClosureRules | protected boolean checkOrgClosureRules(MaintenanceDocument document)(Code) | | This method enforces the business rules surrounding when an Org becomes closed/inactive.
If we are editing and switching the org to inactive or if it is a new doc and it is marked as inactive
then we assume we are closing the org. If we are not then we return true. If we are then we
return false if there are still active accounts tied to the org
Parameters: document - false if trying to close org but it still has accounts that are active linked to it |
checkPlantAttributes | protected boolean checkPlantAttributes()(Code) | | This checks to see if a user is authorized for plant fields modification. If not then it returns true (without activating
fields). If the org does not have to report to itself then it checks to see if the
plant fields have been filled out correctly and fails if they haven't
false if user can edit plant fields but they have not been filled out correctly |
checkSimpleRules | protected boolean checkSimpleRules(MaintenanceDocument document)(Code) | | 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
Parameters: document - true if it passes all the rules, false otherwise |
fieldsHaveChanged | protected boolean fieldsHaveChanged(String oldValue, String newValue)(Code) | | This method compares an old and new value, and determines if they've changed. If the old was null/blank, and the new is not,
return true. If the old had a value, and the new is null/blank, return true. If both old and new had a value, and the values
are different (excluding trailing or leading whitespaces, and excluding case changes), return true. If none of the above,
return false.
Parameters: oldValue - - Old value to test. Parameters: newValue - - New value to test. true or false, based on the algorithm described above. |
isHrmsOrgActivated | protected boolean isHrmsOrgActivated()(Code) | | This method looks up in the ParameterService whether ther HRMS Org system is turned on.
true or false depending on the app configuration |
isPlantAuthorized | protected boolean isPlantAuthorized(UniversalUser user)(Code) | | This method tests whether the specified user is part of the group that grants authorization to the Plant fields.
Parameters: user - - the user to test true if user is part of the group, false otherwise |
setupConvenienceObjects | public void setupConvenienceObjects()(Code) | | 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. It also calls the BusinessObjectBase.refresh(), which will attempt to load
all sub-objects from the DB by their primary keys, if available.
Parameters: document - - the maintenanceDocument being evaluated |
Methods inherited from org.kuali.core.maintenance.rules.MaintenanceDocumentRuleBase | protected boolean apcRuleFails(String parameterNamespace, String parameterDetailTypeCode, String parameterName, String valueToTest)(Code)(Java Doc) protected boolean applyApcRule(String parameterNamespace, String parameterDetailTypeCode, String parameterName, String valueToTest)(Code)(Java Doc) protected boolean checkAuthorizationRestrictions(MaintenanceDocument document)(Code)(Java Doc) protected boolean checkEmptyBOField(String propertyName, Object valueToTest, String parameter)(Code)(Java Doc) protected boolean checkEmptyDocumentField(String propertyName, Object valueToTest, String parameter)(Code)(Java Doc) protected boolean checkEmptyValue(Object valueToTest)(Code)(Java Doc) protected boolean checkForPartiallyFilledOutReferenceForeignKeys(String referenceName)(Code)(Java Doc) protected void clearErrorPath()(Code)(Java Doc) protected boolean dataDictionaryValidate(MaintenanceDocument document)(Code)(Java Doc) final protected BusinessObjectDictionaryService getBoDictionaryService()(Code)(Java Doc) final protected BusinessObjectService getBoService()(Code)(Java Doc) final protected KualiConfigurationService getConfigService()(Code)(Java Doc) public DateTimeService getDateTimeService()(Code)(Java Doc) final protected DataDictionaryService getDdService()(Code)(Java Doc) final protected DictionaryValidationService getDictionaryValidationService()(Code)(Java Doc) final protected DocumentAuthorizationService getDocumentAuthorizationService()(Code)(Java Doc) protected String getFieldLabel(String fieldName)(Code)(Java Doc) protected String getFieldLabel(Class boClass, String fieldName)(Code)(Java Doc) final protected MaintenanceDocumentDictionaryService getMaintDocDictionaryService()(Code)(Java Doc) final protected PersistableBusinessObject getNewBo()(Code)(Java Doc) final protected PersistableBusinessObject getOldBo()(Code)(Java Doc) final protected PersistenceService getPersistenceService()(Code)(Java Doc) final protected PersistenceStructureService getPersistenceStructureService()(Code)(Java Doc) public UniversalUserService getUniversalUserService()(Code)(Java Doc) public WorkflowDocumentService getWorkflowDocumentService()(Code)(Java Doc) protected boolean isCorrectMaintenanceClass(MaintenanceDocument document, Class clazz)(Code)(Java Doc) protected boolean isDocumentValidForSave(MaintenanceDocument maintenanceDocument)(Code)(Java Doc) public boolean processAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName, PersistableBusinessObject bo)(Code)(Java Doc) public boolean processApproveDocument(ApproveDocumentEvent approveEvent)(Code)(Java Doc) public boolean processCustomAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName, PersistableBusinessObject line)(Code)(Java Doc) protected boolean processCustomApproveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processCustomSaveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processGlobalApproveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processGlobalRouteDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processGlobalSaveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) public boolean processRouteDocument(Document document)(Code)(Java Doc) public boolean processSaveDocument(Document document)(Code)(Java Doc) protected void putDocumentError(String propertyName, String errorConstant, String parameter)(Code)(Java Doc) protected void putDocumentError(String propertyName, String errorConstant, String[] parameters)(Code)(Java Doc) protected void putFieldError(String propertyName, String errorConstant)(Code)(Java Doc) protected void putFieldError(String propertyName, String errorConstant, String parameter)(Code)(Java Doc) protected void putFieldError(String propertyName, String errorConstant, String[] parameters)(Code)(Java Doc) protected void putFieldErrorWithShortLabel(String propertyName, String errorConstant)(Code)(Java Doc) protected void putGlobalError(String errorConstant)(Code)(Java Doc) protected void putGlobalError(String errorConstant, String parameter)(Code)(Java Doc) protected void putGlobalError(String errorConstant, String[] parameters)(Code)(Java Doc) protected void putGlobalsError(String propertyName, String errorConstant)(Code)(Java Doc) protected void putGlobalsError(String propertyName, String errorConstant, String parameter)(Code)(Java Doc) protected void resumeErrorPath()(Code)(Java Doc) final public void setBoDictionaryService(BusinessObjectDictionaryService boDictionaryService)(Code)(Java Doc) final public void setBoService(BusinessObjectService boService)(Code)(Java Doc) final public void setConfigService(KualiConfigurationService configService)(Code)(Java Doc) final public void setDdService(DataDictionaryService ddService)(Code)(Java Doc) final public void setDictionaryValidationService(DictionaryValidationService dictionaryValidationService)(Code)(Java Doc) final public void setDocumentAuthorizationService(DocumentAuthorizationService documentAuthorizationService)(Code)(Java Doc) final public void setMaintDocDictionaryService(MaintenanceDocumentDictionaryService maintDocDictionaryService)(Code)(Java Doc) protected void setNewBo(PersistableBusinessObject newBo)(Code)(Java Doc) final public void setPersistenceService(PersistenceService persistenceService)(Code)(Java Doc) final public void setPersistenceStructureService(PersistenceStructureService persistenceStructureService)(Code)(Java Doc) public void setUniversalUserService(UniversalUserService universalUserService)(Code)(Java Doc) public void setWorkflowDocumentService(WorkflowDocumentService workflowDocumentService)(Code)(Java Doc) public void setupBaseConvenienceObjects(MaintenanceDocument document)(Code)(Java Doc) public void setupConvenienceObjects()(Code)(Java Doc) protected boolean validateDocumentStructure(Document document)(Code)(Java Doc) protected boolean validateGlobalBusinessObjectPersistable(MaintenanceDocument document)(Code)(Java Doc) protected boolean validateMaintenanceDocument(MaintenanceDocument maintenanceDocument)(Code)(Java Doc)
|
|
|