public class SystemPropertiesRepository extends Object implements Repository
Repository class providing access to System properties.
A prefix for all key lookups can be defined with SystemPropertiesRepository(String).
The default prefix is empty.System.getProperties(),
System.getProperty(String)| Constructor and Description |
|---|
SystemPropertiesRepository()
Creates a new instance of
SystemPropertiesRepository with the default settings,
i. |
SystemPropertiesRepository(String prefix)
Creates a new instance of
SystemPropertiesRepository with the given prefix. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underlying data source when it isn't require any more.
|
void |
open()
Opens the configuration repository, e.
|
String |
read(String name)
Reads the configuration parameter name from the backing data source.
|
int |
size() |
public SystemPropertiesRepository()
SystemPropertiesRepository with the default settings,
i. e. no prefix.public SystemPropertiesRepository(String prefix)
SystemPropertiesRepository with the given prefix.prefix - The prefix used for key lookups, e. g. "custom.".public void open()
throws RepositoryException
Repositoryopen in interface RepositoryRepositoryException - If an error occurred while opening the data sourcepublic String read(String name)
Repositoryread in interface Repositoryname - The parameter nameStringpublic void close()
throws RepositoryException
Repositoryclose in interface RepositoryRepositoryException - If an error occurred while closing the underlying data sourcepublic int size()
Copyright © 2022. All rights reserved.