org.codehaus.cargo.container.configuration
Class FileConfig

java.lang.Object
  extended by org.codehaus.cargo.container.configuration.FileConfig

public class FileConfig
extends java.lang.Object

Contains data about configuration files that should be used for the container. This option only works with StandaloneLocal containers. The toDir and toFile are used to tell Cargo where to install the file in reference to the containers home location. toDir and toFile can be used independently or together. If toDir is undefined/null and toFile is foo, the destination of the file will be ${cargo.home}/foo If toDir is foo and the toFile is undefined/null, the destination of the new file will be ${cargo.home}/foo/${original file's name} If toDir is foo and toFile is bar, the destination of the new file will be ${cargo.home}/foo/bar

Version:
$Id: FileConfig.java 1908 2009-02-21 19:20:18Z adriancole $

Constructor Summary
FileConfig()
          Constructor.
 
Method Summary
 boolean getConfigfile()
          Returns true if the file is marked as a configuration file
 java.lang.String getFile()
          Returns the name of the file to be used.
 boolean getOverwrite()
          Return true if the file should overwrite an existing file.
 java.lang.String getToDir()
          Returns the name of the destination directory.
 java.lang.String getToFile()
          Returns the name of the destination file.
 void setConfigfile(boolean configfile)
          Set if the destination should be considered a configuration file
 void setConfigfile(java.lang.String configfile)
          Set if the destination should be considered a configuration file
 void setFile(java.lang.String file)
          Sets the file to be used.
 void setOverwrite(boolean overwrite)
          Set if the destination file should be overwritten.
 void setOverwrite(java.lang.String overwrite)
          Set if the destination file should be overwritten.
 void setToDir(java.lang.String todir)
          Sets the destination directory to use.
 void setToFile(java.lang.String tofile)
          Sets the destination file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileConfig

public FileConfig()
Constructor.

Method Detail

getFile

public java.lang.String getFile()
Returns the name of the file to be used.

Returns:
The file to be used

getToFile

public java.lang.String getToFile()
Returns the name of the destination file.

Returns:
The name of the destination file

getToDir

public java.lang.String getToDir()
Returns the name of the destination directory.

Returns:
The destination directory

getOverwrite

public boolean getOverwrite()
Return true if the file should overwrite an existing file.

Returns:
if the file should be overwritten

getConfigfile

public boolean getConfigfile()
Returns true if the file is marked as a configuration file

Returns:
If the file is a config file or not

setFile

public void setFile(java.lang.String file)
Sets the file to be used.

Parameters:
file - The file to use

setToFile

public void setToFile(java.lang.String tofile)
Sets the destination file name.

Parameters:
tofile - The destination file name

setToDir

public void setToDir(java.lang.String todir)
Sets the destination directory to use.

Parameters:
todir - The destination directory

setOverwrite

public void setOverwrite(java.lang.String overwrite)
Set if the destination file should be overwritten.

Parameters:
overwrite - Set to true if files should overwrite

setOverwrite

public void setOverwrite(boolean overwrite)
Set if the destination file should be overwritten.

Parameters:
overwrite - Set to true if files should overwrite

setConfigfile

public void setConfigfile(java.lang.String configfile)
Set if the destination should be considered a configuration file

Parameters:
configfile - Set to true if file is a configfile

setConfigfile

public void setConfigfile(boolean configfile)
Set if the destination should be considered a configuration file

Parameters:
configfile - Set to true if file is a configfile


Copyright © 2004-2011 Codehaus. All Rights Reserved.