com.chaosserver.bilbo.textui
Class Main

java.lang.Object
  |
  +--com.chaosserver.bilbo.textui.Main

public class Main
extends Object

This is the main class to enter the text UI version of the program.

Since:
1.0

Field Summary
protected static Settings settings
          Holds a reference to the settings objects.
 
Constructor Summary
Main()
           
 
Method Summary
protected static void generateMapping(File currentDirectory)
          Generates the mapping file against the given directory.
protected static void generateRecursiveMapping(File currentDirectory)
          Generates the mapping file recursively against the given directory.
protected static Settings getSettings()
          Getter for Settings
static void main(String[] args)
          The main method that is executed when the class is called.
protected static void rename(File currentDirectory, String fromStyle, String toStyle)
          Renames files in given directory from one mapping style to another.
protected static void renameRecursively(File currentDirectory, String fromStyle, String toStyle)
          Recursively renames files in given directory from one mapping style to another.
protected static void setSettings(Settings settings)
          Setter for Settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

settings

protected static Settings settings
Holds a reference to the settings objects.

Constructor Detail

Main

public Main()
Method Detail

getSettings

protected static Settings getSettings()
Getter for Settings

Returns:
the settings object

setSettings

protected static void setSettings(Settings settings)
Setter for Settings

Parameters:
settings - the settings object

main

public static void main(String[] args)
                 throws Exception
The main method that is executed when the class is called.

Parameters:
args - The arguments.
Throws:
Exception - if something goes wrong

generateRecursiveMapping

protected static void generateRecursiveMapping(File currentDirectory)
                                        throws ReaderWriterException,
                                               IOException,
                                               JolietException
Generates the mapping file recursively against the given directory.

Parameters:
currentDirectory - the base directory to generate mapping files against.
ReaderWriterException
IOException
JolietException

generateMapping

protected static void generateMapping(File currentDirectory)
                               throws ReaderWriterException,
                                      IOException,
                                      JolietException
Generates the mapping file against the given directory.

Parameters:
currentDirectory - the base directory to generate mapping files against.
ReaderWriterException
IOException
JolietException

renameRecursively

protected static void renameRecursively(File currentDirectory,
                                        String fromStyle,
                                        String toStyle)
                                 throws ReaderWriterException,
                                        NameNotFoundException,
                                        FilenameMappingNotFoundException,
                                        IOException,
                                        FileNotFoundException
Recursively renames files in given directory from one mapping style to another.

Parameters:
currentDirectory - parent directory to start with.
fromStyle - the original style
toStyle - the destination style
ReaderWriterException
NameNotFoundException
FilenameMappingNotFoundException
IOException
FileNotFoundException

rename

protected static void rename(File currentDirectory,
                             String fromStyle,
                             String toStyle)
                      throws ReaderWriterException,
                             NameNotFoundException,
                             FilenameMappingNotFoundException,
                             IOException,
                             FileNotFoundException
Renames files in given directory from one mapping style to another.

Parameters:
currentDirectory - directory to rename
fromStyle - the original style
toStyle - the destination style
ReaderWriterException
NameNotFoundException
FilenameMappingNotFoundException
IOException
FileNotFoundException


Copyright © 20020226