org.apache.turbine.util.migrator
Class Migrator
java.lang.Object
|
+--org.apache.turbine.util.migrator.Migrator
- public class Migrator
- extends java.lang.Object
This utility class attempts to help Turbine developers migrate
their wepapp sources across versions of Turbine by applying
a series of regexes and rules to a source tree and creates
a new source tree that is compatible with subsequent
releases of Turbine.
- Version:
- $Id$
- Author:
- Jason van Zyl
Field Summary |
protected java.lang.String |
originalSourceFile
Source file currently being migrated. |
protected java.lang.String |
pathSeparator
Path separator property |
protected org.apache.oro.text.perl.Perl5Util |
perl
Regular expression tool |
protected java.lang.String[] |
res
|
Method Summary |
java.lang.String |
convertSourceFile(java.lang.String sourceFile)
Apply find/replace regexes to our Turbine source file. |
static void |
main(java.lang.String[] args)
Main hook for the conversion process. |
void |
migrate(java.lang.String[] args)
Iterate through the set of find/replace regexes
that will convert a given source tree from one |
void |
usage()
How to use this little puppy :-) |
private boolean |
writeSource(java.lang.String file,
java.lang.String basedir,
java.lang.String newBasedir)
Write out the converted template to the given named file
and base directory. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
originalSourceFile
protected java.lang.String originalSourceFile
- Source file currently being migrated.
perl
protected org.apache.oro.text.perl.Perl5Util perl
- Regular expression tool
pathSeparator
protected java.lang.String pathSeparator
- Path separator property
res
protected java.lang.String[] res
Migrator
public Migrator()
migrate
public void migrate(java.lang.String[] args)
- Iterate through the set of find/replace regexes
that will convert a given source tree from one
writeSource
private boolean writeSource(java.lang.String file,
java.lang.String basedir,
java.lang.String newBasedir)
- Write out the converted template to the given named file
and base directory.
usage
public void usage()
- How to use this little puppy :-)
convertSourceFile
public java.lang.String convertSourceFile(java.lang.String sourceFile)
- Apply find/replace regexes to our Turbine source file.
- Parameters:
String
- source file to migrate.- Returns:
- String migrated source file.
main
public static void main(java.lang.String[] args)
- Main hook for the conversion process.
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.