Interface RowTransformationClient
-
public interface RowTransformationClient
A builder that helps transforming content using the Transformation service.The builder is acquired from
ContentQueryRow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RowTransformationClient
cache(boolean cache)
Specifies whether the transformation result should be cached or not.RowTransformationClient
content()
Specifies that the transformation should convert the main content of the containing ContentQueryRow.RowTransformationClient
inputFileContentType(String contentType)
Overrides the file content type for the input file.RowTransformationClient
inputFilename(String filename)
Overrides the filename for the input file.RowTransformationClient
inputFilenameExtension(String extension)
Overrides the filename extension for the input file.RowTransformationClient
item(FileExpressionType expression)
Specifies that the transformation should convert a given item.RowTransformationClient
item(String externalKey)
Specifies that the transformation should convert a given item, based on externalKey.void
transform(Consumer<javax.activation.DataSource> transformedContent)
Execute the specified transformation, calling the specified consumer once per transformed object.RowTransformationClient
transformationLookup(String externalKey)
Specify a registered transformation to perform.RowTransformationClient
transformationOperation(String operation)
Specify a transformation operation to perform.
-
-
-
Method Detail
-
transformationLookup
RowTransformationClient transformationLookup(String externalKey)
Specify a registered transformation to perform. If the transformation is not configured for this document (by extension or media type), transform will not call the provided consumer.transformationLookup and transformationOperation are mutually exclusive. You can at most specify one of them.
Registered transformations are stored in iKnowBase and map transformation operations to extensions and media types.
- Parameters:
externalKey
- of the transformation- Returns:
- A configured
RowTransformationClient
-
transformationOperation
RowTransformationClient transformationOperation(String operation)
Specify a transformation operation to perform. The transformation operation is not verified for correctness or suitability and transform will always attempt to execute.transformationLookup and transformationOperation are mutually exclusive. You can at most specify one of them.
- Parameters:
operation
- the transformation operation- Returns:
- A configured
RowTransformationClient
-
content
RowTransformationClient content()
Specifies that the transformation should convert the main content of the containing ContentQueryRow.content and item are mutually exclusive. You can at most specify one of them.
- Returns:
- A configured
RowTransformationClient
-
item
RowTransformationClient item(FileExpressionType expression)
Specifies that the transformation should convert a given item.content and item( are mutually exclusive. You can at most specify one of them.
- Returns:
- A configured
RowTransformationClient
-
item
RowTransformationClient item(String externalKey)
Specifies that the transformation should convert a given item, based on externalKey.content and item are mutually exclusive. You can at most specify one of them.
- Returns:
- A configured
RowTransformationClient
-
cache
RowTransformationClient cache(boolean cache)
Specifies whether the transformation result should be cached or not.- Returns:
- A configured
RowTransformationClient
-
inputFilename
RowTransformationClient inputFilename(String filename)
Overrides the filename for the input file. If not specified, the original filename will be used.inputFilename and inputFilenameExtension are mutually exclusive. You can at most specify one of them.
- Returns:
- A configured
RowTransformationClient
-
inputFilenameExtension
RowTransformationClient inputFilenameExtension(String extension)
Overrides the filename extension for the input file. If not specified, the original filename extension will be used.inputFilename and inputFilenameExtension are mutually exclusive. You can at most specify one of them.
- Returns:
- A configured
RowTransformationClient
-
inputFileContentType
RowTransformationClient inputFileContentType(String contentType)
Overrides the file content type for the input file. If not specified, the content type will be derived from the input filename extension according to iKnowBase mappings.- Returns:
- A configured
RowTransformationClient
-
transform
void transform(Consumer<javax.activation.DataSource> transformedContent)
Execute the specified transformation, calling the specified consumer once per transformed object.Note:
- For multi-valued attributes the consumer may be called several times for a single attribute.
- The consumer will not be called if the transformationLookup does not support the document (extension, media type).
- Parameters:
transformedContent
-
-
-