Deprecated
as of 5.2, along with PropertyPlaceholderConfigurer
java.util.prefs).
Tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in this configurer's properties. Thus, behaves like PropertyPlaceholderConfigurer if no corresponding preferences defined.
Supports custom paths for the system and user preferences trees. Also supports custom paths specified in placeholders ("myPath/myPlaceholderKey"). Uses the respective root node if not specified.
setSystemTreePath, setUserTreePath, java.util.prefs.Preferences
| Modifier and Type | Field and Description |
|---|---|
| private Preferences | |
| private String | |
| private Preferences | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. |
| protected String | resolvePlaceholder(String
the placeholder to resolve placeholder, Properties the merged properties of this configurer props)Overrides org. |
| protected String | Returns: the value for the placeholder, ornull if none foundthe preferences path (placeholder part before '/') path, String the preferences key (placeholder part after '/') key, Preferences the Preferences to resolve against preferences)Resolve the given path and key against the given Preferences. |
| public void | setSystemTreePath(String systemTreePath)
Set the path in the system preferences tree to use for resolving placeholders. |
| public void | setUserTreePath(String userTreePath)
Set the path in the system preferences tree to use for resolving placeholders. |
| systemPrefs | back to summary |
|---|---|
| private Preferences systemPrefs | |
| systemTreePath | back to summary |
|---|---|
| private String systemTreePath
| |
| userPrefs | back to summary |
|---|---|
| private Preferences userPrefs | |
| userTreePath | back to summary |
|---|---|
| private String userTreePath
| |
| PreferencesPlaceholderConfigurer | back to summary |
|---|---|
| public PreferencesPlaceholderConfigurer() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. This implementation eagerly fetches the Preferences instances for the required system and user tree nodes.
| |
| resolvePlaceholder | back to summary |
|---|---|
| protected String resolvePlaceholder(String placeholder, Properties props) Overrides org. This implementation tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in the passed-in properties.
| |
| resolvePlaceholder | back to summary |
|---|---|
| protected String resolvePlaceholder(String path, String key, Preferences preferences) Resolve the given path and key against the given Preferences.
| |
| setSystemTreePath | back to summary |
|---|---|
| public void setSystemTreePath(String systemTreePath) Set the path in the system preferences tree to use for resolving placeholders. Default is the root node. | |
| setUserTreePath | back to summary |
|---|---|
| public void setUserTreePath(String userTreePath) Set the path in the system preferences tree to use for resolving placeholders. Default is the root node. | |