Package org.apache.catalina.storeconfig
Class StoreFileMover
- java.lang.Object
- 
- org.apache.catalina.storeconfig.StoreFileMover
 
- 
 public class StoreFileMover extends java.lang.ObjectMove server.xml or context.xml as backup TODO Get Encoding from Registry
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringManagersm
 - 
Constructor SummaryConstructors Constructor Description StoreFileMover()Calculate file objects for the old and new configuration files.StoreFileMover(java.lang.String basename, java.lang.String filename, java.lang.String encoding)Calculate file objects for the old and new configuration files.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBasename()java.io.FilegetConfigNew()java.io.FilegetConfigOld()java.io.FilegetConfigSave()java.lang.StringgetEncoding()java.lang.StringgetFilename()protected java.lang.StringgetTimeTag()Time value for backup yyyy-mm-dd.hh-mm-ss.java.io.PrintWritergetWriter()Open an output writer for the new configuration file.voidinit()Generate the Filename to new with TimeStamp.voidmove()Shuffle old->save and new->old.voidsetBasename(java.lang.String basename)voidsetEncoding(java.lang.String string)voidsetFilename(java.lang.String string)
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm 
 
- 
 - 
Constructor Detail- 
StoreFileMoverpublic StoreFileMover(java.lang.String basename, java.lang.String filename, java.lang.String encoding)Calculate file objects for the old and new configuration files.- Parameters:
- basename- The base path
- encoding- The encoding of the file
- filename- The file name
 
 - 
StoreFileMoverpublic StoreFileMover() Calculate file objects for the old and new configuration files.
 
- 
 - 
Method Detail- 
getConfigNewpublic java.io.File getConfigNew() - Returns:
- Returns the configNew.
 
 - 
getConfigOldpublic java.io.File getConfigOld() - Returns:
- Returns the configOld.
 
 - 
getConfigSavepublic java.io.File getConfigSave() - Returns:
- Returns the configSave.
 
 - 
getBasenamepublic java.lang.String getBasename() - Returns:
- Returns the basename.
 
 - 
setBasenamepublic void setBasename(java.lang.String basename) - Parameters:
- basename- The basename to set.
 
 - 
getFilenamepublic java.lang.String getFilename() - Returns:
- The file name
 
 - 
setFilenamepublic void setFilename(java.lang.String string) - Parameters:
- string- The file name
 
 - 
getEncodingpublic java.lang.String getEncoding() - Returns:
- The encoding
 
 - 
setEncodingpublic void setEncoding(java.lang.String string) - Parameters:
- string- The encoding
 
 - 
initpublic void init() Generate the Filename to new with TimeStamp.
 - 
movepublic void move() throws java.io.IOExceptionShuffle old->save and new->old.- Throws:
- java.io.IOException- a file operation error occurred
 
 - 
getWriterpublic java.io.PrintWriter getWriter() throws java.io.IOExceptionOpen an output writer for the new configuration file.- Returns:
- The writer
- Throws:
- java.io.IOException- Failed opening a writer to the new file
 
 - 
getTimeTagprotected java.lang.String getTimeTag() Time value for backup yyyy-mm-dd.hh-mm-ss.- Returns:
- The time
 
 
- 
 
-