|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.input.SchemEditValidator
public class SchemEditValidator
Validates the metadata fields present in a http request.
The fields to be validated are filtered from the request, and the fields of
like "type" (Attribute, Element, MulitValue) are validated as a set. The
validation methods return ActionErrors
instances that have been populated by the org.dlese.dpc.schemedit.SchemEditErrors
.
Field Summary | |
---|---|
protected DocMap |
docMap
NOT YET DOCUMENTED |
protected MetaDataFramework |
framework
NOT YET DOCUMENTED |
protected InputManager |
im
NOT YET DOCUMENTED |
protected HttpServletRequest |
request
NOT YET DOCUMENTED |
protected SchemaHelper |
schemaHelper
the schemaHelper provided schema info |
protected SchemEditForm |
sef
the ActionForm providing fields to validate |
Constructor Summary | |
---|---|
SchemEditValidator(SchemEditForm sef,
MetaDataFramework framework,
org.apache.struts.action.ActionMapping mapping,
HttpServletRequest request)
Constructor for the SchemEditValidator object |
Method Summary | |
---|---|
protected void |
exposeField(InputField field)
Description of the Method |
SchemEditActionErrors |
getEntityErrors()
Gets the entityErrors attribute of the SchemEditValidator object |
InputManager |
getInputManager()
Gets the inputManager attribute of the SchemEditValidator object |
boolean |
hasEntityErrors()
Predicate to identify if the input contains entities that could not be resolved. |
boolean |
isLastRequiredRepeatingElement(String pathArg)
Guards against deletion of the last required element, causing a new empty element to be automatically inserted after the last one is deleted. |
void |
pruneInstanceDoc()
Rid the instanceDocument of any non-required empty fields |
protected void |
pruneRepeatingFields()
Removes empty elements of repeating fields. |
protected boolean |
skipFieldValidation(InputField inputField)
|
void |
updateMultiValueFields()
Validate the multivalue parameters managed by the input manager. |
protected SchemEditActionErrors |
validateAttributeFields()
Checks all required attribute fields for a value, and all populated attributes for schema-type compliance. |
SchemEditActionErrors |
validateDeletion(String pathArg)
Guard against deletion of last member of a required repeating sequence. |
SchemEditActionErrors |
validateDocument()
Description of the Method |
protected SchemEditActionErrors |
validateElementFields()
Validate the input fields corresponding to elements in the DocMap. |
SchemEditActionErrors |
validateForm()
Validates the metadata fields contained in a request by calling validateMultiValueFields
, then validateAttributeFields , and finally validateElementFields
. |
protected SchemEditActionErrors |
validateMultiValueFields()
Ensures that all fields expecting 1 or more values have at least one value; |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SchemEditForm sef
protected SchemaHelper schemaHelper
protected MetaDataFramework framework
protected HttpServletRequest request
protected InputManager im
protected DocMap docMap
Constructor Detail |
---|
public SchemEditValidator(SchemEditForm sef, MetaDataFramework framework, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
sef
- Description of the Parameterframework
- Description of the Parameterrequest
- Description of the Parametermapping
- NOT YET DOCUMENTEDMethod Detail |
---|
public InputManager getInputManager()
protected boolean skipFieldValidation(InputField inputField)
public SchemEditActionErrors validateForm()
validateMultiValueFields
, then validateAttributeFields
, and finally validateElementFields
.
public boolean hasEntityErrors()
public SchemEditActionErrors getEntityErrors()
public SchemEditActionErrors validateDocument()
protected void pruneRepeatingFields()
DISABLED 5/11/04 - the repository will contain non-valid elements, so we don't worry so much about getting rid of the empty elements (many of which will be invalid due to the "stringTextType" convention) Removes empty child elements from each repeating field in the toPrune list. Children are pruned if they are empty and their occurance attribute allows them to be deleted.
protected SchemEditActionErrors validateElementFields()
protected SchemEditActionErrors validateAttributeFields()
public void updateMultiValueFields()
protected SchemEditActionErrors validateMultiValueFields()
public boolean isLastRequiredRepeatingElement(String pathArg)
pathArg
- NOT YET DOCUMENTED
public SchemEditActionErrors validateDeletion(String pathArg)
pathArg
- Description of the Parameter
protected void exposeField(InputField field)
field
- Description of the Parameterpublic void pruneInstanceDoc()
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |