Docmosis API 4.5.0

com.docmosis.template.population
Interface StringInterceptor

All Known Implementing Classes:
Base64ImageStringInterceptor

public interface StringInterceptor

StringInterceptors can make custom judgements about the the data that is about to be plugged into a DataProvider.


Method Summary
 boolean process(String key, String value, MutableDataProvider dp)
          Process the given key and value to make optional adjustments to the given DataProvider.
 

Method Detail

process

public boolean process(String key,
                       String value,
                       MutableDataProvider dp)
                throws StringInterceptorException
Process the given key and value to make optional adjustments to the given DataProvider. Typically this is to be used to intercept a value that should be interpreted as an image or image reference (for example) which can then be plugged into the DataProvider as an image not a string. A return value of true indicates this interceptor means to consume the value and so further processing should cease. If in doubt, return false to allow other string interceptors to apply.

Parameters:
key - the key for the data
value - the value of the data
dp - the data provider this data is about to be plugged into
Returns:
true if no further interceptors should work with this value
Throws:
StringInterceptorException - if an error occurs. This error will cause processing of the render to fail with an exception.

Docmosis API 4.5.0

Copyright © 2014 Docmosis Pty Ltd. All Rights Reserved.