org.jboss.soa.esb.actions.routing
Class FileCopier

java.lang.Object
  extended by org.jboss.soa.esb.actions.AbstractFileAction
      extended by org.jboss.soa.esb.actions.routing.FileCopier
All Implemented Interfaces:
ActionProcessor

public class FileCopier
extends AbstractFileAction

File copy action.

Copy the file specified by the "fileParams" arg in process(File) to the location specified by the action config properties.

Sample Action Configuration:

 <Action name="Copy-To-XXX" processor="FileCopier">
     <property name="copyToDirURI" value="file:///..." />
     <property name="copyToSuffix" value=".fileCopierOutput" />
 </Action>
 

Author:
Esteban

Constructor Summary
FileCopier(java.lang.String actionName, java.util.List<KeyValuePair> properties)
          Public constructor.
 
Method Summary
 java.io.Serializable getErrorNotification(Message message)
          Get the "Error" notification message for this processor.
 java.io.Serializable getOkNotification(Message message)
          Get the "OK" notification message for this processor.
 java.lang.Object process(java.io.File file)
          Process the file message object.
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractFileAction
process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCopier

public FileCopier(java.lang.String actionName,
                  java.util.List<KeyValuePair> properties)
           throws java.net.URISyntaxException
Public constructor.

Parameters:
actionName - Action name.
properties - Action Properties.
Throws:
ConfigurationException - Action not properly configured.
java.net.URISyntaxException
Method Detail

process

public java.lang.Object process(java.io.File file)
                         throws ActionProcessingException
Description copied from class: AbstractFileAction
Process the file message object.

Specified by:
process in class AbstractFileAction
Parameters:
file - The file to be processed.
Returns:
The processing result.
Throws:
ActionProcessingException - Exception while processing file.

getOkNotification

public java.io.Serializable getOkNotification(Message message)
Description copied from interface: ActionProcessor
Get the "OK" notification message for this processor.

Parameters:
message - The message Object.
Returns:
The OK message.

getErrorNotification

public java.io.Serializable getErrorNotification(Message message)
Description copied from interface: ActionProcessor
Get the "Error" notification message for this processor.

Parameters:
message - The message Object.
Returns:
The Error message.