Package ome.system
Class PreferenceContext
- java.lang.Object
-
- org.springframework.core.io.support.PropertiesLoaderSupport
-
- org.springframework.beans.factory.config.PropertyResourceConfigurer
-
- org.springframework.beans.factory.config.PlaceholderConfigurerSupport
-
- org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
-
- ome.system.PreferenceContext
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.config.BeanFactoryPostProcessor
,org.springframework.core.Ordered
,org.springframework.core.PriorityOrdered
public class PreferenceContext extends org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
Central configuration for OMERO properties from (in order):- Any injected
Properties
instances - Java
System.getProperties()
- Any configured property files
ome.services.blitz.Entry
places the values in {#linkSystem.getProperties()
.- Since:
- 3.0-Beta3
- See Also:
- #800
-
-
Field Summary
-
Fields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
-
Fields inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparator
-
-
Constructor Summary
Constructors Constructor Description PreferenceContext()
By default, configures this instance forPropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE
as well as ignoring unfound resources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRead(EventContext ec, java.lang.String key)
boolean
checkDatabase(java.lang.String key)
java.util.Set<java.lang.String>
getKeySet()
java.lang.String
getProperty(java.lang.String key)
Lookup method for getting access to themerged properties
for this instance.void
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory bf)
java.lang.String
resolveAlias(java.lang.String key)
void
setPreferences(java.util.List<Preference> preferences)
void
setProperty(java.lang.String key, java.lang.String value)
With ticket:2214, preferences are no longer mutable.-
Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
parseStringValue, processProperties, resolvePlaceholder, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
-
Methods inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparator
-
Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer
convertProperties, convertProperty, convertPropertyValue, getOrder, setOrder
-
-
-
-
Method Detail
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory bf)
- Specified by:
postProcessBeanFactory
in interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor
- Overrides:
postProcessBeanFactory
in classorg.springframework.beans.factory.config.PropertyResourceConfigurer
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Lookup method for getting access to themerged properties
for this instance.
-
setProperty
public void setProperty(java.lang.String key, java.lang.String value)
With ticket:2214, preferences are no longer mutable. For that, we will need a python server which can update the XML file.
-
setPreferences
public void setPreferences(java.util.List<Preference> preferences)
-
resolveAlias
public java.lang.String resolveAlias(java.lang.String key)
-
getKeySet
public java.util.Set<java.lang.String> getKeySet()
-
checkDatabase
public boolean checkDatabase(java.lang.String key)
-
canRead
public boolean canRead(EventContext ec, java.lang.String key)
-
-