public abstract class AbstractSystemDataFormatter extends java.lang.Object implements SystemDataFormatter
SystemDataFormatter providing to helper
methods to ensure the presence of a value and the correctness of its type in
the provided map.| Constructor and Description |
|---|
AbstractSystemDataFormatter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureCorrectType(ProcessConstants.AdeptDataType expectedType,
java.lang.String udtName,
java.io.Serializable value)
Throws an
IllegalArgumentException if the given object doesn't the
specified data type and simply returns if it does. |
protected void |
ensureValuePresent(java.lang.String parameterName,
java.util.Map<java.lang.String,? extends java.io.Serializable> parameterValues)
Simply returns if the specified parameter value is present and throws an
IllegalArgumentException if it isn't. |
java.lang.String |
format(java.lang.String parameterisedString,
java.util.Map<java.lang.String,java.io.Serializable> parameterValues)
Formats the given parameterised string according to the needs of the
SystemDataConsumer it is used by. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitformatprotected void ensureValuePresent(java.lang.String parameterName,
java.util.Map<java.lang.String,? extends java.io.Serializable> parameterValues)
IllegalArgumentException if it isn't.parameterName - name of the parameterparameterValues - map containing the parameter valuesjava.lang.IllegalArgumentException - if the value is not present (i.e. the key
is missing in the map; the value may be null though)protected void ensureCorrectType(ProcessConstants.AdeptDataType expectedType, java.lang.String udtName, java.io.Serializable value)
IllegalArgumentException if the given object doesn't the
specified data type and simply returns if it does.expectedType - the expected data typeudtName - The name of the user-defined type if specified and known,
null otherwise.value - the value objectjava.lang.IllegalArgumentException - if the object's type doesn't match the
expected data typepublic java.lang.String format(java.lang.String parameterisedString,
java.util.Map<java.lang.String,java.io.Serializable> parameterValues)
SystemDataFormatterSystemDataConsumer it is used by.format in interface SystemDataFormatterparameterisedString - the parameterised string to be formattedparameterValues - map containing values for all parameters referenced
in the parameterised string