org.kuali.kfs.module.ld.document.validation.impl
Class TransactionFieldValidator

java.lang.Object
  extended by org.kuali.kfs.module.ld.document.validation.impl.TransactionFieldValidator

public class TransactionFieldValidator
extends Object

This class provides a set of utilities that can be used to validate a transaction in the field level.


Constructor Summary
TransactionFieldValidator()
           
 
Method Summary
static Message checkAccountNumber(LaborTransaction transaction)
          Checks if the given transaction contains valid account number
static Message checkChartOfAccountsCode(LaborTransaction transaction)
          Checks if the given transaction contains valid char of accounts code
static Message checkEmplid(LaborTransaction transaction)
          Checks if the given transaction contains the valid employee id
static Message checkEncumbranceUpdateCode(LaborTransaction transaction)
          When in Rome...
static Message checkFinancialBalanceTypeCode(LaborTransaction transaction)
          Checks if the given transaction contains valid balance type code
static Message checkFinancialDocumentNumber(LaborTransaction transaction)
          Checks if the given transaction contains document number
static Message checkFinancialDocumentTypeCode(LaborTransaction transaction)
          Checks if the given transaction contains document type code
static Message checkFinancialObjectCode(LaborTransaction transaction)
          Checks if the given transaction contains valid account number
static Message checkFinancialObjectTypeCode(LaborTransaction transaction)
          Checks if the given transaction contains valid object type code
static Message checkFinancialSubObjectCode(LaborTransaction transaction)
          Checks if the given transaction contains valid sub object code
static Message checkFinancialSystemOriginationCode(LaborTransaction transaction)
          Checks if the given transaction contains system origination code
static Message checkPostableBalanceTypeCode(LaborTransaction transaction, List<String> unpostableBalanceTypeCodes)
          Checks if the given transaction contains the posteable balance type code
static Message checkPostablePeridCode(LaborTransaction transaction, List<String> unpostableperidCodes)
          Checks if the given transaction contains the posteable period code
static Message checkSubAccountNumber(LaborTransaction transaction)
          Checks if the given transaction contains valid sub account number
static Message checkSubAccountNumber(LaborTransaction transaction, String exclusiveDocumentTypeCode)
          Checks if the given transaction contains valid sub account number
static Message checkTransactionDebitCreditCode(LaborTransaction transaction)
          Checks if the given transaction contains debit credit code
static Message checkUniversityFiscalPeriodCode(LaborTransaction transaction)
          Checks if the given transaction contains university fiscal period code
static Message checkUniversityFiscalYear(LaborTransaction transaction)
          Checks if the given transaction contains valid university fiscal year
static Message checkZeroTotalAmount(LaborTransaction transaction)
          Checks if the transaction amount of the given transaction is ZERO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionFieldValidator

public TransactionFieldValidator()
Method Detail

checkUniversityFiscalYear

public static Message checkUniversityFiscalYear(LaborTransaction transaction)
Checks if the given transaction contains valid university fiscal year

Parameters:
transaction - the given transaction
Returns:
null if the university fiscal year is valid; otherwise, return error message

checkChartOfAccountsCode

public static Message checkChartOfAccountsCode(LaborTransaction transaction)
Checks if the given transaction contains valid char of accounts code

Parameters:
transaction - the given transaction
Returns:
null if the char of accounts code is valid; otherwise, return error message

checkAccountNumber

public static Message checkAccountNumber(LaborTransaction transaction)
Checks if the given transaction contains valid account number

Parameters:
transaction - the given transaction
Returns:
null if the account number is valid; otherwise, return error message

checkSubAccountNumber

public static Message checkSubAccountNumber(LaborTransaction transaction)
Checks if the given transaction contains valid sub account number

Parameters:
transaction - the given transaction
Returns:
null if the sub account number is valid; otherwise, return error message

checkSubAccountNumber

public static Message checkSubAccountNumber(LaborTransaction transaction,
                                            String exclusiveDocumentTypeCode)
Checks if the given transaction contains valid sub account number

Parameters:
transaction - the given transaction
exclusiveDocumentTypeCode - inactive sub account can be OK if the document type of the given transaction is exclusiveDocumentTypeCode
Returns:
null if the sub account number is valid; otherwise, return error message

checkFinancialObjectCode

public static Message checkFinancialObjectCode(LaborTransaction transaction)
Checks if the given transaction contains valid account number

Parameters:
transaction - the given transaction
Returns:
null if the account number is valid; otherwise, return error message

checkFinancialSubObjectCode

public static Message checkFinancialSubObjectCode(LaborTransaction transaction)
Checks if the given transaction contains valid sub object code

Parameters:
transaction - the given transaction
Returns:
null if the sub object code is valid; otherwise, return error message

checkFinancialBalanceTypeCode

public static Message checkFinancialBalanceTypeCode(LaborTransaction transaction)
Checks if the given transaction contains valid balance type code

Parameters:
transaction - the given transaction
Returns:
null if the balance type code is valid; otherwise, return error message

checkFinancialObjectTypeCode

public static Message checkFinancialObjectTypeCode(LaborTransaction transaction)
Checks if the given transaction contains valid object type code

Parameters:
transaction - the given transaction
Returns:
null if the object type code is valid; otherwise, return error message

checkUniversityFiscalPeriodCode

public static Message checkUniversityFiscalPeriodCode(LaborTransaction transaction)
Checks if the given transaction contains university fiscal period code

Parameters:
transaction - the given transaction
Returns:
null if the university fiscal period code is valid; otherwise, return error message

checkFinancialDocumentTypeCode

public static Message checkFinancialDocumentTypeCode(LaborTransaction transaction)
Checks if the given transaction contains document type code

Parameters:
transaction - the given transaction
Returns:
null if the document type code is valid; otherwise, return error message

checkFinancialDocumentNumber

public static Message checkFinancialDocumentNumber(LaborTransaction transaction)
Checks if the given transaction contains document number

Parameters:
transaction - the given transaction
Returns:
null if the document number is valid; otherwise, return error message

checkTransactionDebitCreditCode

public static Message checkTransactionDebitCreditCode(LaborTransaction transaction)
Checks if the given transaction contains debit credit code

Parameters:
transaction - the given transaction
Returns:
null if the debit credit code is valid; otherwise, return error message

checkFinancialSystemOriginationCode

public static Message checkFinancialSystemOriginationCode(LaborTransaction transaction)
Checks if the given transaction contains system origination code

Parameters:
transaction - the given transaction
Returns:
null if the system origination code is valid; otherwise, return error message

checkPostablePeridCode

public static Message checkPostablePeridCode(LaborTransaction transaction,
                                             List<String> unpostableperidCodes)
Checks if the given transaction contains the posteable period code

Parameters:
transaction - the given transaction
unpostableperidCodes - the list of unpostable period code
Returns:
null if the perid code of the transaction is not in unpostableperidCodes; otherwise, return error message

checkPostableBalanceTypeCode

public static Message checkPostableBalanceTypeCode(LaborTransaction transaction,
                                                   List<String> unpostableBalanceTypeCodes)
Checks if the given transaction contains the posteable balance type code

Parameters:
transaction - the given transaction
unpostableBalanceTypeCodes - the list of unpostable balance type codes
Returns:
null if the balance type code of the transaction is not in unpostableBalanceTypeCodes; otherwise, return error message

checkZeroTotalAmount

public static Message checkZeroTotalAmount(LaborTransaction transaction)
Checks if the transaction amount of the given transaction is ZERO

Parameters:
transaction - the given transaction
Returns:
null if the transaction amount is not ZERO or null; otherwise, return error message

checkEmplid

public static Message checkEmplid(LaborTransaction transaction)
Checks if the given transaction contains the valid employee id

Parameters:
transaction - the given transaction
unpostableObjectCodes - the list of unpostable object codes
Returns:
null if the object code of the transaction is not in unpostableObjectCodes; otherwise, return error message

checkEncumbranceUpdateCode

public static Message checkEncumbranceUpdateCode(LaborTransaction transaction)
When in Rome... This method checks if the encumbrance update code is valid

Parameters:
transaction - the transaction to check
Returns:
a Message if the encumbrance update code is not valid, or null if all is well


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