Class ESBRegistry
- java.lang.Object
-
- org.apache.synapse.registry.AbstractRegistry
-
- org.wso2.carbon.mediation.registry.ESBRegistry
-
- All Implemented Interfaces:
org.apache.synapse.registry.Registry
public class ESBRegistry extends org.apache.synapse.registry.AbstractRegistry
Registry implementation for ESB. This assumes that registry resources can be accessed using FILE system or http. Registry meta data are accessed using web services.
-
-
Field Summary
Fields Modifier and Type Field Description static int
FILE
static int
HTTP
static int
HTTPS
static String
URL_SEPARATOR
static char
URL_SEPARATOR_CHAR
-
Constructor Summary
Constructors Constructor Description ESBRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(String path)
long
getCachableDuration()
org.apache.synapse.registry.RegistryEntry[]
getChildren(org.apache.synapse.registry.RegistryEntry entry)
Gives the children of the given entry.org.apache.synapse.registry.RegistryEntry[]
getDescendants(org.apache.synapse.registry.RegistryEntry entry)
org.apache.synapse.registry.RegistryEntry
getRegistryEntry(String key)
String
getRoot()
Returns the root of the registry.void
init(Properties properties)
boolean
isResourceExists(String s)
org.apache.axiom.om.OMNode
lookup(String key)
org.apache.axiom.om.OMNode
lookupFormat(String s)
void
newNonEmptyResource(String key, boolean isDirectory, String mediaType, String content, String propertyName)
void
newResource(String path, boolean isDirectory)
void
updateRegistryEntry(org.apache.synapse.registry.RegistryEntry entry)
Updates the metadata of the given registry entryvoid
updateResource(String key, Object value)
Updates the registry resource pointed by the given key.
-
-
-
Field Detail
-
FILE
public static final int FILE
- See Also:
- Constant Field Values
-
HTTP
public static final int HTTP
- See Also:
- Constant Field Values
-
HTTPS
public static final int HTTPS
- See Also:
- Constant Field Values
-
URL_SEPARATOR
public static final String URL_SEPARATOR
- See Also:
- Constant Field Values
-
URL_SEPARATOR_CHAR
public static final char URL_SEPARATOR_CHAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Properties properties)
- Specified by:
init
in interfaceorg.apache.synapse.registry.Registry
- Overrides:
init
in classorg.apache.synapse.registry.AbstractRegistry
-
lookup
public org.apache.axiom.om.OMNode lookup(String key)
-
getRegistryEntry
public org.apache.synapse.registry.RegistryEntry getRegistryEntry(String key)
-
lookupFormat
public org.apache.axiom.om.OMNode lookupFormat(String s)
-
updateRegistryEntry
public void updateRegistryEntry(org.apache.synapse.registry.RegistryEntry entry)
Updates the metadata of the given registry entry- Parameters:
entry
- RegistryEntry containing the new metadata
-
isResourceExists
public boolean isResourceExists(String s)
-
updateResource
public void updateResource(String key, Object value)
Updates the registry resource pointed by the given key.- Parameters:
key
- Key of the resource to be updatedvalue
- New value of the resource
-
getRoot
public String getRoot()
Returns the root of the registry. This is always a URL.- Returns:
- Registry root.
-
getCachableDuration
public long getCachableDuration()
-
getChildren
public org.apache.synapse.registry.RegistryEntry[] getChildren(org.apache.synapse.registry.RegistryEntry entry)
Gives the children of the given entry. If the registry is in the same host get the children (subfolders and files) using the FILE system. If the registry is in a remote host, get children using a WS call. Give null or registry entry with "" as the key to list the children of the root.- Parameters:
entry
- registry entry to get the children- Returns:
- children of the given entry
-
getDescendants
public org.apache.synapse.registry.RegistryEntry[] getDescendants(org.apache.synapse.registry.RegistryEntry entry)
-
delete
public void delete(String path)
-
newResource
public void newResource(String path, boolean isDirectory)
-
-