public class UnitTestMockRegistry extends AbstractRegistry
Modifier and Type | Field and Description |
---|---|
protected java.util.Properties |
properties |
Constructor and Description |
---|
UnitTestMockRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
addResource(java.lang.String key,
RegistryResource resource)
Add new registry resource to the map.
|
void |
clearResources()
Clear registry resource map.
|
void |
delete(java.lang.String path)
Deletes a resource in the given path
|
RegistryEntry[] |
getChildren(RegistryEntry entry)
Returns the child elements of a given registry entry
|
RegistryEntry[] |
getDescendants(RegistryEntry entry)
Returns all descendant entries of the given registry entry
|
static UnitTestMockRegistry |
getInstance()
Return initialized UnitTestingExecutor initializeThread object.
|
RegistryEntry |
getRegistryEntry(java.lang.String key)
Get the registry entry for the given key
|
java.util.Properties |
getResourceProperties(java.lang.String entryKey)
Get the resource properties of a given resource
|
boolean |
isResourceExists(java.lang.String path)
Check if a resource exists
|
org.apache.axiom.om.OMNode |
lookup(java.lang.String key)
Perform an actual lookup for for an XML resource as an OMNode for the given key
|
org.apache.axiom.om.OMNode |
lookupFormat(java.lang.String key) |
void |
newNonEmptyResource(java.lang.String path,
boolean isDirectory,
java.lang.String contentType,
java.lang.String content,
java.lang.String propertyName) |
void |
newResource(java.lang.String path,
boolean isDirectory)
Creates a new resource in the given path
|
void |
updateRegistryEntry(RegistryEntry entry)
Updates the registry enrty (metadata about a resource)
|
void |
updateResource(java.lang.String path,
java.lang.Object value)
Updates the value of a resource
|
getConfigurationProperties, getFormat, getProviderClass, getResource, init
public static UnitTestMockRegistry getInstance()
public void addResource(java.lang.String key, RegistryResource resource)
key
- resource keyresource
- resource objectpublic void clearResources()
public org.apache.axiom.om.OMNode lookup(java.lang.String key)
Registry
key
- the key for the registry lookuppublic java.util.Properties getResourceProperties(java.lang.String entryKey)
Registry
getResourceProperties
in interface Registry
getResourceProperties
in class AbstractRegistry
entryKey
- The registry entrypublic RegistryEntry getRegistryEntry(java.lang.String key)
Registry
key
- the registry keypublic org.apache.axiom.om.OMNode lookupFormat(java.lang.String key)
public RegistryEntry[] getChildren(RegistryEntry entry)
Registry
entry
- - parent registry entrypublic RegistryEntry[] getDescendants(RegistryEntry entry)
Registry
entry
- - parent registry entrypublic void delete(java.lang.String path)
Registry
path
- The path the of resourcepublic void newResource(java.lang.String path, boolean isDirectory)
Registry
path
- The new resource pathisDirectory
- Whether resource is a collection or notpublic void newNonEmptyResource(java.lang.String path, boolean isDirectory, java.lang.String contentType, java.lang.String content, java.lang.String propertyName)
path
- new Resource pathisDirectory
- whether the resource is a collection or notcontentType
- content type of the resourcecontent
- resource contentpublic void updateResource(java.lang.String path, java.lang.Object value)
Registry
path
- The resource to be updatedvalue
- The value to be setpublic void updateRegistryEntry(RegistryEntry entry)
Registry
entry
- The registry entrypublic boolean isResourceExists(java.lang.String path)
Registry
path
- The path of the resourceCopyright © 2005-2021 Apache Software Foundation. All Rights Reserved.