org.apache.archiva.redback.components.registry.Registry |
Known Indirect Subclasses |
The Plexus registry is a single source of external configuration for Plexus components and applications. It can be used by components to source configuration, knowing that it can be used from within applications without the information being hard coded into the component.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a change listener.
| |||||||||||
Load configuration from the given file.
| |||||||||||
Load configuration from the given file.
| |||||||||||
Load configuration from the given classloader resource.
| |||||||||||
Load configuration from the given classloader resource.
| |||||||||||
Dump the entire registry to a string, for debugging purposes.
| |||||||||||
Get a boolean value from the registry.
| |||||||||||
Get a boolean value from the registry.
| |||||||||||
Get all the keys in this registry.
| |||||||||||
Get an integer value from the registry.
| |||||||||||
Get an integer value from the registry.
| |||||||||||
Get all the keys in this registry.
| |||||||||||
Get a list of strings at the given key in the registry.
| |||||||||||
TODO move to Map which is more generic ?
Get the properties at the given key in the registry.
| |||||||||||
Get a subsection of the registry, identified by the given name.
| |||||||||||
Get a string value from the registry.
| |||||||||||
Get a string value from the registry.
| |||||||||||
Get a subset of the registry, for all keys descended from the given key.
| |||||||||||
Get a list of subsets of the registry, for all keys descended from the given key.
| |||||||||||
Determine if the registry contains any elements.
| |||||||||||
Remove a keyed element from the registry.
| |||||||||||
Remove a keyed subset of the registry.
| |||||||||||
Save any changes to the registry since it was loaded.
| |||||||||||
Set a boolean value in the registry.
| |||||||||||
Set an integer value in the registry.
| |||||||||||
Set a string value in the registry.
|
Add a change listener. Note that settings this on the base registry will only detect 'invalidation' events, not individual changes. You should retrieve the named sub-registry to listen for changes.
listener | the listener |
---|
Load configuration from the given file.
file | the location to load the configuration from |
---|
RegistryException | if a problem occurred reading the resource to add to the registry |
---|
Load configuration from the given file.
file | the location to load the configuration from |
---|---|
prefix | the location to add the configuration at in the registry |
RegistryException | if a problem occurred reading the resource to add to the registry |
---|
Load configuration from the given classloader resource.
resource | the location to load the configuration from |
---|
RegistryException | if a problem occurred reading the resource to add to the registry |
---|
Load configuration from the given classloader resource.
resource | the location to load the configuration from |
---|---|
prefix | the location to add the configuration at in the registry |
RegistryException | if a problem occurred reading the resource to add to the registry |
---|
Dump the entire registry to a string, for debugging purposes.
Get a boolean value from the registry. If not found, the default value is used.
key | the key in the registry |
---|---|
defaultValue | the default value |
Get a boolean value from the registry. If not found, an exception is thrown.
key | the key in the registry |
---|
NoSuchElementException | if the key is not found |
---|
Get all the keys in this registry.
Get an integer value from the registry. If not found, an exception is thrown.
key | the key in the registry |
---|
NoSuchElementException | if the key is not found |
---|
Get an integer value from the registry. If not found, the default value is used.
key | the key in the registry |
---|---|
defaultValue | the default value |
Get all the keys in this registry. Keys are only retrieved at a depth of 1.
Get a list of strings at the given key in the registry.
key | the key to lookup |
---|
TODO move to Map which is more generic ? Get the properties at the given key in the registry.
key | the key to lookup |
---|
Get a subsection of the registry, identified by the given name. If it doesn't exist, null
will be
returned.
name | registry section name |
---|
Get a string value from the registry. If not found, the default value is used.
key | the key in the registry |
---|---|
defaultValue | the default value |
Get a string value from the registry. If not found, null
is returned.
key | the key in the registry |
---|
Get a subset of the registry, for all keys descended from the given key.
key | the key to take the subset from |
---|
Get a list of subsets of the registry, for all keys descended from the given key.
key | the key to take the subsets from |
---|
Determine if the registry contains any elements.
Remove a keyed element from the registry.
key | the key to remove |
---|
Remove a keyed subset of the registry.
key | the subset to remove |
---|
Save any changes to the registry since it was loaded.
RegistryException | if there was a problem saving the registry |
---|---|
UnsupportedOperationException | if the registry is not writable |
Set a boolean value in the registry.
key | the key in the registry |
---|---|
value | the value to set |
Set an integer value in the registry.
key | the key in the registry |
---|---|
value | the value to set |
Set a string value in the registry.
key | the key in the registry |
---|---|
value | the value to set |