Class PropertyListParameterDecoder

  • All Implemented Interfaces:
    org.smooks.api.delivery.ContentHandler

    public class PropertyListParameterDecoder
    extends ParameterDecoder<String>
    ParameterDecoder used to convert a parameter String value to a list of Properties.

    This decoder is pre-installed.

    Example Usage

            <param name="magic-properties-param" type="properties">
     x=11111
     y=22222
     z=33333
     </param>
     
     

    The code for accessing this parameter value:

     Parameter param = resourceConfig.getParameter("magic-properties-param");
     Properties properties = (Properties)param.getValue();
     

    Note, we will make this filter easier in the next release. You'll be able to call a method such as "getDecodedParameter" on the ResourceConfig, returning a decoded parameter Object.

    Author:
    tfennelly
    See Also:
    ResourceConfig
    • Constructor Detail

      • PropertyListParameterDecoder

        public PropertyListParameterDecoder()
    • Method Detail

      • decodeValue

        public Object decodeValue​(String value)
                           throws org.smooks.api.resource.config.ParameterDecodeException
        Description copied from class: ParameterDecoder
        Decode the supplied parameter value.
        Specified by:
        decodeValue in class ParameterDecoder<String>
        Parameters:
        value - The value to be decoded.
        Returns:
        The decode value Object.
        Throws:
        org.smooks.api.resource.config.ParameterDecodeException - Unable to decode parameter value.