@EventDriven @SideEffectFree @SupportsBatching @Tags(value={"xml","xslt","transform"}) @InputRequirement(value=INPUT_REQUIRED) @CapabilityDescription(value="Applies the provided XSLT file to the FlowFile XML payload. A new FlowFile is created with transformed content and is routed to the \'success\' relationship. If the XSL transform fails, the original FlowFile is routed to the \'failure\' relationship") @DynamicProperty(name="An XSLT transform parameter name", value="An XSLT transform parameter value", expressionLanguageScope=FLOWFILE_ATTRIBUTES, description="These XSLT parameters are passed to the transformer") public class TransformXml extends AbstractProcessor
| Modifier and Type | Class and Description |
|---|---|
private static class |
TransformXml.ErrorListenerLogger |
| Modifier and Type | Field and Description |
|---|---|
private com.github.benmanes.caffeine.cache.LoadingCache<String,Templates> |
cache |
static PropertyDescriptor |
CACHE_SIZE |
static PropertyDescriptor |
CACHE_TTL_AFTER_LAST_ACCESS |
static PropertyDescriptor |
INDENT_OUTPUT |
private List<PropertyDescriptor> |
properties |
static Relationship |
REL_FAILURE |
static Relationship |
REL_SUCCESS |
private Set<Relationship> |
relationships |
static PropertyDescriptor |
SECURE_PROCESSING |
static PropertyDescriptor |
XSLT_CONTROLLER |
static PropertyDescriptor |
XSLT_CONTROLLER_KEY |
static PropertyDescriptor |
XSLT_FILE_NAME |
| Constructor and Description |
|---|
TransformXml() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
private TransformXml.ErrorListenerLogger |
getErrorListenerLogger() |
Set<Relationship> |
getRelationships() |
private Source |
getSecureSource(StreamSource streamSource) |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
private StreamSource |
getTemplateSource(LookupService<String> lookupService,
String path,
boolean filePath) |
private TransformerFactory |
getTransformerFactory(boolean secureProcessing) |
protected void |
init(ProcessorInitializationContext context) |
private Templates |
newTemplates(ProcessContext context,
String path) |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor XSLT_FILE_NAME
public static final PropertyDescriptor XSLT_CONTROLLER
public static final PropertyDescriptor XSLT_CONTROLLER_KEY
public static final PropertyDescriptor INDENT_OUTPUT
public static final PropertyDescriptor SECURE_PROCESSING
public static final PropertyDescriptor CACHE_SIZE
public static final PropertyDescriptor CACHE_TTL_AFTER_LAST_ACCESS
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
private List<PropertyDescriptor> properties
private Set<Relationship> relationships
protected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessorpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponent@OnScheduled public void onScheduled(ProcessContext context)
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger in class AbstractProcessorprivate TransformXml.ErrorListenerLogger getErrorListenerLogger()
private Templates newTemplates(ProcessContext context, String path) throws TransformerConfigurationException, LookupFailureException
private TransformerFactory getTransformerFactory(boolean secureProcessing) throws TransformerConfigurationException
private StreamSource getTemplateSource(LookupService<String> lookupService, String path, boolean filePath) throws LookupFailureException
LookupFailureExceptionprivate Source getSecureSource(StreamSource streamSource) throws TransformerConfigurationException
Copyright © 2023 Apache NiFi Project. All rights reserved.