|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.module.ec.document.validation.impl.EffortCertificationDocumentRuleUtil
public class EffortCertificationDocumentRuleUtil
Provides a set of facilities to determine whether the given Effort Certification Documents or Effort Certification Detail meet the specified requirements.
Constructor Summary | |
---|---|
EffortCertificationDocumentRuleUtil()
|
Method Summary | |
---|---|
static void |
applyDefaultValues(EffortCertificationDetail detailLine)
reset the attribute with the blank value to the default values |
static boolean |
canExpiredAccountBeUsed(EffortCertificationDetail detailLine)
determine whether the expired account in the detail line can be used. |
static boolean |
hasA21SubAccount(EffortCertificationDetail detailLine)
determine if the sub account associated with the given detail line is a valid A21 sub account |
static boolean |
hasClosedAccount(EffortCertificationDetail detailLine)
determine if the given detail line is associated with a closed account |
static boolean |
hasContractGrantAccount(EffortCertificationDetail detailLine)
determine if the given detail line is associated with a contract grant account |
static boolean |
hasCostShareSubAccount(EffortCertificationDetail detailLine,
List<String> designatedCostShareSubAccountTypeCodes)
determine if the given detail line is associated with a sub account whose type code is in the given list |
static boolean |
hasDetailLine(EffortCertificationDocument document)
determine if there is a line associated with the given document |
static boolean |
hasNonnegativePayrollAmount(EffortCertificationDetail detailLine)
determine if the payroll amount of the given detail line is not negative |
static boolean |
hasSameExistingLine(EffortCertificationDocument document,
EffortCertificationDetail detailLine,
List<String> comparableFields)
determine if there is a line in the given document that has the same values for the comparable fields as the given detail line |
static boolean |
hasValidEffortPercent(EffortCertificationDetail detailLine)
determine if the given detail line has a valid effort percentage. |
static boolean |
hasValidFormat(EffortCertificationDetail detailLine)
determine if the fields in the detail line are in the correct formats defined in the data dictionary |
static boolean |
isEffortPercentChangedFromPersisted(EffortCertificationDetail detailLine)
determine if there is a change on the payroll amount of the given detail line comparing to its persisted payroll amount |
static boolean |
isEffortPercentChangedFromPersisted(EffortCertificationDocument document)
determine if there is a change on the payroll amount of the given document |
static boolean |
isOriginalEffortPercentSameAsCurrentEffortPercent(Integer originalEffortPercent,
Integer effortPercent)
determine if original effort percent is same as the current effort percent for the given detail line |
static boolean |
isPayrollAmountChangedFromOriginal(EffortCertificationDetail detailLine)
determine if there is a change on the payroll amount of the given detail line comparing to its original payroll amount |
static boolean |
isPayrollAmountChangedFromOriginal(EffortCertificationDocument document)
determine if there is a change on the payroll amount of the given document |
static boolean |
isPayrollAmountChangedFromPersisted(EffortCertificationDetail detailLine)
determine if there is a change on the payroll amount of the given detail line comparing to its persisted payroll amount |
static boolean |
isPayrollAmountChangedFromPersisted(EffortCertificationDocument document)
determine if there is a change on the payroll amount of the given document |
static boolean |
isPayrollAmountNonnegative(org.kuali.rice.kns.util.KualiDecimal payrollAmount)
determine if the given payroll amount is greater than and equal to 0 |
static boolean |
isPayrollAmountOverChanged(EffortCertificationDetail detailLine,
org.kuali.rice.kns.util.KualiDecimal originalTotalAmount,
double limitOfLinePayrollAmountChange)
determine if the change on the payroll amount of the given detail line exceeds the specified limit |
static boolean |
isPayrollAmountOverChanged(EffortCertificationDocument document,
double limitOfLinePayrollAmountChange)
determine if there is a change on the payroll amount of a detail line that exceeds the specified limit |
static boolean |
isTotalEffortPercentageAs100(EffortCertificationDocument document)
detrmine if the total effort percent of the given document is 100 |
static boolean |
isTotalPayrollAmountOverChanged(EffortCertificationDocument document,
double limitOfTotalPayrollAmountChange)
determine if the change on the total payroll amount exceeds the specified limit |
static boolean |
isValidPercent(Integer percent)
determine if the given percent is between 0 and 100. |
static void |
updateSourceAccountInformation(EffortCertificationDetail detailLine)
update the information of the source attributes for the given detail line |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EffortCertificationDocumentRuleUtil()
Method Detail |
---|
public static void applyDefaultValues(EffortCertificationDetail detailLine)
detailLine
- the given detail linepublic static boolean canExpiredAccountBeUsed(EffortCertificationDetail detailLine)
detailLine
- the given detail line
public static boolean hasA21SubAccount(EffortCertificationDetail detailLine)
detailLine
- the given detail line
public static boolean hasClosedAccount(EffortCertificationDetail detailLine)
detailLine
- the given detail line
public static boolean hasContractGrantAccount(EffortCertificationDetail detailLine)
detailLine
- the given detail line
public static boolean hasCostShareSubAccount(EffortCertificationDetail detailLine, List<String> designatedCostShareSubAccountTypeCodes)
detailLine
- the given detail linedesignatedCostShareSubAccountTypeCode
- the designated cost share sub account type codes
public static boolean hasNonnegativePayrollAmount(EffortCertificationDetail detailLine)
detailLine
- the given detail line
public static boolean hasSameExistingLine(EffortCertificationDocument document, EffortCertificationDetail detailLine, List<String> comparableFields)
document
- the given effort certification documentdetailLine
- the given detail linecomparableFields
- the comparable fields
public static boolean hasValidEffortPercent(EffortCertificationDetail detailLine)
detailLine
- the given detail line
public static boolean hasValidFormat(EffortCertificationDetail detailLine)
detailLine
- the given detail line
public static boolean isPayrollAmountChangedFromOriginal(EffortCertificationDetail detailLine)
detailLine
- the given effort certification detail line
public static boolean isPayrollAmountChangedFromOriginal(EffortCertificationDocument document)
document
- the given effort certification document
public static boolean isPayrollAmountChangedFromPersisted(EffortCertificationDetail detailLine)
detailLine
- the given effort certification detail line
public static boolean isPayrollAmountChangedFromPersisted(EffortCertificationDocument document)
document
- the given effort certification document
public static boolean isEffortPercentChangedFromPersisted(EffortCertificationDetail detailLine)
detailLine
- the given effort certification detail line
public static boolean isEffortPercentChangedFromPersisted(EffortCertificationDocument document)
document
- the given effort certification document
public static boolean isPayrollAmountNonnegative(org.kuali.rice.kns.util.KualiDecimal payrollAmount)
payrollAmount
- the given payroll amount
public static boolean isOriginalEffortPercentSameAsCurrentEffortPercent(Integer originalEffortPercent, Integer effortPercent)
detailLine
- the given effort certification detail line
public static boolean isPayrollAmountOverChanged(EffortCertificationDetail detailLine, org.kuali.rice.kns.util.KualiDecimal originalTotalAmount, double limitOfLinePayrollAmountChange)
detailLine
- the given effort certification detail linelimitOfLinePayrollAmountChange
- the specified upper bound limit
public static boolean isPayrollAmountOverChanged(EffortCertificationDocument document, double limitOfLinePayrollAmountChange)
document
- the given effort certification documentlimitOfLinePayrollAmountChange
- the specified upper bound limit
public static boolean isTotalEffortPercentageAs100(EffortCertificationDocument document)
document
- the given effort certification document
public static boolean isTotalPayrollAmountOverChanged(EffortCertificationDocument document, double limitOfTotalPayrollAmountChange)
document
- the given effort certification documentlimitOfTotalPayrollAmountChange
- the specified upper bound limit
public static boolean isValidPercent(Integer percent)
percent
- the given percent
public static void updateSourceAccountInformation(EffortCertificationDetail detailLine)
detailLine
- the given detail linepublic static boolean hasDetailLine(EffortCertificationDocument document)
document
- the given effort certification document
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |