public class Preference extends Object implements org.springframework.beans.factory.BeanNameAware
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.Modifier and Type | Class and Description |
---|---|
static class |
Preference.Visibility |
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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
|
public Preference()
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".public Preference(String beanName, boolean mutable, Preference.Visibility visibility, String[] aliases)
public String getName()
public void setBeanName(String beanName)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
beanName
- the name of the bean in the factory.
Note that this name is the actual bean name used in the factory, which may
differ from the originally specified name: in particular for inner bean
names, the actual bean name might have been made unique through appending
"#..." suffixes. Use the BeanFactoryUtils.originalBeanName(String)
method to extract the original bean name (without suffix), if desired.public void setMutable(boolean mutable)
public Preference.Visibility getVisibility()
public void setVisibility(Preference.Visibility visibility)
public boolean hasAlias(String key)
public void setAliases(String[] aliases)
public boolean isDb()
public void setDb(boolean db)
public boolean isPrefs()
public void setPrefs(boolean prefs)
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.