Package org.apache.catalina.storeconfig
Class StoreFileMover
java.lang.Object
org.apache.catalina.storeconfig.StoreFileMover
Move server.xml or context.xml as backup
TODO Get Encoding from Registry
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCalculate 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 Summary
Modifier and TypeMethodDescriptionprotected String
Time value for backup yyyy-mm-dd.hh-mm-ss.Open an output writer for the new configuration file.void
init()
Generate the Filename to new with TimeStamp.void
move()
Shuffle old->save and new->old.void
setBasename
(String basename) void
setEncoding
(String string) void
setFilename
(String string)
-
Field Details
-
sm
-
-
Constructor Details
-
StoreFileMover
-
StoreFileMover
public 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
-
init
public void init()Generate the Filename to new with TimeStamp. -
move
Shuffle old->save and new->old.- Throws:
IOException
- a file operation error occurred
-
getWriter
Open an output writer for the new configuration file.- Returns:
- The writer
- Throws:
IOException
- Failed opening a writer to the new file
-
getTimeTag
-