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.String
getModelRepositoryBasePath()
java.lang.String
getOutputPath()
boolean
isCleanupKernelFiles()
void
setCleanupKernelFiles(boolean cleanup)
set totrue
if the files created by the kernel should be cleaned up at the end,false
if not.void
setModelRepositoryBasePath(java.lang.String basePath)
sets the base-path to the model repository.void
setOutputPath(java.lang.String outputPath)
-
-
-
Method Detail
-
getOutputPath
public java.lang.String getOutputPath()
- Specified by:
getOutputPath
in interfaceJMadPreferences
- Returns:
- the path where jmad shall write its data
-
setOutputPath
public void setOutputPath(java.lang.String outputPath)
- Specified by:
setOutputPath
in interfaceJMadPreferences
- Parameters:
outputPath
- the path where jmad shall write its data
-
getModelRepositoryBasePath
public java.lang.String getModelRepositoryBasePath()
- Specified by:
getModelRepositoryBasePath
in interfaceJMadPreferences
- 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 interfaceJMadPreferences
- Parameters:
basePath
- the new path
-
isCleanupKernelFiles
public boolean isCleanupKernelFiles()
- Specified by:
isCleanupKernelFiles
in interfaceJMadPreferences
- 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 totrue
if the files created by the kernel should be cleaned up at the end,false
if not.- Specified by:
setCleanupKernelFiles
in interfaceJMadPreferences
- Parameters:
cleanup
- the value to set
-
-