public interface ContainerEntryMaker
Classes implementing this interface have the ability to add values to a
PropertyContainer. PropertyContainers contain
objects of various types. ContainerEntryMakers take strings as
arguments for the values to set in the PropertyContainer. The
implication is that the maker will parse the string and convert it into the
appropriate type. A ContainerEntryMaker will also select,
generate be given at an earlier stage, a PropertyTag with the
appropriate generics information to store the generated value in the
container.
ContainerEntryMakers may add zero one or more entries to a
container. How many are added depends on the implementation. If a simple
one-to-one relationship is required between PropertyTag and
parsed value, the implementing class PropertyEntryMaker should be
used. If more complicated mappings are required, it may be better to write a
specific (ie non generalised) implementation for the mapping in question.
It is also possible for a ContainerEntryMaker to throw an AccountingParseException to
abort an entire record parse (for example success/fail field might generate a SkipRecord.
| Modifier and Type | Method and Description |
|---|---|
void |
setValue(PropertyContainer contanier,
java.lang.String valueString)
Parses the specified string and adds the generated value to
container. |
void |
setValue(PropertyMap map,
java.lang.String valueString)
Parses the specified string and adds the generated value to
container. |
void setValue(PropertyContainer contanier, java.lang.String valueString) throws java.lang.IllegalArgumentException, InvalidPropertyException, java.lang.NullPointerException, AccountingParseException
container. The value may be added using one or more
PropertyTags depending on the data stored in
valueString.java.lang.IllegalArgumentException - If valueString is not of a format that allows this
maker to extract data from itInvalidPropertyException - If the container cannot contain PropertyTags used by
this entry maker to store parsed data PropertyTagjava.lang.NullPointerException - If container is null or valueString is
null and this the parser does not support null
stringsAccountingParseExceptioncontanier - The container in which to place data extracted from
valueStringvalueString - The string to parse extract data fromvoid setValue(PropertyMap map, java.lang.String valueString) throws java.lang.IllegalArgumentException, java.lang.NullPointerException, AccountingParseException
container. The value may be added using one or more
PropertyTags depending on the data stored in
valueString. This method differs from
setValue(PropertyContainer, String) in that it can't throw an
InvalidPropertyException (PropertyMaps don't when
properties are set in them, unlike PropertyContainers)java.lang.IllegalArgumentException - If valueString is not of a format that allows this
maker to extract data from itjava.lang.NullPointerException - If container is null or valueString is
null and this the parser does not support null
stringsAccountingParseExceptionmap - The container in which to place data extracted from
valueStringvalueString - The string to parse extract data from