|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.kfs.sys.document.validation.ParameterizedValidation
org.kuali.kfs.sys.document.validation.GenericValidation
org.kuali.kfs.sys.document.validation.impl.AccountingLineValueAllowedValidation
public class AccountingLineValueAllowedValidation
A validation which uses parameters to determine if a value on an accounting line is valid.
| Field Summary | |
|---|---|
protected AccountingDocument |
accountingDocumentForValidation
|
protected AccountingLine |
accountingLineForValidation
|
protected org.kuali.rice.kns.service.ParameterService |
parameterService
|
protected String |
parameterToCheckAgainst
|
protected String |
propertyPath
|
protected String |
responsibleProperty
|
| Constructor Summary | |
|---|---|
AccountingLineValueAllowedValidation()
|
|
| Method Summary | |
|---|---|
protected Queue<String> |
convertPathToQueue(String path)
Creates a Queue which represents a FIFO path of what properties to visit, based on the given property path |
AccountingDocument |
getAccountingDocumentForValidation()
Gets the accountingDocumentForValidation attribute. |
AccountingLine |
getAccountingLineForValidation()
Gets the accountingLineForValidation attribute. |
org.kuali.rice.kns.service.ParameterService |
getParameterService()
Gets the parameterService attribute. |
String |
getParameterToCheckAgainst()
Gets the parameterToCheckAgainst attribute. |
String |
getPropertyPath()
Gets the propertyPath attribute. |
String |
getResponsibleProperty()
Gets the responsibleProperty attribute. |
protected boolean |
isAccountingLineValueAllowed(Class documentClass,
AccountingLine accountingLine,
String parameterName,
String propertyName,
String userEnteredPropertyName)
Checks that a value on an accounting line is valid, based on parameters, for a document of the given class |
void |
refreshByPath(AccountingLine line)
Refreshes a value on the accounting line, using the propertyPath to decided what to refresh |
protected void |
refreshByQueue(org.kuali.rice.kns.bo.PersistableBusinessObject bo,
Queue<String> path)
Recursively refreshes a property given by the queue path |
void |
setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
Sets the accountingDocumentForValidation attribute value. |
void |
setAccountingLineForValidation(AccountingLine accountingLineForValidation)
Sets the accountingLineForValidation attribute value. |
void |
setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value. |
void |
setParameterToCheckAgainst(String parameterToCheckAgainst)
Sets the parameterToCheckAgainst attribute value. |
void |
setPropertyPath(String refreshPath)
Sets the propertyPath attribute value. |
void |
setResponsibleProperty(String responsibleProperty)
Sets the responsibleProperty attribute value. |
boolean |
validate(AttributedDocumentEvent event)
Checks if a value in a given accounting line is allowed, based on system parameters. |
| Methods inherited from class org.kuali.kfs.sys.document.validation.GenericValidation |
|---|
setQuitOnFail, shouldQuitOnFail, stageValidation |
| Methods inherited from class org.kuali.kfs.sys.document.validation.ParameterizedValidation |
|---|
getParameterProperties, populateParameterFromEvent, populateParametersFromEvent, setParameterProperties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String propertyPath
protected String parameterToCheckAgainst
protected org.kuali.rice.kns.service.ParameterService parameterService
protected String responsibleProperty
protected AccountingDocument accountingDocumentForValidation
protected AccountingLine accountingLineForValidation
| Constructor Detail |
|---|
public AccountingLineValueAllowedValidation()
| Method Detail |
|---|
public boolean validate(AttributedDocumentEvent event)
org.kuali.kfs.sys.document.validation.GenericValidation#validate(java.lang.Object[])
protected boolean isAccountingLineValueAllowed(Class documentClass,
AccountingLine accountingLine,
String parameterName,
String propertyName,
String userEnteredPropertyName)
documentClass - the class of the document to checkaccountingLine - the accounting line to checkparameterName - the name of the parameter to checkpropertyName - the name of the property to checkuserEnteredPropertyName - the value the user entered on the line
public void refreshByPath(AccountingLine line)
line - the accounting line to refresh a property onprotected Queue<String> convertPathToQueue(String path)
path - the path to convert to a Queue
protected void refreshByQueue(org.kuali.rice.kns.bo.PersistableBusinessObject bo,
Queue<String> path)
bo - the business object to refreshpath - the path, in Queue form, of properties to refreshpublic String getPropertyPath()
public void setPropertyPath(String refreshPath)
propertyPath - The propertyPath to set.public org.kuali.rice.kns.service.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
parameterService - The parameterService to set.public String getParameterToCheckAgainst()
public void setParameterToCheckAgainst(String parameterToCheckAgainst)
parameterToCheckAgainst - The parameterToCheckAgainst to set.public String getResponsibleProperty()
public void setResponsibleProperty(String responsibleProperty)
responsibleProperty - The responsibleProperty to set.public AccountingDocument getAccountingDocumentForValidation()
public void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
accountingDocumentForValidation - The accountingDocumentForValidation to set.public AccountingLine getAccountingLineForValidation()
public void setAccountingLineForValidation(AccountingLine accountingLineForValidation)
accountingLineForValidation - The accountingLineForValidation to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||