|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DictionaryValidationService
Defines the API for the validating against the data dictionary.
Method Summary | |
---|---|
boolean |
isBusinessObjectValid(BusinessObject businessObject)
Encapsulates {@link #validateBusinessObject(BusinessObject) and returns boolean so one doesn't need to
check the
ErrorMap.Validates the business object primitive attributes against the data dictionary. |
boolean |
isBusinessObjectValid(BusinessObject businessObject,
String prefix)
Encapsulates {@link #validateBusinessObject(BusinessObject) and returns boolean so one doesn't need to
check the
ErrorMap.Validates the business object primitive attributes against the data dictionary. |
DictionaryValidationResult |
validate(AttributeValueReader valueReader,
boolean doOptionalProcessing)
Same as other validate method except, allows you to provide the attributeValueReader directly for evaluation |
DictionaryValidationResult |
validate(Object object)
Validates an object using its class name as the entry name to look up its metadata in the dictionary. |
DictionaryValidationResult |
validate(Object object,
boolean doOptionalProcessing)
Validates an object using its class name as the entry name to look up its metadata in the dictionary. |
DictionaryValidationResult |
validate(Object object,
String entryName)
Validates an object using the passed entry name to look up metadata in the dictionary |
DictionaryValidationResult |
validate(Object object,
String entryName,
boolean doOptionalProcessing)
Same as validate(java.lang.Object, java.lang.String) except that it provides a boolean parameter for
the
calling method to choose whether to do optional processing (generally to check if blank/empty values are
required
or not). |
DictionaryValidationResult |
validate(Object object,
String entryName,
DataDictionaryEntry entry,
boolean doOptionalProcessing)
Same as {@link DictionaryValidationService#validate(Object, String, boolean) except that it provides an explicit data dictionary entry to use for the purpose of validation. |
DictionaryValidationResult |
validate(Object object,
String entryName,
String attributeName)
Validates a single attribute on the passed object using the passed entry name to look up metadata in the dictionary. |
DictionaryValidationResult |
validate(Object object,
String entryName,
String attributeName,
boolean doOptionalProcessing)
Same as validate(Object, String, String) except that it provides a boolean parameter for the
calling method to choose whether to do optional processing (generally to check if blank/empty values are
required
or not). |
void |
validate(String entryName,
String attributeName,
Object attributeValue)
Instead of validating an object with dictionary metadata, or validating a specific member of an object by name, validates a specific attribute of an object by passing in the attribute value itself. |
void |
validate(String entryName,
String attributeName,
Object attributeValue,
boolean doOptionalProcessing)
Same as validate(String, String, Object) except that it provides a boolean parameter for the
calling method to choose whether to do optional processing (generally to check if blank/empty values are
required
or not). |
void |
validateBusinessObject(BusinessObject businessObject)
Deprecated. since 1.1 - use validate(Object.class) instead |
void |
validateBusinessObject(BusinessObject businessObject,
boolean validateRequired)
Deprecated. since 1.1 - use validate(Object.class) instead |
boolean |
validateDefaultExistenceChecks(BusinessObject bo)
This method does an existence check against all references of a BusinessObject as defined in the MaintenanceDocument.xml file for that business object. |
boolean |
validateDefaultExistenceChecksForNewCollectionItem(BusinessObject bo,
BusinessObject newCollectionItem,
String collectionName)
Does an existence check against all references configured as a default existence check in the maintenance document data dictionary file for the given business object Appropriate errors will also be placed in the GlobalVariables.ErrorMap. |
boolean |
validateDefaultExistenceChecksForNewCollectionItem(TransactionalDocument document,
BusinessObject accountingLine,
String collectionName)
This method does an existence check against all references of a transactionalDocument Appropriate errors will also be placed in the GlobalVariables.ErrorMap. |
boolean |
validateDefaultExistenceChecksForTransDoc(TransactionalDocument document)
This method does an existence check against all references of a transactionalDocument Appropriate errors will also be placed in the GlobalVariables.ErrorMap. |
void |
validateDocument(Document document)
Validates the contents of a document (i.e. |
void |
validateDocumentAndUpdatableReferencesRecursively(Document document,
int maxDepth,
boolean validateRequired)
Validates the contents of a document and recursively validates any of its updatable references |
void |
validateDocumentAndUpdatableReferencesRecursively(Document document,
int maxDepth,
boolean validateRequired,
boolean chompLastLetterSFromCollectionName)
Validates the contents of a document and recursively validates any of its updatable references |
void |
validateDocumentAttribute(Document document,
String attributeName,
String errorPrefix)
Validates the specified attribute of the given document against the data dictionary. |
void |
validatePrimitiveFromDescriptor(String entryName,
Object object,
PropertyDescriptor propertyDescriptor,
String errorPrefix,
boolean validateRequired)
Deprecated. since 1.1 |
boolean |
validateReferenceExists(BusinessObject bo,
ReferenceDefinition reference)
This method examines the populated BusinessObject bo instance passed in for a member named by the referenceName. |
boolean |
validateReferenceExists(BusinessObject bo,
String referenceName)
This method examines the populated BusinessObject bo instance passed in for a member named by the referenceName. |
boolean |
validateReferenceExistsAndIsActive(BusinessObject bo,
ReferenceDefinition reference)
This method intelligently tests the designated reference on the bo for both existence and active status, where appropriate. |
boolean |
validateReferenceExistsAndIsActive(BusinessObject bo,
String referenceName,
String attributeToHighlightOnFail,
String displayFieldName)
This method intelligently tests the designated reference on the bo for both existence and active status, where appropriate. |
boolean |
validateReferenceIsActive(BusinessObject bo,
ReferenceDefinition reference)
This method retrieves the reference from the DB, and then tests whether the object is active. |
boolean |
validateReferenceIsActive(BusinessObject bo,
String referenceName)
This method retrieves the reference from the DB, and then tests whether the object is active. |
Method Detail |
---|
void validateDocument(Document document)
document
- - document to validatevoid validateDocumentAndUpdatableReferencesRecursively(Document document, int maxDepth, boolean validateRequired)
document
- the documentmaxDepth
- the maximum numbers of levels to recursevalidateRequired
- whether to validate whether a field is required and is currently blankvoid validateDocumentAndUpdatableReferencesRecursively(Document document, int maxDepth, boolean validateRequired, boolean chompLastLetterSFromCollectionName)
document
- the documentmaxDepth
- the maximum numbers of levels to recursevalidateRequired
- whether to validate whether a field is required and is currently blankchompLastLetterSFromCollectionName
- if true, the error path for any collections encountered will have the
last "s" removed from the collection name if it ends
with the letter "s". If false, this method acts like validateDocumentAndUpdatableReferencesRecursively(Document,
int, boolean)
void validateDocumentAttribute(Document document, String attributeName, String errorPrefix)
document
- attributeName
- errorPrefix
- DictionaryValidationResult validate(Object object)
object
- - an object to validate
DictionaryValidationResult validate(Object object, boolean doOptionalProcessing)
object
- - an object to validatedoOptionalProcessing
- true if the validation should do optional validation (e.g. to check if empty values
are required or not), false otherwise
DictionaryValidationResult validate(Object object, String entryName)
object
- - an object to validateentryName
- - the dictionary entry name to look up the metadata associated with this object
DictionaryValidationResult validate(Object object, String entryName, boolean doOptionalProcessing)
validate(java.lang.Object, java.lang.String)
except that it provides a boolean parameter for
the
calling method to choose whether to do optional processing (generally to check if blank/empty values are
required
or not).
object
- - an object to validateentryName
- - the dictionary entry name to look up the metadata associated with this objectdoOptionalProcessing
- true if the validation should do optional validation (e.g. to check if empty values
are required or not), false otherwise
DictionaryValidationResult validate(Object object, String entryName, String attributeName)
object
- - an object to validateentryName
- - the dictionary entry name to look up the metadata associated with this objectattributeName
- - the name of the attribute (field) on the object that should be validated
DictionaryValidationResult validate(Object object, String entryName, String attributeName, boolean doOptionalProcessing)
validate(Object, String, String)
except that it provides a boolean parameter for the
calling method to choose whether to do optional processing (generally to check if blank/empty values are
required
or not).
object
- - an object to validateentryName
- - the dictionary entry name to look up the metadata associated with this objectattributeName
- - the name of the attribute (field) on the object that should be validateddoOptionalProcessing
- true if the validation should do optional validation (e.g. to check if empty values
are required or not), false otherwise
DictionaryValidationResult validate(Object object, String entryName, DataDictionaryEntry entry, boolean doOptionalProcessing)
object
- - an object to validateentryName
- - the dictionary entry name to use in association with error look upsentry
- - the dictionary entry to use for validationdoOptionalProcessing
- true if the validation should do optional validation (e.g. to check if empty values
are required or not), false otherwise
void validate(String entryName, String attributeName, Object attributeValue)
entryName
- - the dictionary entry name to use in association with error look upsattributeName
- - the dictionary entry attribute name to use in association with error look upsattributeValue
- - the value of the attribute being validatedvoid validate(String entryName, String attributeName, Object attributeValue, boolean doOptionalProcessing)
validate(String, String, Object)
except that it provides a boolean parameter for the
calling method to choose whether to do optional processing (generally to check if blank/empty values are
required
or not).
entryName
- - the dictionary entry name to use in association with error look upsattributeName
- - the dictionary entry attribute name to use in association with error look upsattributeValue
- - the value of the attribute being validateddoOptionalProcessing
- - true if the validation should do optional validation (e.g. to check if empty
values
are required or not), false otherwiseDictionaryValidationResult validate(AttributeValueReader valueReader, boolean doOptionalProcessing)
valueReader
- - an object to validatedoOptionalProcessing
- true if the validation should do optional validation (e.g. to check if empty values
are required or not), false otherwise
boolean isBusinessObjectValid(BusinessObject businessObject)
{@link #validateBusinessObject(BusinessObject) and returns boolean so one doesn't need to
check the
ErrorMap.Validates the business object primitive attributes against the data dictionary. Adds errors to the map
as they are
encountered.
Makes no error path adjustments
- Parameters:
businessObject
- - business object to validate
- Returns:
- boolean validOrNot
boolean isBusinessObjectValid(BusinessObject businessObject, String prefix)
{@link #validateBusinessObject(BusinessObject) and returns boolean so one doesn't need to
check the
ErrorMap.Validates the business object primitive attributes against the data dictionary. Adds errors to the map
as they are
encountered.
Makes no error path adjustments
- Parameters:
businessObject
- - business object to validateprefix
- - error prefix
- Returns:
- boolean valid or not
@Deprecated void validateBusinessObject(BusinessObject businessObject)
businessObject
- - business object to validate@Deprecated void validateBusinessObject(BusinessObject businessObject, boolean validateRequired)
businessObject
- - business object to validatevalidateRequired
- - whether to execute required field checksboolean validateReferenceExists(BusinessObject bo, ReferenceDefinition reference)
bo
- - The bo whose reference is being tested.reference
- - The ReferenceDefinition to be existence tested.
boolean validateReferenceExists(BusinessObject bo, String referenceName)
bo
- - The bo whose reference is being tested.referenceName
- - The name of the member to be existence tested.
boolean validateReferenceIsActive(BusinessObject bo, ReferenceDefinition reference)
bo
- reference
-
boolean validateReferenceIsActive(BusinessObject bo, String referenceName)
bo
- referenceName
-
boolean validateReferenceExistsAndIsActive(BusinessObject bo, ReferenceDefinition reference)
bo
- - the BusinessObject instance to be tested.reference
- - the ReferenceDefinition to control the nature of the testing.
boolean validateReferenceExistsAndIsActive(BusinessObject bo, String referenceName, String attributeToHighlightOnFail, String displayFieldName)
bo
- - the BusinessObject instance to be tested.referenceName
- - the member name on the bo to be tested for existence and active-stateattributeToHighlightOnFail
- - the fieldName to highlight with the error message on a failuredisplayFieldName
- - the human-readable display name of the failed field, to go in the error message
boolean validateDefaultExistenceChecks(BusinessObject bo)
bo
- - BusinessObject instance that should be tested
boolean validateDefaultExistenceChecksForNewCollectionItem(BusinessObject bo, BusinessObject newCollectionItem, String collectionName)
bo
- parent business object instance to retrieve default checks fornewCollectionItem
- new collection line to validatecollectionName
- name of the collection in the parent
boolean validateDefaultExistenceChecksForTransDoc(TransactionalDocument document)
document
- document instance that should be tested
boolean validateDefaultExistenceChecksForNewCollectionItem(TransactionalDocument document, BusinessObject accountingLine, String collectionName)
document
- document instance that should be testedaccountingLine
- that should be testedcollectionName
- that should be tested
@Deprecated void validatePrimitiveFromDescriptor(String entryName, Object object, PropertyDescriptor propertyDescriptor, String errorPrefix, boolean validateRequired)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |