org.codehaus.plexus.components.io.filemappers
Class FileExtensionMapper

java.lang.Object
  extended by org.codehaus.plexus.components.io.filemappers.AbstractFileMapper
      extended by org.codehaus.plexus.components.io.filemappers.FileExtensionMapper
All Implemented Interfaces:
FileMapper

public class FileExtensionMapper
extends AbstractFileMapper

An implementation of FileMapper, which changes the files extension.


Field Summary
static String ROLE_HINT
          The file extension mappers role-hint: "fileExtension".
 
Fields inherited from interface org.codehaus.plexus.components.io.filemappers.FileMapper
DEFAULT_ROLE_HINT, ROLE
 
Constructor Summary
FileExtensionMapper()
           
 
Method Summary
 String getMappedFileName(String pName)
          Checks the input and returns it without modifications.
 String getTargetExtension()
          Returns the target files extension.
 void setTargetExtension(String pTargetExtension)
          Sets the target files extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_HINT

public static final String ROLE_HINT
The file extension mappers role-hint: "fileExtension".

See Also:
Constant Field Values
Constructor Detail

FileExtensionMapper

public FileExtensionMapper()
Method Detail

setTargetExtension

public void setTargetExtension(String pTargetExtension)
Sets the target files extension.

Parameters:
pTargetExtension - the target extensions
Throws:
IllegalArgumentException - The target extension is null or empty.

getTargetExtension

public String getTargetExtension()
Returns the target files extension.

Returns:
The target extension

getMappedFileName

public String getMappedFileName(String pName)
Description copied from class: AbstractFileMapper
Checks the input and returns it without modifications.

Specified by:
getMappedFileName in interface FileMapper
Overrides:
getMappedFileName in class AbstractFileMapper
Parameters:
pName - The source name.
Returns:
The target name.


Copyright © 2001-2012 Codehaus. All Rights Reserved.