@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.XsltValidator |
Modifier and Type | Field and Description |
---|---|
private com.google.common.cache.LoadingCache<String,Templates> |
cache |
static PropertyDescriptor |
CACHE_SIZE |
static PropertyDescriptor |
CACHE_TTL_AFTER_LAST_ACCESS |
static PropertyDescriptor |
INDENT_OUTPUT |
private static AtomicReference<LookupService<String>> |
lookupService |
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) |
Set<Relationship> |
getRelationships() |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
private Templates |
newTemplates(ProcessContext context,
String path) |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public 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
private static AtomicReference<LookupService<String>> lookupService
protected void init(ProcessorInitializationContext context)
init
in class AbstractSessionFactoryProcessor
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate
in class AbstractConfigurableComponent
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor
in class AbstractConfigurableComponent
private Templates newTemplates(ProcessContext context, String path) throws TransformerConfigurationException, LookupFailureException
@OnScheduled public void onScheduled(ProcessContext context)
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger
in class AbstractProcessor
Copyright © 2020 Apache NiFi Project. All rights reserved.