com.johnmunsch.hotsheet
Class HSSettings

java.lang.Object
  |
  +--com.johnmunsch.hotsheet.HSSettings

public class HSSettings
extends java.lang.Object

Acts as a singleton repository of all the settings for the entire application. Handles loading and storing of those settings for the program.

Author:
Don Thorp

Method Summary
 void copyFile(java.io.File source, java.io.File dest)
          Copy source file to destination file.
 java.io.File getChannelStoreFile()
          Return the File object to the channelStore
 java.io.File getHSPath()
          Return the File object to the HotSheet directory.
static HSSettings getInstance()
          Retrieve the instance of the HSSettings object
 java.io.File getItemHistoryFile()
          Return the File object to the itemHistory
 java.io.File getItemStoreFile()
          Return the File object to the itemStore
 java.io.File getOldChannelStoreFile()
          Return the File object to the old channelStore
 java.io.File getOldItemHistoryFile()
          Return the File object to the old itemHistory
 java.io.File getOldItemStoreFile()
          Return the File object to the old itemStore
 java.util.Properties getProperties()
          Returns the properties set for the application.
 java.io.File getUserHomePath()
          Return the File object corresponding to the user's home directory
 void load()
          Loads the properties for the application.
 boolean relocateSettings()
          Relocate settings from the user's home directory to the hotsheet directory.
 void store()
          Saves the current properties settings for the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static HSSettings getInstance()
Retrieve the instance of the HSSettings object


getUserHomePath

public java.io.File getUserHomePath()
Return the File object corresponding to the user's home directory


getHSPath

public java.io.File getHSPath()
Return the File object to the HotSheet directory.


getChannelStoreFile

public java.io.File getChannelStoreFile()
Return the File object to the channelStore


getItemHistoryFile

public java.io.File getItemHistoryFile()
Return the File object to the itemHistory


getItemStoreFile

public java.io.File getItemStoreFile()
Return the File object to the itemStore


getOldChannelStoreFile

public java.io.File getOldChannelStoreFile()
Return the File object to the old channelStore


getOldItemHistoryFile

public java.io.File getOldItemHistoryFile()
Return the File object to the old itemHistory


getOldItemStoreFile

public java.io.File getOldItemStoreFile()
Return the File object to the old itemStore


load

public void load()
Loads the properties for the application.


store

public void store()
Saves the current properties settings for the application.


getProperties

public java.util.Properties getProperties()
Returns the properties set for the application.


relocateSettings

public boolean relocateSettings()
Relocate settings from the user's home directory to the hotsheet directory. This is a function to deal with legacy configurations where the files were stored in a poor location.


copyFile

public void copyFile(java.io.File source,
                     java.io.File dest)
              throws java.io.IOException
Copy source file to destination file.

java.io.IOException