public class TransformProcessor extends Object
TransformProcessor class is the central class through which all transformations take place.
This is the class called from outside of this package, to allow transformation to take place.| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_CLASS_NAME |
| Constructor and Description |
|---|
TransformProcessor() |
TransformProcessor(String transformerClassName)
Constructs a transformation TransformProcessor class, generating a
Transformer instance, for use
by all of the classes in the com.tridion.transformer package. |
| Modifier and Type | Method and Description |
|---|---|
static Transformer |
getTransformer(String transformerClassName)
Get an instance of the
Transformer class using the class name passed as an argument. |
File |
transformItem(File transformFile,
Function<File,byte[]> fileReader,
BiConsumer<File,byte[]> fileWriter)
This method processes an item passed to it.
|
File |
transformItem(File transformFile,
String charsetName,
Function<File,byte[]> fileReader,
BiConsumer<File,byte[]> fileWriter)
This method processes an item passed to it.
|
protected static final String DEFAULT_CLASS_NAME
public TransformProcessor()
throws TCDLTransformerException
TCDLTransformerExceptionpublic TransformProcessor(String transformerClassName) throws TCDLTransformerException
Transformer instance, for use
by all of the classes in the com.tridion.transformer package.transformerClassName - The fully qualified classname of a class which extends
com.tridion.transformer.Transformer,
providing the mapping to generate a specific target output language.TCDLTransformerExceptionpublic static Transformer getTransformer(String transformerClassName) throws TCDLTransformerException
Transformer class using the class name passed as an argument.
If the transformer field has not been set, then this will also this field
to the Transformer class instantiated.transformerClassName - The name of the class to instantiate.Transformer class.TCDLTransformerExceptionpublic File transformItem(File transformFile, String charsetName, Function<File,byte[]> fileReader, BiConsumer<File,byte[]> fileWriter) throws TCDLTransformerException
transformFile - The filename of the item.charsetName - charset of content.fileReader - reads content of provided file.fileWriter - writes content to provided file.TCDLTransformerExceptionpublic File transformItem(File transformFile, Function<File,byte[]> fileReader, BiConsumer<File,byte[]> fileWriter) throws TCDLTransformerException
transformFile - The filename of the item.fileReader - reads content of provided file.fileWriter - writes content to provided file.TCDLTransformerExceptionCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries