@Deprecated public abstract class AbstractPersistenceManager extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.axis2.engine.AxisConfiguration |
axisConfig
Deprecated.
|
protected org.wso2.carbon.registry.core.Registry |
configRegistry
Deprecated.
The Configuration registry instance in which all configuration data are stored.
|
protected AbstractFilePersistenceManager |
fpm
Deprecated.
|
protected org.apache.axiom.om.OMFactory |
omFactory
Deprecated.
|
protected PersistenceFactory |
pf
Deprecated.
|
protected static Object |
WRITE_LOCK
Deprecated.
The lock object used to synchronize database write locks.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig)
Deprecated.
Constructor gets the axisconfig and create reference to the config registry instances.
|
protected |
AbstractPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig,
AbstractFilePersistenceManager fpm,
PersistenceFactory pf)
Deprecated.
Constructor gets the axisconfig and create reference to the config registry instances.
|
Modifier and Type | Method and Description |
---|---|
protected static String |
convertStreamToString(InputStream is)
Deprecated.
|
AbstractFilePersistenceManager |
getCurrentFPM()
Deprecated.
|
protected org.apache.axis2.description.AxisModule |
getExistingAxisModule(String moduleName,
String moduleVersion)
Deprecated.
Finds the existing AxisModule instance for a particular module.
|
ModuleFilePersistenceManager |
getModuleFilePM()
Deprecated.
|
String |
getProperty(org.apache.axiom.om.OMElement resource,
String xpathStr)
Deprecated.
Returns the attribute value
|
protected List |
getPropertyValues(String resourcePath,
String property)
Deprecated.
why we need store multiple property values with the same property name specially for POLICY_UUID?
|
ServiceGroupFilePersistenceManager |
getServiceGroupFilePM()
Deprecated.
|
protected void |
handleException(String msg)
Deprecated.
|
protected void |
handleException(String msg,
Throwable e)
Deprecated.
|
protected void |
handleExceptionWithRollback(String resourceId,
String msg,
Throwable e)
Deprecated.
Handles exception and rollbacks an already started transaction.
|
protected void |
handleModuleForAxisDescription(String serviceGroupId,
org.apache.axis2.description.AxisModule module,
String xpathStr,
boolean engage)
Deprecated.
Engage or disengage module at the given resource path.
|
protected boolean |
isGloballyEngaged(String moduleName,
String moduleVersion)
Deprecated.
Checks whether the provided module is globally engaged.
|
protected void |
loadDocumentation(String serviceGroupId,
org.apache.axis2.description.AxisDescription ad,
String resourceXPath)
Deprecated.
Load the documentation of an AxisDescription instance
|
protected void |
loadParameters(String resourceId,
org.apache.axis2.description.AxisDescription ad,
String xpathStrOfParameter)
Deprecated.
Load parameters for the given AxisDescription instance from registry
|
protected void |
loadPolicies(String serviceGroupId,
org.apache.axis2.description.AxisDescription ad,
List policyIdList,
String serviceXPath)
Deprecated.
Load policies from the file system and attach to the AxisDescription instance.
|
void |
persistPolicyToRegistry(org.apache.neethi.Policy policy,
String policyType,
String servicePath)
Deprecated.
Persists the given
Policy object under policies associated with the
servicePath in the registry. |
protected void |
removeParameter(String resourceId,
String paramName,
String xpathStr)
Deprecated.
Remove a parameter at the given path from the registry
|
protected void |
removeResource(String resourceId,
String xpathStr)
Deprecated.
Remove a resource at the given path
|
void |
updateParameter(String resourceId,
org.apache.axis2.description.Parameter serviceParameter,
String xpathStrOfParent)
Deprecated.
If the parameter already exists, persist new value.
|
protected void |
writeAxisDescription(String serviceGroupId,
org.apache.axis2.description.AxisDescription ad,
String nameProperty,
String xpathStr)
Deprecated.
Encourage to use this#createOperation and do the operations manually
|
protected void |
writeParameters(String resourceId,
ArrayList<org.apache.axis2.description.Parameter> paramList,
String xpathStrOfParent)
Deprecated.
Write a list of parameters to the registry
Parameter element looks liks
<parameter name="param-name">val</parameter> |
protected static final Object WRITE_LOCK
protected org.wso2.carbon.registry.core.Registry configRegistry
protected org.apache.axis2.engine.AxisConfiguration axisConfig
protected PersistenceFactory pf
protected AbstractFilePersistenceManager fpm
protected org.apache.axiom.om.OMFactory omFactory
protected AbstractPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig, AbstractFilePersistenceManager fpm, PersistenceFactory pf) throws org.apache.axis2.AxisFault
axisConfig
- - AxisConfigurationpf
- pffpm
- fpmorg.apache.axis2.AxisFault
- - if the config registry is not foundprotected AbstractPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.AxisFault
axisConfig
- - AxisConfigurationorg.apache.axis2.AxisFault
- - if the config registry is not foundpublic void updateParameter(String resourceId, org.apache.axis2.description.Parameter serviceParameter, String xpathStrOfParent) throws XMLStreamException, IOException, PersistenceException, org.jaxen.JaxenException
resourceId
- - resource id/nameserviceParameter
- - parameter instancexpathStrOfParent
- xpathStrOfParentIOException
XMLStreamException
PersistenceException
org.jaxen.JaxenException
protected static String convertStreamToString(InputStream is)
protected void removeParameter(String resourceId, String paramName, String xpathStr) throws Exception
resourceId
- sg name of module nameparamName
- - parameter namexpathStr
- the xpath expression stringException
- - on errorprotected void removeResource(String resourceId, String xpathStr) throws Exception
resourceId
- SG name or module namexpathStr
- xpath to elementException
- - on registry errorprotected void handleModuleForAxisDescription(String serviceGroupId, org.apache.axis2.description.AxisModule module, String xpathStr, boolean engage) throws Exception
serviceGroupId
- serviceGroupIdmodule
- - AxisModule instancexpathStr
- - registry path of a service group, service, operation etcengage
- - engage or disengageException
- - on registry transaction errorsprotected void loadParameters(String resourceId, org.apache.axis2.description.AxisDescription ad, String xpathStrOfParameter) throws Exception
resourceId
- SG name or module namead
- - AxisDescription instancexpathStrOfParameter
- Provide the xpath to parameters. ex. /service[@name="HelloService"]/parameterException
- - on errorprotected void writeParameters(String resourceId, ArrayList<org.apache.axis2.description.Parameter> paramList, String xpathStrOfParent) throws Exception
<parameter name="param-name">val</parameter>
resourceId
- SG name or module nameparamList
- - Parameter listxpathStrOfParent
- xpath to parent elementException
- - on errorprotected void writeAxisDescription(String serviceGroupId, org.apache.axis2.description.AxisDescription ad, String nameProperty, String xpathStr) throws PersistenceException
serviceGroupId
- SG namead
- - AxisDescription instancenameProperty
- - name to be setxpathStr
- - xpathStr to store AxisDescriptionPersistenceException
- error in persisting dataprotected List getPropertyValues(String resourcePath, String property) throws org.wso2.carbon.registry.core.exceptions.RegistryException
resourcePath
- - resource pathproperty
- - property nameorg.wso2.carbon.registry.core.exceptions.RegistryException
- - on registry errorprotected void loadDocumentation(String serviceGroupId, org.apache.axis2.description.AxisDescription ad, String resourceXPath) throws org.wso2.carbon.registry.core.exceptions.RegistryException, PersistenceDataNotFoundException
serviceGroupId
- SG namead
- - AxisDescription instance to set the documentationresourceXPath
- - resource path of the AxisDescriptionPersistenceDataNotFoundException
- error in persisting dataorg.wso2.carbon.registry.core.exceptions.RegistryException
- reg exprotected void loadPolicies(String serviceGroupId, org.apache.axis2.description.AxisDescription ad, List policyIdList, String serviceXPath) throws org.wso2.carbon.registry.core.exceptions.RegistryException, PersistenceDataNotFoundException
serviceGroupId
- SG namead
- - AxisDescription instancepolicyIdList
- - list of policy UUIDsserviceXPath
- - all policies are stored at service level. Therefore, fetch the
actual policy from service levelorg.wso2.carbon.registry.core.exceptions.RegistryException
- - registry transaction errorsPersistenceDataNotFoundException
- exprotected boolean isGloballyEngaged(String moduleName, String moduleVersion)
moduleName
- module NamemoduleVersion
- module Versionprotected org.apache.axis2.description.AxisModule getExistingAxisModule(String moduleName, String moduleVersion) throws Exception
moduleName
- module NamemoduleVersion
- module VersionException
- - on errors while accessing registry or on module not foundprotected void handleExceptionWithRollback(String resourceId, String msg, Throwable e) throws PersistenceException
resourceId
- The id/name of resourcemsg
- - Message to loge
- - original exceptionPersistenceException
- exprotected void handleException(String msg, Throwable e) throws PersistenceException
PersistenceException
protected void handleException(String msg) throws PersistenceException
PersistenceException
public String getProperty(org.apache.axiom.om.OMElement resource, String xpathStr)
resource
- omelementxpathStr
- xpath to attribute/propertypublic AbstractFilePersistenceManager getCurrentFPM()
public ServiceGroupFilePersistenceManager getServiceGroupFilePM()
public ModuleFilePersistenceManager getModuleFilePM()
public void persistPolicyToRegistry(org.apache.neethi.Policy policy, String policyType, String servicePath) throws org.wso2.carbon.registry.core.exceptions.RegistryException, XMLStreamException
Policy
object under policies associated with the
servicePath
in the registry.policy
- the Policy
instance to be persistedpolicyType
- Policy TypeservicePath
- - path in the registry to persist policyorg.wso2.carbon.registry.core.exceptions.RegistryException
- if saving data to the registry is unsuccessfulXMLStreamException
- if serializing the Policy object is unsuccessful
Copyright © 2016 WSO2 Inc. All rights reserved.