public class ProductNodeNameValidator extends Object implements ParamValidator
Modifier and Type | Field and Description |
---|---|
static String |
PRODUCT_PROPERTY_KEY
This key should only be specified
if the requested productNodeName have to be unique inside the given product.
|
Constructor and Description |
---|
ProductNodeNameValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
equalValues(Parameter parameter,
Object value1,
Object value2)
Tests if the given two values are equal taking the given parameter information into account.
|
String |
format(Parameter parameter,
Object value)
Converts the given value into a text taking the given parameter information into account.
|
Object |
parse(Parameter parameter,
String text)
Converts the given text into a value taking the given parameter information into account.
|
void |
validate(Parameter parameter,
Object value)
Tests if the given value passes all constraints given in the supplied parameter information.
|
public static final String PRODUCT_PROPERTY_KEY
public boolean equalValues(Parameter parameter, Object value1, Object value2)
ParamValidator
equalValues
in interface ParamValidator
parameter
- the parameter, must not be null
value1
- the first value, can be null
value2
- the second value, can also be null
true
if the value are equal, false
otherwisepublic String format(Parameter parameter, Object value) throws ParamFormatException
ParamValidator
format
in interface ParamValidator
parameter
- the parameter, must not be null
value
- the value to be converted into a text, can be null
null
.ParamFormatException
public Object parse(Parameter parameter, String text) throws ParamParseException
ParamValidator
parse
in interface ParamValidator
parameter
- the parameter, must not be null
text
- the text to be converted into a value, must not be null
ParamParseException
public void validate(Parameter parameter, Object value) throws ParamValidateException
ParamValidator
null
since parameters can be allowed to have the value 'null'.validate
in interface ParamValidator
parameter
- the parameter, must not be null
value
- the value to be tested, can be null
ParamValidateException
Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.