T
- public abstract class AbstractStore<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
configPath |
protected org.apache.commons.logging.Log |
log |
protected org.apache.synapse.config.xml.MultiXMLConfigurationSerializer |
serializer |
Constructor and Description |
---|
AbstractStore(String configPath) |
Modifier and Type | Method and Description |
---|---|
void |
delete(String name,
String fileName,
org.apache.synapse.config.SynapseConfiguration config) |
protected abstract void |
deleteFile(String fileName,
org.apache.synapse.config.SynapseConfiguration config)
Delete the specified file from the persistence store.
|
protected abstract String |
getFileName(T obj)
Inspect the given object and find the file name to which it should be
serialized to
|
protected abstract T |
getObjectToPersist(String name,
org.apache.synapse.config.SynapseConfiguration config)
Find the specified object from the SynaspeConfiguration to be saved to
the persistence store
|
protected void |
handleException(String msg,
Exception e) |
void |
save(String name,
org.apache.synapse.config.SynapseConfiguration config) |
protected abstract org.apache.axiom.om.OMElement |
saveToFile(T obj,
org.apache.synapse.config.SynapseConfiguration synapseConfig)
Serialize and save the given object to the local file system
|
protected abstract org.apache.axiom.om.OMElement |
serialize(T obj)
Serialize the given object into XML
|
protected org.apache.commons.logging.Log log
protected String configPath
protected org.apache.synapse.config.xml.MultiXMLConfigurationSerializer serializer
public AbstractStore(String configPath)
public void save(String name, org.apache.synapse.config.SynapseConfiguration config)
public void delete(String name, String fileName, org.apache.synapse.config.SynapseConfiguration config)
protected abstract org.apache.axiom.om.OMElement saveToFile(T obj, org.apache.synapse.config.SynapseConfiguration synapseConfig)
obj
- Object to be savedsynapseConfig
- synapse configurationprotected abstract void deleteFile(String fileName, org.apache.synapse.config.SynapseConfiguration config)
fileName
- Name of the file to be deletedconfig
- synapse configurationprotected abstract T getObjectToPersist(String name, org.apache.synapse.config.SynapseConfiguration config)
name
- Name or unique ID of the objectconfig
- Current SynapseConfigurationprotected abstract String getFileName(T obj)
obj
- The object to be inspectedprotected abstract org.apache.axiom.om.OMElement serialize(T obj)
obj
- The object to be serializedCopyright © 2019 WSO2. All rights reserved.