|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.kpme.core.util.ValidationUtils
public class ValidationUtils
A few methods to assist with various validation tasks.
Constructor Summary | |
---|---|
ValidationUtils()
|
Method Summary | |
---|---|
static boolean |
duplicateDeptEarnCodeExists(EarnCodeSecurity deptEarnCode)
|
static boolean |
earnGroupHasOvertimeEarnCodes(String earnGroup,
org.joda.time.LocalDate asOfDate)
|
static boolean |
isWildCard(String aString)
|
static boolean |
validateAccCategory(String accrualCategory,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateAccCategory(String accrualCategory,
String principalId,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateAccount(String chartOfAccountsCode,
String accountNumber)
validates an open account exists matching the chart of accounts and account number. |
static boolean |
validateAccrualCategory(String accrualCategory)
Most basic validation: Only checks for presence in the database. |
static boolean |
validateAccrualCategory(String accrualCategory,
org.joda.time.LocalDate asOfDate)
Checks for row presence of a Accrual Category, and optionally whether or not it is active as of the specified date. |
static boolean |
validateCalendar(String calendarName)
Checks for row presence of a pay calendar |
static boolean |
validateCalendarByType(String calendarName,
String calendarType)
Checks for row presence of a pay calendar by calendar type |
static boolean |
validateCampus(String campusCode)
|
static boolean |
validateChart(String chart)
Check for row existence of the specified chart and also, if found, that the chart is active. |
static boolean |
validateDepartment(String department)
Most basic validation: Only checks for presence in the database. |
static boolean |
validateDepartment(String department,
org.joda.time.LocalDate asOfDate)
Checks for row presence of a department, and optionally whether or not it is active as of the specified date. |
static boolean |
validateEarnCode(String earnCode,
boolean otEarnCode,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateEarnCode(String earnCode,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateEarnCodeFraction(String earnCode,
BigDecimal amount,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateEarnCodeOfAccrualCategory(String earnCode,
String accrualCategory,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateEarnGroup(String earnGroup,
org.joda.time.LocalDate asOfDate)
No wildcarding is accounted for in this method. |
static boolean |
validateFutureDate(org.joda.time.LocalDate date)
Checks for date in the future |
static boolean |
validateInstitution(String institutionCode,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateLeavePlan(String leavePlan,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateLocation(String location,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateLocationWithSalaryGroup(String salaryGroup,
String location,
org.joda.time.LocalDate asOfDate)
validates location against location of salary group |
static boolean |
validateObjectCode(String financialObjectCode,
String chartOfAccountsCode,
Integer universityFiscalYear)
validates an active object code exists matching the supplied params. |
static boolean |
validateOneYearFutureDate(org.joda.time.LocalDate date)
Checks for date not more than one year in the future or current date |
static boolean |
validateOneYearFutureEffectiveDate(org.joda.time.LocalDate date)
Checks for date not more than one year in the future and does not consider past date |
static boolean |
validateOrganization(String organizationCode,
String chartOfAccountsCode)
validates an active organization matching organizationCode exists, whose chart of accounts code is chartOfAccountsCode |
static boolean |
validatePayGrade(String payGrade,
String salGroup,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validatePayGradeWithSalaryGroup(String salaryGroup,
String payGrade,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validatePayType(String payType,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validatePrincipalId(String principalId)
Checks for row presence of a principal Id, and optionally whether or not it is active as of the specified date. |
static boolean |
validateRecordMethod(String recordMethod,
String accrualCategory,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateSalGroup(String salGroup,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateSubAccount(String subAccountNumber,
String accountNumber,
String chartOfAccountsCode)
validates existence of an active sub account matching the supplied params. |
static boolean |
validateSubObjectCode(String universityFiscalYear,
String chartOfAccountsCode,
String accountNumber,
String financialObjectCode,
String financialSubObjectCode)
validates active sub object code existence matching the supplied params. |
static boolean |
validateTask(Long task,
org.joda.time.LocalDate asOfDate)
No wildcarding is accounted for in this method. |
static boolean |
validateWorkArea(Long workArea)
Most basic validation: Only checks for presence in the database. |
static boolean |
validateWorkArea(Long workArea,
org.joda.time.LocalDate asOfDate)
Checks for row presence of a work area, and optionally whether or not it is active as of the specified date. |
static boolean |
validateWorkArea(Long workArea,
String dept,
org.joda.time.LocalDate asOfDate)
|
static boolean |
validateWorkAreaDeptWildcarding(DepartmentalRule dr)
For DepartmentalRule objects, if a work area is defined, you can not leave the department field with a wildcard. |
static boolean |
wildCardMatch(String string1,
String string2)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationUtils()
Method Detail |
---|
public static boolean validateWorkAreaDeptWildcarding(DepartmentalRule dr)
dr
- The DepartmentalRule to examine.
public static boolean validateWorkArea(Long workArea)
public static boolean validateDepartment(String department)
public static boolean validateAccrualCategory(String accrualCategory)
public static boolean validateSalGroup(String salGroup, org.joda.time.LocalDate asOfDate)
public static boolean validateEarnCode(String earnCode, org.joda.time.LocalDate asOfDate)
public static boolean validateLeavePlan(String leavePlan, org.joda.time.LocalDate asOfDate)
public static boolean validateEarnCodeOfAccrualCategory(String earnCode, String accrualCategory, org.joda.time.LocalDate asOfDate)
public static boolean validateAccCategory(String accrualCategory, org.joda.time.LocalDate asOfDate)
public static boolean validateAccCategory(String accrualCategory, String principalId, org.joda.time.LocalDate asOfDate)
public static boolean validateLocation(String location, org.joda.time.LocalDate asOfDate)
public static boolean validatePayType(String payType, org.joda.time.LocalDate asOfDate)
public static boolean validatePayGrade(String payGrade, String salGroup, org.joda.time.LocalDate asOfDate)
public static boolean validateEarnCode(String earnCode, boolean otEarnCode, org.joda.time.LocalDate asOfDate)
earnCode
- otEarnCode
- If true, earn code is valid ONLY if it is an overtime earn code.asOfDate
-
public static boolean validateDepartment(String department, org.joda.time.LocalDate asOfDate)
public static boolean validateChart(String chart)
chart
-
public static boolean validateWorkArea(Long workArea, org.joda.time.LocalDate asOfDate)
public static boolean validateWorkArea(Long workArea, String dept, org.joda.time.LocalDate asOfDate)
public static boolean validateAccrualCategory(String accrualCategory, org.joda.time.LocalDate asOfDate)
public static boolean validatePrincipalId(String principalId)
public static boolean validateTask(Long task, org.joda.time.LocalDate asOfDate)
task
- Task "Long Name"asOfDate
- Can be null, if we just want to look for the general case.
public static boolean validateEarnGroup(String earnGroup, org.joda.time.LocalDate asOfDate)
earnGroup
- EarnCodeGroupasOfDate
- Can be null, if we just want to look for the general case.
public static boolean earnGroupHasOvertimeEarnCodes(String earnGroup, org.joda.time.LocalDate asOfDate)
earnGroup
- EarnCodeGroupasOfDate
-
public static boolean validateCalendar(String calendarName)
public static boolean duplicateDeptEarnCodeExists(EarnCodeSecurity deptEarnCode)
public static boolean validateOneYearFutureDate(org.joda.time.LocalDate date)
public static boolean validateOneYearFutureEffectiveDate(org.joda.time.LocalDate date)
public static boolean validateFutureDate(org.joda.time.LocalDate date)
public static boolean validateCalendarByType(String calendarName, String calendarType)
public static boolean validateRecordMethod(String recordMethod, String accrualCategory, org.joda.time.LocalDate asOfDate)
public static boolean validateEarnCodeFraction(String earnCode, BigDecimal amount, org.joda.time.LocalDate asOfDate)
public static boolean validatePayGradeWithSalaryGroup(String salaryGroup, String payGrade, org.joda.time.LocalDate asOfDate)
public static boolean validateInstitution(String institutionCode, org.joda.time.LocalDate asOfDate)
public static boolean validateCampus(String campusCode)
public static boolean isWildCard(String aString)
public static boolean wildCardMatch(String string1, String string2)
public static boolean validateAccount(String chartOfAccountsCode, String accountNumber)
chartOfAccountsCode
- accountNumber
-
public static boolean validateSubAccount(String subAccountNumber, String accountNumber, String chartOfAccountsCode)
subAccountNumber
- accountNumber
- chartOfAccountsCode
-
public static boolean validateObjectCode(String financialObjectCode, String chartOfAccountsCode, Integer universityFiscalYear)
public static boolean validateSubObjectCode(String universityFiscalYear, String chartOfAccountsCode, String accountNumber, String financialObjectCode, String financialSubObjectCode)
universityFiscalYear
- chartOfAccountsCode
- accountNumber
- financialObjectCode
- financialSubObjectCode
-
public static boolean validateOrganization(String organizationCode, String chartOfAccountsCode)
organizationCode
- chartOfAccountsCode
-
public static boolean validateLocationWithSalaryGroup(String salaryGroup, String location, org.joda.time.LocalDate asOfDate)
salaryGroup
- location
- asOfDate
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |