public class UnitTestMockRegistry extends AbstractRegistry
Modifier and Type | Field and Description |
---|---|
protected Properties |
properties |
Constructor and Description |
---|
UnitTestMockRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
addResource(String key,
RegistryResource resource)
Add new registry resource to the map.
|
void |
clearResources()
Clear registry resource map.
|
void |
delete(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(String key)
Get the registry entry for the given key
|
Properties |
getResourceProperties(String entryKey)
Get the resource properties of a given resource
|
boolean |
isResourceExists(String path)
Check if a resource exists
|
org.apache.axiom.om.OMNode |
lookup(String key)
Perform an actual lookup for for an XML resource as an OMNode for the given key
|
org.apache.axiom.om.OMNode |
lookupFormat(String key) |
void |
newNonEmptyResource(String path,
boolean isDirectory,
String contentType,
String content,
String propertyName) |
void |
newResource(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(String path,
Object value)
Updates the value of a resource
|
getConfigurationProperties, getFormat, getProviderClass, getResource, init
protected final Properties properties
public static UnitTestMockRegistry getInstance()
public void addResource(String key, RegistryResource resource)
key
- resource keyresource
- resource objectpublic void clearResources()
public org.apache.axiom.om.OMNode lookup(String key)
Registry
key
- the key for the registry lookuppublic Properties getResourceProperties(String entryKey)
Registry
getResourceProperties
in interface Registry
getResourceProperties
in class AbstractRegistry
entryKey
- The registry entrypublic RegistryEntry getRegistryEntry(String key)
Registry
key
- the registry keypublic org.apache.axiom.om.OMNode lookupFormat(String key)
public RegistryEntry[] getChildren(RegistryEntry entry)
Registry
entry
- - parent registry entrypublic RegistryEntry[] getDescendants(RegistryEntry entry)
Registry
entry
- - parent registry entrypublic void delete(String path)
Registry
path
- The path the of resourcepublic void newResource(String path, boolean isDirectory)
Registry
path
- The new resource pathisDirectory
- Whether resource is a collection or notpublic void newNonEmptyResource(String path, boolean isDirectory, String contentType, String content, String propertyName)
path
- new Resource pathisDirectory
- whether the resource is a collection or notcontentType
- content type of the resourcecontent
- resource contentpublic void updateResource(String path, Object value)
Registry
path
- The resource to be updatedvalue
- The value to be setpublic void updateRegistryEntry(RegistryEntry entry)
Registry
entry
- The registry entryCopyright © 2005–2023 Apache Software Foundation. All rights reserved.