Package cern.accsoft.steering.jmad.util
Class JMadPreferencesImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.util.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 Summary
Constructors Constructor Description JMadPreferencesImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetModelRepositoryBasePath()java.lang.StringgetOutputPath()booleanisCleanupKernelFiles()voidsetCleanupKernelFiles(boolean cleanup)set totrueif the files created by the kernel should be cleaned up at the end,falseif not.voidsetModelRepositoryBasePath(java.lang.String basePath)sets the base-path to the model repository.voidsetOutputPath(java.lang.String outputPath)
-
-
-
Method Detail
-
getOutputPath
public java.lang.String getOutputPath()
- Specified by:
getOutputPathin interfaceJMadPreferences- Returns:
- the path where jmad shall write its data
-
setOutputPath
public void setOutputPath(java.lang.String outputPath)
- Specified by:
setOutputPathin interfaceJMadPreferences- Parameters:
outputPath- the path where jmad shall write its data
-
getModelRepositoryBasePath
public java.lang.String getModelRepositoryBasePath()
- Specified by:
getModelRepositoryBasePathin interfaceJMadPreferences- Returns:
- the base path to the model repository or
nullif the property is not set.
-
setModelRepositoryBasePath
public void setModelRepositoryBasePath(java.lang.String basePath)
Description copied from interface:JMadPreferencessets the base-path to the model repository.- Specified by:
setModelRepositoryBasePathin interfaceJMadPreferences- Parameters:
basePath- the new path
-
isCleanupKernelFiles
public boolean isCleanupKernelFiles()
- Specified by:
isCleanupKernelFilesin interfaceJMadPreferences- Returns:
trueif the files created by the kernel should be cleaned up at the end,falseif not.
-
setCleanupKernelFiles
public void setCleanupKernelFiles(boolean cleanup)
Description copied from interface:JMadPreferencesset totrueif the files created by the kernel should be cleaned up at the end,falseif not.- Specified by:
setCleanupKernelFilesin interfaceJMadPreferences- Parameters:
cleanup- the value to set
-
-