org.jboss.soa.esb.actions.naming.strategy
Class ChangeSuffixNamingStrategy

java.lang.Object
  extended by org.jboss.soa.esb.actions.naming.strategy.AbstractFileNamingStrategy
      extended by org.jboss.soa.esb.actions.naming.strategy.ChangeSuffixNamingStrategy
All Implemented Interfaces:
FileNamingStrategy

public class ChangeSuffixNamingStrategy
extends AbstractFileNamingStrategy

Naming strategy that changes the suffix of a file to a configured value.

Author:
Derek Adams

Field Summary
static java.lang.String ATTR_NEW_SUFFIX
          XML attribute that holds the new suffix
static java.lang.String DEFAULT_NEW_SUFFIX
          Default suffix if none is configured
 
Constructor Summary
ChangeSuffixNamingStrategy()
           
 
Method Summary
 void configure(org.w3c.dom.Node xml)
          Configure the strategy from its XML node.
 java.lang.String getNewSuffix()
          Get the new suffix to use.
 java.lang.String process(java.lang.String filename, Message message)
          Process the incoming filename and generate an outgoing filename.
 void setNewSuffix(java.lang.String newSuffix)
          Set the new suffix to use.
 
Methods inherited from class org.jboss.soa.esb.actions.naming.strategy.AbstractFileNamingStrategy
getFilenameWithoutSuffix, getSuffix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NEW_SUFFIX

public static final java.lang.String DEFAULT_NEW_SUFFIX
Default suffix if none is configured

See Also:
Constant Field Values

ATTR_NEW_SUFFIX

public static final java.lang.String ATTR_NEW_SUFFIX
XML attribute that holds the new suffix

See Also:
Constant Field Values
Constructor Detail

ChangeSuffixNamingStrategy

public ChangeSuffixNamingStrategy()
Method Detail

configure

public void configure(org.w3c.dom.Node xml)
Description copied from interface: FileNamingStrategy
Configure the strategy from its XML node.


process

public java.lang.String process(java.lang.String filename,
                                Message message)
Description copied from interface: FileNamingStrategy
Process the incoming filename and generate an outgoing filename.

Specified by:
process in interface FileNamingStrategy
Specified by:
process in class AbstractFileNamingStrategy
Returns:
String

setNewSuffix

public void setNewSuffix(java.lang.String newSuffix)
Set the new suffix to use.

Parameters:
newSuffix -

getNewSuffix

public java.lang.String getNewSuffix()
Get the new suffix to use.

Returns:
String