public interface RegistryService
Modifier and Type | Method and Description |
---|---|
void |
addProperty(RegistryKey key,
Serializable value)
Assign a value to the registry key, which must be of the form /a/b/c.
|
void |
copy(RegistryKey sourceKey,
RegistryKey targetKey)
Copies the path or value from the source to the target location.
|
void |
delete(RegistryKey key)
Delete the path element or value described by the key.
|
Collection<String> |
getChildElements(RegistryKey key)
Fetches all child elements for the given path.
|
Serializable |
getProperty(RegistryKey key) |
void addProperty(RegistryKey key, Serializable value)
key
- the registry key.value
- any value that can be stored in the repository.Serializable getProperty(RegistryKey key)
key
- the registry key.addProperty(RegistryKey, Serializable)
Collection<String> getChildElements(RegistryKey key)
...
registryService.addValue(KEY_A_B_C_1, VALUE_ONE);
registryService.addValue(KEY_A_B_C_2, VALUE_TWO);
...
assertTrue(registryService.getChildElements(KEY_A_B_null).contains("C"));
...
key
- the registry key with the path. The last element in the path
will be ignored, and can be any acceptable value localname or null.RegistryKey.getPath()
void copy(RegistryKey sourceKey, RegistryKey targetKey)
This is essentially a merge operation. Use delete
first
if the target must be cleaned.
sourceKey
- the source registry key to take values fromtargetKey
- the target registyr key to move the path or value tovoid delete(RegistryKey key)
delete(/a/b/c)
will remove value c from path /a/b.delete(/a/b/null)
will remove node /a/b along with all values and child
elements.key
- the path or value to deleteCopyright © 2005–2017 Alfresco Software. All rights reserved.