|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object project35.soa.validation.AbstractEditFieldValidationService
public abstract class AbstractEditFieldValidationService
Has routines for validating required fields.
Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.
Field Summary | |
---|---|
protected java.text.Collator |
collator
|
Constructor Summary | |
---|---|
AbstractEditFieldValidationService()
|
Method Summary | |
---|---|
protected java.lang.String |
getFieldName()
returns the name of the field |
Parameter[] |
getInitialisationParameters()
|
void |
initialiseService(java.net.URL resourceDirectory,
Parameter[] initialisationParameters)
|
boolean |
isEmpty(java.lang.String value)
checks to see if value is an empty string |
protected boolean |
isFieldRequired()
returns whether the data field is required return true if field is required; otherwise false |
void |
setFieldName(java.lang.String fieldName)
sets the field name |
void |
setRequiredField(boolean isFieldRequired)
sets whether the field is required or optional. |
abstract java.util.ArrayList |
validate(Project35FormContext project35FormContext,
java.lang.String value)
validates the field value and returns any error messages |
protected java.lang.String |
validateRequiredField(java.lang.String value)
checks to make sure that a required field has a non-empty value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.text.Collator collator
Constructor Detail |
---|
public AbstractEditFieldValidationService()
Method Detail |
---|
protected java.lang.String getFieldName()
public boolean isEmpty(java.lang.String value)
value
- the value
protected boolean isFieldRequired()
public void setFieldName(java.lang.String fieldName)
setFieldName
in interface FieldValidationService
fieldName
- the field namepublic void setRequiredField(boolean isFieldRequired)
setRequiredField
in interface FieldValidationService
isFieldRequired
- true if the field is required; false if field is optional.protected java.lang.String validateRequiredField(java.lang.String value)
value
- the value of the field
public abstract java.util.ArrayList validate(Project35FormContext project35FormContext, java.lang.String value)
EditFieldValidationService
validate
in interface EditFieldValidationService
value
- the value of the field
public Parameter[] getInitialisationParameters()
getInitialisationParameters
in interface ServiceClass
public void initialiseService(java.net.URL resourceDirectory, Parameter[] initialisationParameters) throws java.lang.Exception
initialiseService
in interface ServiceClass
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |