Package org.openhab.core.transform
Interface TransformationService
- All Known Implementing Classes:
AbstractFileTransformationService,ScriptTransformationService
@NonNullByDefault
public interface TransformationService
A TransformationProcessor transforms a given input and returns the transformed
result. Transformations could make sense in various situations, for example:
- extract certain informations from a weather forecast website
- extract the status of your TV which provides it's status on a webpage
- postprocess the output from a serial device to be human readable
- Author:
- Thomas Eichstaedt-Engelen - Initial contribution, Kai Kreuzer - Initial contribution
-
Field Details
-
SERVICE_PROPERTY_NAME
- See Also:
-
SERVICE_PROPERTY_LABEL
- See Also:
-
TRANSFORM_FOLDER_NAME
- See Also:
-
TRANSFORM_PROFILE_SCOPE
- See Also:
-
-
Method Details
-
transform
Transforms the inputsourceby means of the givenfunctionand returns the transformed output. The transformation may returnnullto express its operation resulted in anulloutput. In case of any error aTransformationExceptionshould be thrown.- Parameters:
function- the function to be used to transform the inputsource- the input to be transformed- Returns:
- the transformed result or
nullif the transformation's output isnull. - Throws:
TransformationException- if any error occurs
-