org.openbp.guiclient.objectvalidators
Class ComplexTypeValidator
java.lang.Object
org.openbp.guiclient.objectvalidators.ValidatorBase
org.openbp.guiclient.objectvalidators.DescriptionObjectValidator
org.openbp.guiclient.objectvalidators.DisplayObjectValidator
org.openbp.guiclient.objectvalidators.ModelObjectValidator
org.openbp.guiclient.objectvalidators.ComplexTypeValidator
- All Implemented Interfaces:
- PropertyValidator, ObjectValidator
public class ComplexTypeValidator
- extends ModelObjectValidator
Object validator for the ComplexTypeItem class.
Generates a bean class name and a xml name from the object name.
- Author:
- Heiko Erhardt
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComplexTypeValidator
public ComplexTypeValidator()
validateObject
public boolean validateObject(java.lang.Object editedObject,
PropertyBrowser pb)
- Validates the entire object before it will be saved.
Ensures uniqueness of the data member names.
- Specified by:
validateObject in interface ObjectValidator- Overrides:
validateObject in class ModelObjectValidator
- Parameters:
editedObject - Edited object that contains the propertypb - Property browser that edits the object
- Returns:
- true The object value is valid and can be saved.
false The object value is invalid. In this case, the save operation should be aborted and
the focus should not be set outside the property browser.
validateProperty
public boolean validateProperty(java.lang.String propertyName,
java.lang.Object propertyValue,
java.lang.Object editedObject,
PropertyEditor propertyEditor,
boolean complete)
- Property validator method.
Generates an XML name for the data type and automatically adds a package name
if a default package is defined for the model the type belongs to.
- Specified by:
validateProperty in interface PropertyValidator- Overrides:
validateProperty in class DisplayObjectValidator
- Parameters:
propertyName - Name of the edited propertypropertyValue - Current value of the propertyeditedObject - Edited object that contains the propertypropertyEditor - Property editor that edits the property valuecomplete - true The value has been completely entered. This is the case if the user wishes to leave the field.
false The value is being typed/edited.
- Returns:
- true The property value is valid.
false The property value is invalid. In this case, the focus should not be set
to the next component.
validateMemberNames
protected boolean validateMemberNames(ComplexTypeItem type)
- Validates the member names of a complex type.
- Parameters:
type - Type to validate
- Returns:
- true Errors have been detected
false No errors found
Copyright © 2011. All Rights Reserved.