Class JMadPreferencesImpl

  • All Implemented Interfaces:
    JMadPreferences

    public class JMadPreferencesImpl
    extends java.lang.Object
    implements JMadPreferences
    The basic implementation to store preferences.

    The basic principle is the following: For each option there exists a system property and it can be st individually. If it is set individually then the value is returned. If not set, then the value of the system property is returned, if this is not set then a hardcoded default value is returned.

    • Constructor Detail

      • JMadPreferencesImpl

        public JMadPreferencesImpl()
    • Method Detail

      • getOutputPath

        public java.lang.String getOutputPath()
        Specified by:
        getOutputPath in interface JMadPreferences
        Returns:
        the path where jmad shall write its data
      • setOutputPath

        public void setOutputPath​(java.lang.String outputPath)
        Specified by:
        setOutputPath in interface JMadPreferences
        Parameters:
        outputPath - the path where jmad shall write its data
      • getModelRepositoryBasePath

        public java.lang.String getModelRepositoryBasePath()
        Specified by:
        getModelRepositoryBasePath in interface JMadPreferences
        Returns:
        the base path to the model repository or null if the property is not set.
      • setModelRepositoryBasePath

        public void setModelRepositoryBasePath​(java.lang.String basePath)
        Description copied from interface: JMadPreferences
        sets the base-path to the model repository.
        Specified by:
        setModelRepositoryBasePath in interface JMadPreferences
        Parameters:
        basePath - the new path
      • isCleanupKernelFiles

        public boolean isCleanupKernelFiles()
        Specified by:
        isCleanupKernelFiles in interface JMadPreferences
        Returns:
        true if the files created by the kernel should be cleaned up at the end, false if not.
      • setCleanupKernelFiles

        public void setCleanupKernelFiles​(boolean cleanup)
        Description copied from interface: JMadPreferences
        set to true if the files created by the kernel should be cleaned up at the end, false if not.
        Specified by:
        setCleanupKernelFiles in interface JMadPreferences
        Parameters:
        cleanup - the value to set