org.apache.camel.component.file.strategy
Class DefaultFileRenamer

java.lang.Object
  extended by org.apache.camel.component.file.strategy.DefaultFileRenamer
All Implemented Interfaces:
FileRenamer

public class DefaultFileRenamer
extends Object
implements FileRenamer

Camel default file renamer.

Version:
$Revision: 37863 $

Constructor Summary
DefaultFileRenamer()
           
DefaultFileRenamer(String namePrefix, String namePostfix)
           
 
Method Summary
 String getNamePostfix()
           
 String getNamePrefix()
           
 File renameFile(File file)
          Renames the given file
protected  String renameFileName(File file)
           
 void setNamePostfix(String namePostfix)
          Sets the name postfix appended to moved files.
 void setNamePrefix(String namePrefix)
          Sets the name prefix appended to moved files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileRenamer

public DefaultFileRenamer()

DefaultFileRenamer

public DefaultFileRenamer(String namePrefix,
                          String namePostfix)
Method Detail

renameFile

public File renameFile(File file)
Description copied from interface: FileRenamer
Renames the given file

Specified by:
renameFile in interface FileRenamer
Parameters:
file - the original file.
Returns:
the renamed file.

getNamePostfix

public String getNamePostfix()

setNamePostfix

public void setNamePostfix(String namePostfix)
Sets the name postfix appended to moved files. For example to rename all the files from * to *.done set this value to ".done"


getNamePrefix

public String getNamePrefix()

setNamePrefix

public void setNamePrefix(String namePrefix)
Sets the name prefix appended to moved files. For example to move processed files into a hidden directory called ".camel" set this value to ".camel/"


renameFileName

protected String renameFileName(File file)


Copyright © 2008 IONA Open Source Community. All Rights Reserved.