public class Processor extends Object
Processor
class for processing the contents of a TransportPackage
at deploy
time. This class contains the basic functionality for handing over a TransportPackage
for processing by
a number of configured Module
's. This class can be extended and methods overridden to provide custom
TransportPackage
processors.Modifier and Type | Field and Description |
---|---|
protected String |
action
The action that this
Processor has been configured to process packages for. |
protected Map<String,Module> |
modules
List of modules that this
Processor has been configured to use for processing packages. |
Constructor and Description |
---|
Processor(com.tridion.configuration.Configuration configuration)
Creates and configures a new instance.
|
Processor(String action)
Creates a new instance with given action.
|
Modifier and Type | Method and Description |
---|---|
void |
addModule(String className,
Module module)
Adds given
Module to module list. |
void |
configure(com.tridion.configuration.Configuration configuration)
Configures this
Processor with the passed configuration entry and creates all the configured
Module 's . |
String |
getAction()
Returns the action of the processor.
|
Iterator<Module> |
getModules()
Gets the configured
Module 's. |
void |
process(TransportPackage data)
Processes a
TransportPackage by handing it over to be processed by all the configured
Module 's. |
protected String action
Processor
has been configured to process packages for.public Processor(com.tridion.configuration.Configuration configuration) throws com.tridion.configuration.ConfigurationException
Deployer
when creating Processor
's.configuration
- Processor configuration entry.com.tridion.configuration.ConfigurationException
- If something goes wrong during configuration.public Processor(String action)
action
- The action string.public void addModule(String className, Module module)
Module
to module list.module
- The Module
instance to be added.public void configure(com.tridion.configuration.Configuration configuration) throws com.tridion.configuration.ConfigurationException
Processor
with the passed configuration entry and creates all the configured
Module
's . Extending classes should override this method if they require custom configuration or
don't require the standard Module
configuration and creation.configuration
- Processor configuration entry.com.tridion.configuration.ConfigurationException
- If something goes wrong during configuration.public String getAction()
public void process(TransportPackage data) throws ProcessingException
TransportPackage
by handing it over to be processed by all the configured
Module
's. Extending classes should override this method to implement custom processing logic.data
- TransportPackage
being deployed.ProcessingException
- If something goes wrong processing the TransportPackage
(all further
processing by other Processor
's will be aborted).Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries