Class LocalProperties
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis is the default visit that will be used if no default visit is specified by theGDA_DEF_VISITproperty.static final StringBoolean property that indicates whether GDA access control is enabled.static final Stringstatic final StringBoolean property that indicates whether GDA baton management is enabled.static final StringBeamline name, e.g.static final StringControl whether client should be closed automatically when user session expiresstatic final StringProperty that specifies the GDA configuration folder.static final StringProperty that sets the top-level directory where data is written to.static final StringThe directory in which to keep NumTracker files.static final StringExtension to be used for NumTracker - to keep Nexus and SrsDataFile in stepstatic final StringName of class in package gda.data.scan.datawriter that is called when ScanDataPoints are available to be written Must support interface DataWriterstatic final StringProperty for setting where there is a dataserver running that can access the SWMR files and provide remote datasetsstatic final StringProperty for setting which port has a dataserver running that can access the SWMR files and provide remote datasetsstatic final StringProperty used to provide the 'default' property to gda.data.PathConstructor (in uk.ac.gda.core).static final StringDefault visit number if an ICAT system is not specified; or connection to ICAT fails; or user is a member of staff and has not other available visit ID in the ICAT system.static final StringBoolean property that indicates whether GDA is using the dummy mode configuration.static final StringAn optional property giving the end station name, if different to the beamline name, e.g.static final Stringstatic final StringProperty that specifies the GDA factory name, e.g.static final StringReplaces the gda.root variable.static final StringXML file used by the RCP client.static final StringOption to force application window to open with Intro / Welcome screen (default usually false)static final StringClient properties to be checked for locating the STOP ALL button on the status linestatic final StringOption to save and restore the GUI state between sessions.static final StringStarting height for the GDA application windowstatic final StringMaximise the application window at startupstatic final StringStarting width for the GDA application windowstatic final Stringstatic final StringCommand to execute when "Stop all" button in status line is clickedstatic final StringPrefix for the title of the GDA windowstatic final Stringstatic final Stringstatic final Stringstatic final StringOption to display RCP Workbench default menus (default usually true)static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringOption to display the RCP Perspective barstatic final StringOption to display the RCP main tool barstatic final StringProperty that specifies the client-side XML file.static final StringFile containing beam centre and beam size values for each zoom level; read by gda.images.camera.BeamDataComponent in uk.ac.gda.px.static final StringThe on-screen sample image shows the X axis from left to right, but the image can be flipped.static final StringWhen readingGDA_IMAGES_DISPLAY_CONFIG_FILE, if this is set totrue, the firstcrosshairXandcrosshairYvalues will be used for all zoom levels.static final StringProperty to set the initial length units for fields (xStart, fastAxisStep etc) in the Mapping GUIstatic final StringThe name of the instrument.static final StringProperty that specifies the folder into which all logs files should be placed.static final Stringstatic final Stringstatic final StringProperty that specifies the GDA running mode, e.g.static final StringProperty to choose whether to use the persistence service or file base persistencestatic final StringProperty that specifies a single GDA properties file.static final StringWhether beam axis movements should be considered when moving the sample.static final StringProperty that allows the beamline-specific orientation of the X/Y/Z axes to be specified.static final StringProperty that specifies the direction of a +ve omega rotation when viewed from behind the goniometer, with the beam going from left to right.static final StringThe number of ScanDataPoints that can be in a gda.scan.MultithreadedScanDataPointPipeline before it starts blocking new requests.static final StringThe number of ScanDataPoints that can be in a gda.scan.MultithreadedScanDataPointPipeline before it starts blocking new requests.static final StringThe number of threads used by a scan to convert position Callables from PositionCallableProviding Scannables to Object positions.static final Stringstatic final StringProperty that specifies the time in millis between isBusy polls in ScannableBase#waitWhileBusy().static final StringLocation of the server status portstatic final Stringstatic final StringPort number on which client can obtain status information from the GDA serverstatic final intDefault value forGDA_SERVER_STATUS_PORTstatic final StringOption to display visit name as data folder name in Data Projectstatic final StringThe location of a global read-write directory for persistence of information which is continued to be used on the same beamline from version to version of GDA.static final StringProperty used to provide the path of the root of the visitstatic final StringThe user name (federalid) which the current RCP application is running under.static final StringThe visit which the current RCP application is running under. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanGet a boolean property value using a specified key string.static booleanGet a boolean property value using a specified key string.static voidstatic voidstatic voidclearProperty(String key) Remove a property from the configurationstatic booleanstatic voidstatic voidstatic StringGet a string property value using a specified key string with windows path separator "\\" being replaced by "/".static StringGet a string property value using a specified key string.static StringDeprecated, for removal: This API element is subject to removal in a future version.static intGet the value of the named property as anintvalue.static intGet the value of the named property as anintvalue.getAsIntList(String propertyName) getAsIntList(String propertyName, Integer[] defaultValue) static Stringstatic Stringstatic Stringstatic doubleGet a double property value using a specified key string.static StringgetFirstKeyByRegexp(String regex, String defaultKey) Returns the first property key matching a regular expressionstatic intGet an integer property value using a specified key string.getKeysByRegexp(String regex) Returns a list of property keys matching a regular expressionstatic Stringstatic StringGet a file path property value using a specified key string.static String[]getStringArray(String propertyName) static StringIf the property gda.var is not defined, then it is assumed that there is a var dir inside the config directory (where var was previously recommended to be placed)static booleanDetermines whether access control is enabled.static booleanDetermines whether baton management is enabled.static booleanDetermines whether GDA is using the dummy mode configuration.static booleanstatic booleanstatic voidAssign a string property value to a specified key string.static voidAssign a string property value to a specified key string.static voidsetActiveMQBrokerURI(String brokerURI) Deprecated, for removal: This API element is subject to removal in a future version.static voidsetBrokerURI(String brokerURI) static voidsetProperties(PropertiesConfig properties) static voidsetScanSetsScanNumber(boolean enable) static voidUse to undoforceActiveMQEmbeddedBroker()between unit tests i.e.static boolean
-
Field Details
-
GDA_GIT_LOC
Replaces the gda.root variable.The system property which defines the top-level folder holding the various git repositories which make up this gda installation.
It should not be assumed that the configuration files are relative to this location. This is defined by GDA_CONFIG
- See Also:
-
GDA_DATA
Property that sets the top-level directory where data is written to. The actual directory the data writers should use is defined by gda.data.scan.datawriter.datadir. That property may be dynamic and vary as the current visit varies, but the gda.data property should be static at runtime.- See Also:
-
GDA_DATA_SCAN_DATAWRITER_DATAFORMAT
Name of class in package gda.data.scan.datawriter that is called when ScanDataPoints are available to be written Must support interface DataWriter- See Also:
-
GDA_VISIT_DIR
Property used to provide the path of the root of the visit- See Also:
-
GDA_DATAWRITER_DIR
Property used to provide the 'default' property to gda.data.PathConstructor (in uk.ac.gda.core). This in turn is used by *many* classes to determine where scan files or images should be written.- See Also:
-
GDA_DATA_NUMTRACKER
The directory in which to keep NumTracker files. (See NumTracker for alternative ways to specify this).- See Also:
-
GDA_CONFIG
Property that specifies the GDA configuration folder.- See Also:
-
GDA_VAR_DIR
The location of a global read-write directory for persistence of information which is continued to be used on the same beamline from version to version of GDA.Has been config/var but the recommended location is outside of the configuration directory, at the same level that different GDA installations are located.
Directory in which gda.data.NumTracker files are stored.
- See Also:
-
GDA_LOGS_DIR
Property that specifies the folder into which all logs files should be placed.- See Also:
-
GDA_PROPERTIES_FILE
Property that specifies a single GDA properties file.- See Also:
-
GDA_FACTORY_NAME
Property that specifies the GDA factory name, e.g. "stnBase" or "i04-1".- See Also:
-
GDA_DUMMY_MODE_ENABLED
Boolean property that indicates whether GDA is using the dummy mode configuration.- See Also:
-
GDA_MODE
Property that specifies the GDA running mode, e.g. "dummy", "live" or any other defined running mode- See Also:
-
GDA_ACCESS_CONTROL_ENABLED
Boolean property that indicates whether GDA access control is enabled.- See Also:
-
GDA_BATON_MANAGEMENT_ENABLED
Boolean property that indicates whether GDA baton management is enabled.- See Also:
-
GDA_SCANNABLEBASE_POLLTIME
Property that specifies the time in millis between isBusy polls in ScannableBase#waitWhileBusy().- See Also:
-
GDA_GUI_XML
Property that specifies the client-side XML file.- See Also:
-
GDA_GUI_BEANS_XML
XML file used by the RCP client.- See Also:
-
GDA_IMAGES_DISPLAY_CONFIG_FILE
File containing beam centre and beam size values for each zoom level; read by gda.images.camera.BeamDataComponent in uk.ac.gda.px.- See Also:
-
GDA_IMAGES_SINGLE_BEAM_CENTRE
When readingGDA_IMAGES_DISPLAY_CONFIG_FILE, if this is set totrue, the firstcrosshairXandcrosshairYvalues will be used for all zoom levels.- See Also:
-
GDA_BEAMLINE_NAME
Beamline name, e.g."i02".- See Also:
-
GDA_IMAGES_HORIZONTAL_DIRECTION
The on-screen sample image shows the X axis from left to right, but the image can be flipped. This property indicates which edge of the image is the +ve side -"left"or"right".- See Also:
-
GDA_PX_SAMPLE_CONTROL_AXIS_ORIENTATION
Property that allows the beamline-specific orientation of the X/Y/Z axes to be specified. It should be a matrix, in the form- See Also:
-
GDA_PX_SAMPLE_CONTROL_OMEGA_DIRECTION
Property that specifies the direction of a +ve omega rotation when viewed from behind the goniometer, with the beam going from left to right. Should be "clockwise" or "anticlockwise".- See Also:
-
GDA_PX_SAMPLE_CONTROL_ALLOW_BEAM_AXIS_MOVEMENT
Whether beam axis movements should be considered when moving the sample. Should betrueorfalse.- See Also:
-
GDA_DEF_VISIT
Default visit number if an ICAT system is not specified; or connection to ICAT fails; or user is a member of staff and has not other available visit ID in the ICAT system.- See Also:
-
GDA_INSTRUMENT
The name of the instrument. This property should always be defined.If
gda.beamline.nameis defined, as it should be on all Diamond beamlines, then this property should be considered a synonym for that one and therefore must always be set to the same value. The more general name is intended for when GDA is used outside outside of a beamline.- See Also:
-
GDA_END_STATION_NAME
An optional property giving the end station name, if different to the beamline name, e.g. PEEM or VXMi.- See Also:
-
GDA_FACILITY
- See Also:
-
DEFAULT_VISIT
This is the default visit that will be used if no default visit is specified by theGDA_DEF_VISITproperty.- See Also:
-
RCP_APP_VISIT
The visit which the current RCP application is running under. This should NOT be set in a java.properties file but set at runtime once the RCP process has identified which value it wishes to use.For times when the metadata value is misleading to client-side objects.
- See Also:
-
RCP_APP_USER
The user name (federalid) which the current RCP application is running under. This should NOT be set in a java.properties file but set at runtime once the RCP process has identified which value it wishes to use.For times when the metadata value is misleading to client-side objects.
- See Also:
-
GDA_DATA_NUMTRACKER_EXTENSION
Extension to be used for NumTracker - to keep Nexus and SrsDataFile in step- See Also:
-
GDA_SCAN_MULTITHREADED_SCANDATA_POINT_PIPElINE_LENGTH
The number of ScanDataPoints that can be in a gda.scan.MultithreadedScanDataPointPipeline before it starts blocking new requests. i.e. the number of points 'behind' the collection completed points can get.- See Also:
-
GDA_SCAN_CONCURRENTSCAN_READOUT_CONCURRENTLY
The number of ScanDataPoints that can be in a gda.scan.MultithreadedScanDataPointPipeline before it starts blocking new requests. i.e. the number of points 'behind' the collection completed points can get.- See Also:
-
GDA_SCAN_MULTITHREADED_SCANDATA_POINT_PIPElINE_POINTS_TO_COMPUTE_SIMULTANEOUSELY
public static final String GDA_SCAN_MULTITHREADED_SCANDATA_POINT_PIPElINE_POINTS_TO_COMPUTE_SIMULTANEOUSELYThe number of threads used by a scan to convert position Callables from PositionCallableProviding Scannables to Object positions.- See Also:
-
GDA_GUI_FORCE_INTRO
Option to force application window to open with Intro / Welcome screen (default usually false)- See Also:
-
GDA_GUI_SAVE_RESTORE
Option to save and restore the GUI state between sessions. Default 'true'. If 'true' the setting to force the Intro/Welcome Screen may have no effect- See Also:
-
GDA_GUI_START_WIDTH
Starting width for the GDA application window- See Also:
-
GDA_GUI_START_HEIGHT
Starting height for the GDA application window- See Also:
-
GDA_GUI_START_MAXIMISE
Maximise the application window at startup- See Also:
-
GDA_GUI_TITLEBAR_PREFIX
Prefix for the title of the GDA window- See Also:
-
GDA_GUI_TITLEBAR_SUFFIX
- See Also:
-
GDA_GUI_USE_ACTIONS_NEW
Option to display RCP Workbench default menus (default usually true)- See Also:
-
GDA_GUI_USE_ACTIONS_SEARCH
- See Also:
-
GDA_GUI_USE_ACTIONS_RUN
- See Also:
-
GDA_GUI_USE_ACTIONS_PERSPECTIVE_CUSTOM
- See Also:
-
GDA_GUI_USE_ACTIONS_NEW_EDITOR
- See Also:
-
GDA_GUI_USE_ACTIONS_NEW_WINDOW
- See Also:
-
GDA_GUI_USE_ACTIONS_EXPORT
- See Also:
-
GDA_GUI_USE_ACTIONS_IMPORT
- See Also:
-
GDA_GUI_USE_PERSPECTIVE_BAR
Option to display the RCP Perspective bar- See Also:
-
GDA_GUI_USE_TOOL_BAR
Option to display the RCP main tool bar- See Also:
-
GDA_GUI_STOP_ALL_COMMAND_ID
Command to execute when "Stop all" button in status line is clicked- See Also:
-
GDA_GUI_FORCE_LEFT_STOP_ALL
Client properties to be checked for locating the STOP ALL button on the status line- See Also:
-
GDA_GUI_STATUS_HIDE_STOP_ALL
- See Also:
-
GDA_SCAN_SETS_SCANNUMBER
- See Also:
-
GDA_MESSAGE_BROKER_IMPL
- See Also:
-
GDA_MESSAGE_BROKER_URI
- See Also:
-
GDA_ACTIVEMQ_BROKER_URI
- See Also:
-
GDA_SHOW_VISIT_NAME_AS_DATA_FOLDER_NAME
Option to display visit name as data folder name in Data Project- See Also:
-
GDA_SERVER_HOST
Location of the server status port- See Also:
-
GDA_SERVER_STATUS_PORT
Port number on which client can obtain status information from the GDA server- See Also:
-
GDA_SERVER_SCAN_PRINT_SUPPRESS_HEADER
- See Also:
-
GDA_SERVER_STATUS_PORT_DEFAULT
public static final int GDA_SERVER_STATUS_PORT_DEFAULTDefault value forGDA_SERVER_STATUS_PORT- See Also:
-
GDA_DATASERVER_HOST
Property for setting where there is a dataserver running that can access the SWMR files and provide remote datasets- See Also:
-
GDA_DATASERVER_PORT
Property for setting which port has a dataserver running that can access the SWMR files and provide remote datasets- See Also:
-
GDA_INITIAL_LENGTH_UNITS
Property to set the initial length units for fields (xStart, fastAxisStep etc) in the Mapping GUI- See Also:
-
GDA_CHECK_USER_VISIT_VALID
Control whether client should be closed automatically when user session expires- See Also:
-
GDA_PERSISTENCE_SERVICE_ENABLED
Property to choose whether to use the persistence service or file base persistence- See Also:
-
-
Method Details
-
getActiveMQBrokerURI
Deprecated, for removal: This API element is subject to removal in a future version. -
setActiveMQBrokerURI
@Deprecated(since="GDA 9.33", forRemoval=true) public static void setActiveMQBrokerURI(String brokerURI) Deprecated, for removal: This API element is subject to removal in a future version. -
getBrokerURI
-
setBrokerURI
-
clearBrokerURI
public static void clearBrokerURI() -
unsetActiveMQBrokerURI
public static void unsetActiveMQBrokerURI()Use to undoforceActiveMQEmbeddedBroker()between unit tests i.e. call from @org.junit.AfterClass annotated tearDownClass method. -
forceActiveMQEmbeddedBroker
public static void forceActiveMQEmbeddedBroker()For unit tests i.e. call from @org.junit.BeforeClass annotated setUpClass method. Undo withunsetActiveMQBrokerURI()(orsetActiveMQBrokerURI(String)). -
isScanSetsScanNumber
public static boolean isScanSetsScanNumber() -
setScanSetsScanNumber
public static void setScanSetsScanNumber(boolean enable) -
setProperties
-
dumpProperties
public static void dumpProperties() -
get
Get a string property value using a specified key string with windows path separator "\\" being replaced by "/".- Parameters:
propertyName- the key specified to fetch the string value- Returns:
- the property value to return to the caller
-
check
Get a boolean property value using a specified key string. No default is specified and "false" is returned if no key is found.- Parameters:
propertyName- the key specified to fetch the boolean value- Returns:
- the property value to return to the caller. Returns false if key is not found.
-
check
Get a boolean property value using a specified key string.- Parameters:
propertyName- the key specified to fetch the boolean valuedefaultCheck- the default value to return if the key is not found- Returns:
- the property value to return to the caller
-
getInt
Get an integer property value using a specified key string.- Parameters:
propertyName- the key specified to fetch the integer valuedefaultValue- the default value to return if the key is not found- Returns:
- the property value to return to the caller
-
getDouble
Get a double property value using a specified key string.- Parameters:
propertyName- the key specified to fetch the double valuedefaultValue- the default value to return if the key is not found- Returns:
- the property value to return to the caller
-
get
Get a string property value using a specified key string.- Parameters:
propertyName- the key specified to fetch the string valuedefaultValue- the default value to return if the key is not found- Returns:
- the property value to return to the caller
-
getPath
Get a file path property value using a specified key string.- Parameters:
name- the key specified to fetch the file path valuedefaultValue- the default value to return if the key is not found- Returns:
- the property value to return to the caller
-
set
Assign a string property value to a specified key string.- Parameters:
propertyName- the key specified to assign to the valuevalue- the string value to assign to the specified key
-
set
Assign a string property value to a specified key string.- Parameters:
propertyName- the key specified to assign to the valuevalue- the string value to assign to the specified key
-
isDummyModeEnabled
public static boolean isDummyModeEnabled()Determines whether GDA is using the dummy mode configuration.- Returns:
- true if GDA is using the dummy mode configuration; false otherwise. False is default to make dummy mode the exception.
-
isAccessControlEnabled
public static boolean isAccessControlEnabled()Determines whether access control is enabled.- Returns:
- true if access control is enabled; false otherwise. False is default to keep original behaviour.
-
isBatonManagementEnabled
public static boolean isBatonManagementEnabled()Determines whether baton management is enabled.- Returns:
- true if baton management is enabled; false otherwise. False is default to keep original behaviour.
-
useReducedGUI
public static boolean useReducedGUI()- Returns:
- true if the client should use the reduced gui when the baton control is enabled and another client on a different visit holds the baton. True by default.
-
getParentGitDir
- Returns:
- String
-
getConfigDir
- Returns:
- String
-
getVarDir
If the property gda.var is not defined, then it is assumed that there is a var dir inside the config directory (where var was previously recommended to be placed)- See Also:
-
getBaseDataDir
- Returns:
- String
- See Also:
-
isPersistenceServiceAvailable
public static boolean isPersistenceServiceAvailable()- Returns:
- if the persistence service is available
-
stringToIntList
- Parameters:
s-- Returns:
- list of integers from a csv string e.g. 1,2 yields [1,2] returns null if property
-
getAsIntList
- Parameters:
propertyName-- Returns:
- Value of a property as a list of integers e.g. a value of 1 2 3 returns [1,2,3]. DO NOT USE commas
-
getAsIntList
- Parameters:
propertyName-defaultValue- The list of default values to return if the propertyName does not exist- Returns:
- Value of a property as a list of integers e.g. a value of 1 2 3 returns [1,2,3]. DO NOT USE commas
-
getAsInt
Get the value of the named property as anintvalue.This method will throw NullPointerException if the property is undefined. To avoid this, call
getAsInt(String, int)instead.- Parameters:
propertyName- the property to find- Returns:
- the value of the named property, as an int
- Throws:
NullPointerException- if the named property is not definedNumberFormatException- if the named property is defined but cannot be parsed as an int
-
getAsInt
Get the value of the named property as anintvalue. If the property is not defined, the given default value is returned.- Parameters:
propertyName- the property to finddefaultValue- the value to return if the propertyName is not defined- Returns:
- the value of the named property, as an int
- Throws:
NumberFormatException- if the named property is defined but cannot be parsed as an int
-
contains
-
clearProperty
Remove a property from the configuration- Parameters:
key-
-
checkForObsoleteProperties
public static void checkForObsoleteProperties() -
getStringArray
-
getKeysByRegexp
Returns a list of property keys matching a regular expression- Parameters:
regex- the regular expression to match- Returns:
- a
Listof keys
-
getFirstKeyByRegexp
Returns the first property key matching a regular expression- Parameters:
regex- the regular expression to matchdefaultKey- the default value if no key is found- Returns:
- a the first key that matches
String, otherwise thedefaultKey
-