public class AccountingLineValueAllowedValidation extends GenericValidation
Modifier and Type | Field and Description |
---|---|
protected AccountingDocument |
accountingDocumentForValidation |
protected AccountingLine |
accountingLineForValidation |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected String |
parameterToCheckAgainst |
protected String |
propertyPath |
protected String |
responsibleProperty |
Constructor and Description |
---|
AccountingLineValueAllowedValidation() |
Modifier and Type | Method and Description |
---|---|
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.coreservice.framework.parameter.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.krad.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.coreservice.framework.parameter.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.
|
setQuitOnFail, shouldQuitOnFail, stageValidation
getParameterProperties, populateParameterFromEvent, populateParametersFromEvent, setParameterProperties
protected String propertyPath
protected String parameterToCheckAgainst
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected String responsibleProperty
protected AccountingDocument accountingDocumentForValidation
protected AccountingLine accountingLineForValidation
public AccountingLineValueAllowedValidation()
public boolean validate(AttributedDocumentEvent event)
org.kuali.ole.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 linepublic 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 Queueprotected void refreshByQueue(org.kuali.rice.krad.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.coreservice.framework.parameter.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.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.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.