ome.system
Class Preference

java.lang.Object
  extended by ome.system.Preference
All Implemented Interfaces:
org.springframework.beans.factory.BeanNameAware

public class Preference
extends Object
implements org.springframework.beans.factory.BeanNameAware

Definition of a server configuration variable ("preference") along with its mutability, visibility, aliases and other important information. These preferences are defined in ome/config.xml along with the PreferenceContext, and the default values are defined in the etc/*.properties files which get stored in the final jars. For any configuration which does not have an explicit mapping, the default will be as if "new Preference()" is called. See the individual fields below for more information.

Since:
4.0
Author:
Josh Moore, josh at glencoesoftware.com
See Also:
#800

Nested Class Summary
static class Preference.Visibility
           
 
Constructor Summary
Preference()
          By default, configures this instance for PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE as well as ignoring unfound resources.
Preference(String beanName, boolean mutable, Preference.Visibility visibility, String[] aliases)
           
 
Method Summary
 String getName()
           
 Preference.Visibility getVisibility()
           
 boolean hasAlias(String key)
           
 boolean isDb()
           
 boolean isPrefs()
           
 void setAliases(String[] aliases)
          Setter injector
 void setBeanName(String beanName)
          Setter injector
 void setDb(boolean db)
          Setter injector
 void setMutable(boolean mutable)
          Setter injector
 void setPrefs(boolean prefs)
           
 void setVisibility(Preference.Visibility visibility)
          Setter injector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Preference

public Preference()
By default, configures this instance for PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE as well as ignoring unfound resources. The #setUserTreePath(String) user-tree is set according to a similar logic as in the prefs command-line tool, using first #ENV from the environment if present, otherwise the value of "omero.prefs.default".


Preference

public Preference(String beanName,
                  boolean mutable,
                  Preference.Visibility visibility,
                  String[] aliases)
Method Detail

getName

public String getName()

setBeanName

public void setBeanName(String beanName)
Setter injector

Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

setMutable

public void setMutable(boolean mutable)
Setter injector


getVisibility

public Preference.Visibility getVisibility()

setVisibility

public void setVisibility(Preference.Visibility visibility)
Setter injector


hasAlias

public boolean hasAlias(String key)

setAliases

public void setAliases(String[] aliases)
Setter injector


isDb

public boolean isDb()

setDb

public void setDb(boolean db)
Setter injector


isPrefs

public boolean isPrefs()

setPrefs

public void setPrefs(boolean prefs)


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

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