Class StoreFileMover
java.lang.Object
org.apache.catalina.storeconfig.StoreFileMover
Move server.xml or context.xml as backup
 
TODO Get Encoding from Registry
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCalculate file objects for the old and new configuration files.StoreFileMover(String basename, String filename, String encoding) Calculate file objects for the old and new configuration files.
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringTime value for backup yyyy-mm-dd.hh-mm-ss.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(String basename) voidsetEncoding(String string) voidsetFilename(String string) 
- 
Field Details- 
sm
 
- 
- 
Constructor Details- 
StoreFileMover
- 
StoreFileMoverpublic StoreFileMover()Calculate file objects for the old and new configuration files.
 
- 
- 
Method Details- 
getConfigNew- Returns:
- Returns the configNew.
 
- 
getConfigOld- Returns:
- Returns the configOld.
 
- 
getConfigSave- Returns:
- Returns the configSave.
 
- 
getBasename- Returns:
- Returns the basename.
 
- 
setBasename- Parameters:
- basename- The basename to set.
 
- 
getFilename- Returns:
- The file name
 
- 
setFilename- Parameters:
- string- The file name
 
- 
getEncoding- Returns:
- The encoding
 
- 
setEncoding- Parameters:
- string- The encoding
 
- 
initpublic void init()Generate the Filename to new with TimeStamp.
- 
moveShuffle old->save and new->old.- Throws:
- IOException- a file operation error occurred
 
- 
getWriterOpen an output writer for the new configuration file.- Returns:
- The writer
- Throws:
- IOException- Failed opening a writer to the new file
 
- 
getTimeTag
 
-