|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectpl.aislib.fm.FieldContainer
pl.aislib.fm.Form
Class of forms. A form is a set of fields together with a set of rules. Form is said to be validated if all fields and rules are appropriately validated.
| Michal Jastak, AIS.PL |
| Tomasz Pik, AIS.PL |
| Wojciech Swiatek, AIS.PL |
| Field Summary | |
static java.lang.String |
MC_ENTITY_RULE
|
protected java.util.Map |
rules
Map of rules. |
protected java.util.Map |
validatedRules
Map of rule names and booleans. |
| Constructor Summary | |
Form(java.lang.String name)
|
|
| Method Summary | |
void |
addRule(Rule rule)
|
protected void |
addSpecificEntityProperties(IEntity entity,
java.lang.String entityName,
java.util.Map entityProperties)
Adds specific entity properties to given map. |
protected boolean |
checkRuleForValidation(Rule rule)
|
protected java.lang.Object |
clone()
|
protected boolean |
doValidate(java.util.Map fieldValues,
java.lang.Object data)
Form validates all non-complex fields first, then all complex fields. |
protected java.util.List |
getDynamicEntityNamesList(java.lang.String entityName)
|
protected java.util.Map |
getEntitiesProperties()
|
protected IEntity |
getEntity(java.lang.String entityName)
|
java.util.Iterator |
getErrorCodes()
This method will not work for dynamic fields. |
java.util.Map |
getErrorMessages(IMessageConverter messageConverter)
|
Rule |
getRule(java.lang.String ruleName)
|
java.util.Iterator |
getRuleNames()
|
java.util.Map |
getValidatedRules()
|
boolean |
isRuleValidated(java.lang.String ruleName)
|
protected boolean |
preValidate(java.util.Map fieldValues,
java.lang.Object data)
Contains all necessary steps taken before the proper validation of fields in the container. |
void |
setConditionalFields()
Automatically generates all conditional fields. |
java.lang.String |
toString()
|
protected boolean |
validateRule(Rule rule,
java.util.Map fieldValues,
java.util.Map values)
|
protected boolean |
validateRules(java.util.Map fieldValues)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String MC_ENTITY_RULE
protected java.util.Map rules
protected java.util.Map validatedRules
| Constructor Detail |
public Form(java.lang.String name)
FieldContainer.FieldContainer(String)| Method Detail |
public void addRule(Rule rule)
rule - Rule object.protected boolean checkRuleForValidation(Rule rule)
rule - Rule object.
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionObject.clone()
protected boolean doValidate(java.util.Map fieldValues,
java.lang.Object data)
doValidate in class FieldContainerfieldValues - map of field values.data - an object specific for validators.
FieldContainer.doValidate(Map, Object)
protected boolean validateRule(Rule rule,
java.util.Map fieldValues,
java.util.Map values)
rule - a Rule objectfieldValues - map of string field values.values - map of values.
protected boolean validateRules(java.util.Map fieldValues)
fieldValues - map of string field values.
public void setConditionalFields()
The algorithm is as follows:
public java.lang.String toString()
public java.util.Iterator getErrorCodes()
getErrorCodes in class FieldContainerFieldContainer.getErrorCodes()public java.util.Iterator getRuleNames()
public Rule getRule(java.lang.String ruleName)
ruleName - name of a rule.
public java.util.Map getValidatedRules()
public boolean isRuleValidated(java.lang.String ruleName)
ruleName - name of a rule.
protected boolean preValidate(java.util.Map fieldValues,
java.lang.Object data)
FieldContainer
preValidate in class FieldContainerfieldValues - map of field values.data - an object specific for validators.
FieldContainer.preValidate(Map, Object)protected IEntity getEntity(java.lang.String entityName)
getEntity in class FieldContainerentityName - name of an entity.
FieldContainer.getEntity(String)protected java.util.List getDynamicEntityNamesList(java.lang.String entityName)
getDynamicEntityNamesList in class FieldContainerentityName - name of a dynamic entity.
FieldContainer.getDynamicEntityNamesList(String)public java.util.Map getErrorMessages(IMessageConverter messageConverter)
getErrorMessages in class FieldContainerFieldContainer.getErrorMessages(IMessageConverter)protected java.util.Map getEntitiesProperties()
getEntitiesProperties in class FieldContainerFieldContainer.getEntitiesProperties()
protected void addSpecificEntityProperties(IEntity entity,
java.lang.String entityName,
java.util.Map entityProperties)
FieldContainer
addSpecificEntityProperties in class FieldContainerentity - IEntity object.entityName - name of entity.entityProperties - not nullable Map of entity properties.FieldContainer.addSpecificEntityProperties(pl.aislib.fm.forms.IEntity, java.lang.String, java.util.Map)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||