View • Attachments (0) • Info
| Version | Date | User | Description |
|---|---|---|---|
| 1.0 | 04/24/2009 | |
Initial Spec |
| 1.1 | 04/27/2009 | |
Second Draft of Spec |
| 1.2 | 04/29/2009 | |
Third Draft of Spec |
| 2.0 | 05/06/2009 | |
Spec with Development Steps Taken |
| 2.1 | 05/11/2009 | |
Spec with Development Steps Taken + Code Examples |
A system parameter needs to be added so that users can restrict the use of specific object sub-types (i.e. codes) from being used with specific sub-fund groups on accounting documents. This involves modifying delivered/core code related to accounting validation and document data dictionary files.
public class AccountingLineObjectSubTypeSubFundValidation extends AccountingLineValueAllowedValidation { . . // variable declarations . /** * @see org.kuali.kfs.sys.document.validation.Validation#validate(org.kuali.kfs.sys.document.validation.event.AttributedDocumentEvent) */ public boolean validate(AttributedDocumentEvent event) { LOG.debug("validate start"); boolean valid = true; ErrorMap errors = GlobalVariables.getErrorMap(); valid = validateObjectCode(accountingDocumentForValidation, accountingLineForValidation); return valid; } /** * Checks object codes restrictions, including restrictions in parameters table. * * @param FinancialDocument submitted accounting document * @param accountingLine accounting line in accounting document * @return true if object code is allowed, given the account's sub fund */ public boolean validateObjectCode(AccountingDocument financialDocument, AccountingLine accountingLine) { LOG.debug("beginning object code validation "); boolean objectCodeAllowed = true; objectCodeAllowed = objectCodeAllowed && parameterService.getParameterEvaluator(KfsParameterConstants.FINANCIAL_SYSTEM_DOCUMENT.class, AZKFSConstants.VALID_OBJECT_SUB_TYPES_BY_SUB_FUND_GROUP_PARM, AZKFSConstants.INVALID_OBJECT_SUB_TYPES_BY_SUB_FUND_GROUP_PARM, accountingLine.getAccount().getSubFundGroupCode(), accountingLine.getObjectCode().getFinancialObjectSubTypeCode()).evaluateAndAddError(SourceAccountingLine.class, "objectCode.financialObjectSubTypeCode", KFSPropertyConstants.FINANCIAL_OBJECT_CODE); return objectCodeAllowed; } . . // getter and setter methods . }
<bean id="AccountingDocument-defaultAccountingLineValuesAllowedValidation" class="edu.arizona.kfs.sys.document.validation.impl.AccountingLineValuesAllowedValidationHutch" abstract="true"> <property name="objectCodeAllowedValidation" ref="AccountingDocument-IsObjectCodeAllowed-DefaultValidation" /> <property name="objectTypeAllowedValidation" ref="AccountingDocument-IsObjectTypeAllowed-DefaultValidation" /> <property name="fundGroupAllowedValidation" ref="AccountingDocument-IsFundGroupAllowed-DefaultValidation" /> <property name="subFundGroupAllowedValidation" ref="AccountingDocument-IsSubFundGroupAllowed-DefaultValidation" /> <property name="objectSubTypeAllowedValidation" ref="AccountingDocument-IsObjectSubTypeAllowed-DefaultValidation" /> <property name="objectLevelAllowedValidation" ref="AccountingDocument-IsObjectLevelAllowed-DefaultValidation" /> <property name="objectConsolidationAllowedValidation" ref="AccountingDocument-IsObjectConsolidationAllowed-DefaultValidation" /> <!-- KITT-296 --> <property name="subTypeSubFundGroupValidation" ref="AccountingDocument-ObjectSubTypeNotAllowedValidation" /> </bean> <!-- KITT-296 --> <bean id="AccountingDocument-ObjectSubTypeNotAllowedValidation" scope="prototype" parent="AccountingDocument-ObjectSubTypeNotAllowedValidation-parentBean" /> <bean id="AccountingDocument-ObjectSubTypeNotAllowedValidation-parentBean" class="edu.arizona.kfs.sys.document.validation.impl.AccountingLineObjectSubTypeSubFundValidation" abstract="true"> <property name="parameterService" ref="parameterService" /> </bean>
|
Browse Space |
Explore Confluence |
Your Account |
Add Content |