Skip navigation links
com.jalios.jcms.tools

Class XmlToPropertiesConverter

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int STATUS_BAD_PARAMETERS
      XmlToPropertiesConverter exit code if invalid parameters were specified
      static int STATUS_ERROR
      XmlToPropertiesConverter exit code in case any error occurs
      static int STATUS_OK
      XmlToPropertiesConverter exit code when everything went fine
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void logConfiguration()
      Log the current configuration.
      static void main(java.lang.String[] args)
      XmlToPropertiesConverter main entry point.
      boolean processDirectory(java.io.File rootDir)
      Process a whole directory to search for XML file to convert.
      void setAppendComment(boolean appendComment)
      Enable or disable comment in properties.
      void setBackupFiles(boolean backupFiles)
      Enable or disable backup.
      void setDryRun(boolean dryRun)
      Enable dryrun mode.
      void setUpdateXmlFiles(boolean updateXmlFiles)
      Enable or disable update of XML files.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • STATUS_OK

        public static final int STATUS_OK
        XmlToPropertiesConverter exit code when everything went fine
        See Also:
        Constant Field Values
      • STATUS_BAD_PARAMETERS

        public static final int STATUS_BAD_PARAMETERS
        XmlToPropertiesConverter exit code if invalid parameters were specified
        See Also:
        Constant Field Values
      • STATUS_ERROR

        public static final int STATUS_ERROR
        XmlToPropertiesConverter exit code in case any error occurs
        See Also:
        Constant Field Values
    • Constructor Detail

      • XmlToPropertiesConverter

        public XmlToPropertiesConverter()
    • Method Detail

      • processDirectory

        public boolean processDirectory(java.io.File rootDir)
        Process a whole directory to search for XML file to convert.
        Parameters:
        rootDir - the directory in which perform XML file search, MUST be either a
        Returns:
        true if process was sucessful, false otherwise
      • setDryRun

        public void setDryRun(boolean dryRun)
        Enable dryrun mode.

        If set to true, no operation will be performe, just log what would have been done.

        Parameters:
        dryRun - true to enable dryrun mode, false to perform operation normally. default is false
      • setBackupFiles

        public void setBackupFiles(boolean backupFiles)
        Enable or disable backup.

        Set whether XML and properties files should be backed up before any modification is performed.

        Parameters:
        backupFiles - true to create backup, false to overwrite file directly. default is true
      • setAppendComment

        public void setAppendComment(boolean appendComment)
        Enable or disable comment in properties.

        Set whether comment should be appended to properties file before writing I18N properties.

        Parameters:
        appendComment - true to append comment, false to write properties directly. default is true
      • setUpdateXmlFiles

        public void setUpdateXmlFiles(boolean updateXmlFiles)
        Enable or disable update of XML files.

        Set whether XML files should be updated to remove all I18N strings.

        Parameters:
        updateXmlFiles - true to update, false to leave file intact. default is true
      • logConfiguration

        public void logConfiguration()
        Log the current configuration.
      • main

        public static void main(java.lang.String[] args)
        XmlToPropertiesConverter main entry point.
        Parameters:
        args - command line parameter

Copyright © 2001-2017 Jalios SA. All Rights Reserved.