Expresso 5-6

com.jcorporate.expresso.core.utility
Class ReNameUtil

java.lang.Object
  extended bycom.jcorporate.expresso.core.utility.ReNameUtil

public class ReNameUtil
extends Object

Utility for renaming classes & dependant objects. Takes a "mapping" file that gives the "from/to" pairs, and a directory to start looking for files in - then all files in that directory are processed

Author:
Michael Nash

Constructor Summary
ReNameUtil()
          Constructor
 
Method Summary
static Vector getDir(String dirName)
          Return a vector of the file/dir names in any give directory
static String getExtension(String fileName)
          Get the file extension (after the ".")
static String getPath(String fileName)
          Get the path of a file name
static void main(String[] args)
           
static void processDB(String configDir, String db)
           
static void processDirs(String fileName)
           
static void processFile(String sourceFile)
          Process a single file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReNameUtil

public ReNameUtil()
Constructor

Method Detail

processDirs

public static void processDirs(String fileName)
                        throws IOException
Parameters:
fileName -
Throws:
IOException

processFile

public static void processFile(String sourceFile)
                        throws IOException
Process a single file

Parameters:
sourceFile - Source file pathname
Throws:
IOException - If the copy fails due to an I/O error

getDir

public static Vector getDir(String dirName)
                     throws IOException
Return a vector of the file/dir names in any give directory

Parameters:
dirName -
Throws:
IOException - If the given name is not a directory or if an I/O error occurs when trying to read the file list

getExtension

public static String getExtension(String fileName)
                           throws IOException
Get the file extension (after the ".")

Parameters:
fileName - Original full file name
Returns:
String Extension name
Throws:
IOException - If unable to allocate the file to get the extension

getPath

public static String getPath(String fileName)
Get the path of a file name

Parameters:
fileName - Original pathname
Returns:
String Path portion of the pathname

processDB

public static void processDB(String configDir,
                             String db)
                      throws IOException,
                             DBException,
                             ConfigurationException
Parameters:
configDir -
db -
Throws:
IOException
DBException
ConfigurationException

main

public static void main(String[] args)
Parameters:
args -

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.