com.uwyn.rife.site
Interface ValidatedConstrained<P extends ConstrainedProperty>

All Superinterfaces:
Validated
All Known Implementing Classes:
CmfValidation, ContentInfo, ContentRepository, DatabaseContentInfo, Email, MetaData, RoleUser, Task, Taskoption, Validation

public interface ValidatedConstrained<P extends ConstrainedProperty>
extends Validated

This interface extends the Validated interface and provides additional methods that are related to beans that are constrained with ConstrainedProperty constraints.

One notable addition is the capability to handle ValidationGroups.

Since:
1.4
Version:
$Revision: 3634 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)
See Also:
Validated, Constrained, ConstrainedProperty, ValidationGroup

Method Summary
 List<PropertyValidationRule> addConstrainedPropertyRules(P constrainedProperty)
          Adds the validation rules that are related to a particular ConstrainedProperty.
 ValidationGroup<P> addGroup(String name)
          Adds a new validation group.
 void focusGroup(String name)
          Focuses on one particular validation group, showing only the ValidationErrors that were generated by its ValidationRules.
 List<PropertyValidationRule> generateConstrainedPropertyRules(P constrainedProperty)
          Generates the validation rules that are related to a particular ConstrainedProperty.
 ValidationGroup<P> getGroup(String name)
          Retrieve a particular validation group.
 Collection<ValidationGroup<P>> getGroups()
          Retrieves all validation groups.
 Collection<String> getLoadingErrors(String propertyName)
          Returns the collection of error messages that occurred during the loading of the content of a certain property.
 void resetGroup(String name)
          Removed all the ValidationErrors of a particular validation group.
 boolean validateGroup(String name)
          Validate the ValidationRules of a particular validation group.
 boolean validateGroup(String name, ValidationContext context)
          Validate the ValidationRules of a particular validation group and also validates the entire bean within the provided ValidationContext
 
Methods inherited from interface com.uwyn.rife.site.Validated
addRule, addValidationError, countValidationErrors, getRules, getValidatedSubjects, getValidationErrors, isSubjectValid, limitSubjectErrors, makeErrorValid, makeSubjectValid, provideValidatedBean, replaceValidationErrors, resetValidation, retrieveValidatedBean, unlimitSubjectErrors, validate, validate
 

Method Detail

addGroup

ValidationGroup<P> addGroup(String name)
Adds a new validation group.

Parameters:
name - the name of the validation group that needs to be created and added
Returns:
the newly created ValidationGroup
Since:
1.4

focusGroup

void focusGroup(String name)
Focuses on one particular validation group, showing only the ValidationErrors that were generated by its ValidationRules.

Parameters:
name - the name of the validation group that will be focused
Since:
1.4

resetGroup

void resetGroup(String name)
Removed all the ValidationErrors of a particular validation group.

Parameters:
name - the name of the validation group that will be focused
Since:
1.4

getGroups

Collection<ValidationGroup<P>> getGroups()
Retrieves all validation groups.

Returns:
the collection of all registered validation groups
Since:
1.4

getGroup

ValidationGroup<P> getGroup(String name)
Retrieve a particular validation group.

Parameters:
name - the name of the validation group that will be retrieved
Returns:
the requested ValidationGroup; or

null if no such validation group exists

Since:
1.4

validateGroup

boolean validateGroup(String name)
Validate the ValidationRules of a particular validation group.

Parameters:
name - the name of the validation group that will be retrieved
Returns:
true if no validation errors were generated; or

false otherwise

Since:
1.4

validateGroup

boolean validateGroup(String name,
                      ValidationContext context)
Validate the ValidationRules of a particular validation group and also validates the entire bean within the provided ValidationContext

Parameters:
name - the name of the validation group
context - the ValidationContext in which this bean instance will be additionally validated
Returns:
true if no validation errors were generated; or

false otherwise

Since:
1.6

addConstrainedPropertyRules

List<PropertyValidationRule> addConstrainedPropertyRules(P constrainedProperty)
Adds the validation rules that are related to a particular ConstrainedProperty.

If the rules of this property name have already been added before through another ConstrainedProperty instance, its existing ValidationRules will be erased and the previous constraints will be merged into the new ConstrainedProperty before adding its validation rules.

Parameters:
constrainedProperty - the ConstrainedProperty that will be inspected
Returns:
the list of generated ValidationRules
Since:
1.4

generateConstrainedPropertyRules

List<PropertyValidationRule> generateConstrainedPropertyRules(P constrainedProperty)
Generates the validation rules that are related to a particular ConstrainedProperty.

Parameters:
constrainedProperty - the ConstrainedProperty that will be inspected
Returns:
the list of generated ValidationRules
Since:
1.4

getLoadingErrors

Collection<String> getLoadingErrors(String propertyName)
Returns the collection of error messages that occurred during the loading of the content of a certain property.

Parameters:
propertyName - the name of the property whose loading errors should be obtained
Returns:
null if no errors occurred during the loading of the content of the provided property or if the property doesn't exist; or

the requested collection of error messages

Since:
1.4


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.