## org.apache.catalina.storeconfig
Class StoreFileMover

    java.lang.Object
      org.apache.catalina.storeconfig.StoreFileMover

public class StoreFileMover
extends java.lang.Object

Move server.xml or context.xml as backup

Author:
  Peter Rossbach TODO Get Encoding from Registry

Constructor Summary
`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 Summary
`java.lang.String` `getBasename()`
`java.io.File` `getConfigNew()`
`java.io.File` `getConfigOld()`
`java.io.File` `getConfigSave()`
`java.lang.String` `getEncoding()`
`java.lang.String` `getFilename()`
`protected java.lang.String` `getTimeTag()` Time value for backup yyyy-mm-dd.hh-mm-ss
`java.io.PrintWriter` `getWriter()` 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(java.lang.String basename)`
`void` `setEncoding(java.lang.String string)`
`void` `setFilename(java.lang.String string)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StoreFileMover

    public StoreFileMover(java.lang.String basename,
                          java.lang.String filename,
                          java.lang.String encoding)

  Calculate file objects for the old and new configuration files.

### StoreFileMover

    public StoreFileMover()

  Calculate file objects for the old and new configuration files.

Method Detail

### getConfigNew

    public java.io.File getConfigNew()

  Returns:
    Returns the configNew.

### getConfigOld

    public java.io.File getConfigOld()

  Returns:
    Returns the configOld.

### getConfigSave

    public java.io.File getConfigSave()

  Returns:
    Returns the configSave.

### getBasename

    public java.lang.String getBasename()

  Returns:
    Returns the basename.

### setBasename

    public void setBasename(java.lang.String basename)

  Parameters:
    `basename` - The basename to set.

### getFilename

    public java.lang.String getFilename()

  Returns:
    The file name

### setFilename

    public void setFilename(java.lang.String string)

  Parameters:
    `string` -

### getEncoding

    public java.lang.String getEncoding()

  Returns:
    The encoding

### setEncoding

    public void setEncoding(java.lang.String string)

  Parameters:
    `string` -

### init

    public void init()

  generate the Filename to new with TimeStamp

### move

    public void move()
              throws java.io.IOException

  Shuffle old->save and new->old

  Throws:
    `java.io.IOException`

### getWriter

    public java.io.PrintWriter getWriter()
                                  throws java.io.IOException

  Open an output writer for the new configuration file

  Returns:
    The writer
  Throws:
    `java.io.IOException`

### getTimeTag

    protected java.lang.String getTimeTag()

  Time value for backup yyyy-mm-dd.hh-mm-ss

  Returns:
    The time

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.