Interface ContentTransformer<InternalType>


public interface ContentTransformer<InternalType>
This interface defines the API that has to be implemented by classes that are capable of transforming content data after it's initially loaded.

The content attributes are provided to the transform method and can be used to provide hints for the transformation.

Each transformer is supposed to transform content data of a certain data type and return the transformed content in the same data type. You should be careful that this data type corresponds to the data type that's returned by the format method of the Formatter formatter that handles the content's mime type.

Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    transform(InternalType data, Map<String,String> attributes)
    Transforms the content data and returns the transformed data in the same data type as the original.
  • Method Details

    • transform

      InternalType transform(InternalType data, Map<String,String> attributes)
      Transforms the content data and returns the transformed data in the same data type as the original.
      Parameters:
      data - the content data that has to be transformed
      attributes - a map of content attributes that can be used to provide hints or parameters for the transformation
      Returns:
      the transformed data
      Since:
      1.0