Class ValidateElement.RangeValidateElement
- java.lang.Object
-
- org.jivesoftware.smackx.xdatavalidation.packet.ValidateElement
-
- org.jivesoftware.smackx.xdatavalidation.packet.ValidateElement.RangeValidateElement
-
- All Implemented Interfaces:
Element
,FullyQualifiedElement
,NamedElement
,XmlLangElement
,FormFieldChildElement
- Enclosing class:
- ValidateElement
public static class ValidateElement.RangeValidateElement extends ValidateElement
Indicate that the value should fall within a certain range.- See Also:
ValidateElement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jivesoftware.smackx.xdatavalidation.packet.ValidateElement
ValidateElement.BasicValidateElement, ValidateElement.ListRange, ValidateElement.OpenValidateElement, ValidateElement.RangeValidateElement, ValidateElement.RegexValidateElement
-
-
Field Summary
Fields Modifier and Type Field Description static String
METHOD
-
Fields inherited from class org.jivesoftware.smackx.xdatavalidation.packet.ValidateElement
DATATYPE_XS_STRING, ELEMENT, NAMESPACE, QNAME
-
-
Constructor Summary
Constructors Constructor Description RangeValidateElement(String datatype, String min, String max)
Range validate element constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendXML(XmlStringBuilder buf)
void
checkConsistency(FormField.Builder<?,?> formField)
Check if this element is consistent according to the business rules in XEP-0122.String
getMax()
The 'max' attribute specifies the maximum allowable value.String
getMin()
The 'min' attribute specifies the minimum allowable value.void
validate(FormField formField)
-
Methods inherited from class org.jivesoftware.smackx.xdatavalidation.packet.ValidateElement
checkListRangeConsistency, checkNonMultiConsistency, from, getDatatype, getElementName, getListRange, getNamespace, getQName, mustBeOnlyOfHisKind, setListRange, toXML
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smackx.xdata.FormFieldChildElement
isExclusiveElement, requiresNoTypeSet
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage
-
-
-
-
Field Detail
-
METHOD
public static final String METHOD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RangeValidateElement
public RangeValidateElement(String datatype, String min, String max)
Range validate element constructor.- Parameters:
datatype
- TODO javadoc me pleasemin
- the minimum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.max
- the maximum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.- See Also:
ValidateElement.getDatatype()
-
-
Method Detail
-
appendXML
protected void appendXML(XmlStringBuilder buf)
- Specified by:
appendXML
in classValidateElement
- Parameters:
buf
- TODO javadoc me please
-
getMin
public String getMin()
The 'min' attribute specifies the minimum allowable value.- Returns:
- the minimum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.
-
getMax
public String getMax()
The 'max' attribute specifies the maximum allowable value.- Returns:
- the maximum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.
-
checkConsistency
public void checkConsistency(FormField.Builder<?,?> formField)
Description copied from class:ValidateElement
Check if this element is consistent according to the business rules in XEP-0122.- Specified by:
checkConsistency
in interfaceFormFieldChildElement
- Specified by:
checkConsistency
in classValidateElement
- Parameters:
formField
- the builder used to construct the form field.
-
-