com.scooterframework.tools.common
Class GeneratorHelper

java.lang.Object
  extended by com.scooterframework.tools.common.GeneratorHelper

public class GeneratorHelper
extends java.lang.Object

This class contains helper methods for generators.


Field Summary
static int CREATE_NEW_FILE
           
static int NOCHANGE_EXISTING_FILE
           
static int UNDETERMINED
           
static int UPDATE_EXISTING_FILE
           
 
Constructor Summary
GeneratorHelper()
           
 
Method Summary
static java.lang.String loadToStringFromFile(java.lang.String fullFileName)
           
static java.lang.String loadToStringFromResource(java.lang.String resourceFileName)
           
static java.util.List<java.lang.String> loadToStringListFromFile(java.lang.String fullFileName)
           
static java.util.List<java.lang.String> loadToStringListFromResource(java.lang.String resourceFileName)
           
static int outputTo(java.util.List<java.lang.String> content, java.lang.String fullPathToOutputFile, boolean overwrite)
           
static int outputTo(java.util.List<java.lang.String> content, java.lang.String rootPath, java.lang.String relativePathToFile, java.lang.String fileName, boolean overwrite)
           
static int outputTo(java.lang.String content, java.lang.String fullPathToOutputFile, boolean overwrite)
           
static int outputTo(java.lang.String content, java.lang.String rootPath, java.lang.String relativePathToFile, java.lang.String fileName, boolean overwrite)
           
static void writeToFile(java.util.List<java.lang.String> content, java.lang.String fileFullName)
           
static void writeToFile(java.lang.String content, java.lang.String fileFullName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOCHANGE_EXISTING_FILE

public static final int NOCHANGE_EXISTING_FILE
See Also:
Constant Field Values

CREATE_NEW_FILE

public static final int CREATE_NEW_FILE
See Also:
Constant Field Values

UPDATE_EXISTING_FILE

public static final int UPDATE_EXISTING_FILE
See Also:
Constant Field Values

UNDETERMINED

public static final int UNDETERMINED
See Also:
Constant Field Values
Constructor Detail

GeneratorHelper

public GeneratorHelper()
Method Detail

loadToStringListFromResource

public static java.util.List<java.lang.String> loadToStringListFromResource(java.lang.String resourceFileName)
                                                                     throws java.lang.Exception
Throws:
java.lang.Exception

loadToStringFromResource

public static java.lang.String loadToStringFromResource(java.lang.String resourceFileName)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

loadToStringListFromFile

public static java.util.List<java.lang.String> loadToStringListFromFile(java.lang.String fullFileName)
                                                                 throws java.lang.Exception
Throws:
java.lang.Exception

loadToStringFromFile

public static java.lang.String loadToStringFromFile(java.lang.String fullFileName)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

outputTo

public static int outputTo(java.lang.String content,
                           java.lang.String rootPath,
                           java.lang.String relativePathToFile,
                           java.lang.String fileName,
                           boolean overwrite)
                    throws java.lang.Exception
Throws:
java.lang.Exception

outputTo

public static int outputTo(java.lang.String content,
                           java.lang.String fullPathToOutputFile,
                           boolean overwrite)
                    throws java.lang.Exception
Throws:
java.lang.Exception

outputTo

public static int outputTo(java.util.List<java.lang.String> content,
                           java.lang.String rootPath,
                           java.lang.String relativePathToFile,
                           java.lang.String fileName,
                           boolean overwrite)
                    throws java.lang.Exception
Throws:
java.lang.Exception

outputTo

public static int outputTo(java.util.List<java.lang.String> content,
                           java.lang.String fullPathToOutputFile,
                           boolean overwrite)
                    throws java.lang.Exception
Throws:
java.lang.Exception

writeToFile

public static void writeToFile(java.lang.String content,
                               java.lang.String fileFullName)
                        throws java.lang.Exception
Throws:
java.lang.Exception

writeToFile

public static void writeToFile(java.util.List<java.lang.String> content,
                               java.lang.String fileFullName)
                        throws java.lang.Exception
Throws:
java.lang.Exception