Class FileNameGenerator


  • public class FileNameGenerator
    extends java.lang.Object
    DOCUMENT ME!
    Version:
    1.0
    Author:
    Fiete
    • Method Detail

      • init

        public static void init​(java.util.Properties settings)
        Initializes the generator from settings
        Throws:
        java.lang.NullPointerException - if settings==null
      • quit

        public static void quit()
        Closes the generator.
      • getInstance

        @Deprecated
        public static FileNameGenerator getInstance()
        Deprecated.
        Who needs this?
        Returns the generator
        Throws:
        java.lang.IllegalStateException - if instance hasn't been called before.
      • getOrdersSaveFileNamePattern

        public java.lang.String getOrdersSaveFileNamePattern()
        Returns:
        the ordersSaveFileNamePattern
      • setOrdersSaveFileNamePattern

        public void setOrdersSaveFileNamePattern​(java.lang.String ordersSaveFileNamePattern)
        Parameters:
        ordersSaveFileNamePattern - the ordersSaveFileNamePattern to set
      • getFileName

        public static java.lang.String getFileName​(java.lang.String pattern,
                                                   FileNameGeneratorFeed feed)
        Parameters:
        pattern - String the user defined pattern for generating the FileName
        feed - FileNameGeneratorFeed with needed information
        Returns:
        the new FileName or Null, if pattern is null
      • replaceAll

        @Deprecated
        public static java.lang.String replaceAll​(java.lang.String originalString,
                                                  java.lang.String searchString,
                                                  java.lang.String replaceString)
        Deprecated.
        We use Java 1.5 now
        Parameters:
        originalString - String to work with
        searchString - String to be replaced with "replaceString"
        replaceString - String to replace "searchString"
        Returns:
        originalString with searchString replaced by replaceString we could use String.replaceAll for that...but, it's built in java 1.4 and just now we are compatible with 1.3. ... (Fiete 20061108)