ome.system
Class PreferenceContext

java.lang.Object
  extended by org.springframework.core.io.support.PropertiesLoaderSupport
      extended by org.springframework.beans.factory.config.PropertyResourceConfigurer
          extended by org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
              extended by ome.system.PreferenceContext
All Implemented Interfaces:
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):

As of OMERO 4.2, server configurations are not stored in Java's Preferences API but in an IceGrid xml file under etc/grid of the server installation. The properties are set in the config file on node startup, for example in var/master/servers/Blitz-0/config/config. When the Java process starts, Entry places the values in {#link System.getProperties().

Since:
3.0-Beta3
Author:
Josh Moore, josh at glencoesoftware.com
See Also:
#800

Field Summary
 
Fields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
 
Fields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
logger, XML_FILE_EXTENSION
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
PreferenceContext()
          By default, configures this instance for PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE as well as ignoring unfound resources.
 
Method Summary
 boolean canRead(EventContext ec, String key)
           
 boolean checkDatabase(String key)
           
 String getProperty(String key)
          Lookup method for getting access to the merged properties for this instance.
 String resolveAlias(String key)
           
 void setPreferences(List<Preference> preferences)
           
 void setProperty(String key, 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, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
 
Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer
convertProperties, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder
 
Methods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferenceContext

public PreferenceContext()
By default, configures this instance for PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE as well as ignoring unfound resources.

Method Detail

getProperty

public String getProperty(String key)
Lookup method for getting access to the merged properties for this instance.


setProperty

public void setProperty(String key,
                        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(List<Preference> preferences)

resolveAlias

public String resolveAlias(String key)

checkDatabase

public boolean checkDatabase(String key)

canRead

public boolean canRead(EventContext ec,
                       String key)


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.