@Deprecated public final class PersistenceUtils extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.axiom.om.OMElement |
createAssociation(String destinationPath,
String type)
Deprecated.
I'm thinking of making the destinationPath be either a xpath or a path to a registry.
|
static org.apache.axiom.om.OMElement |
createModule(String moduleName,
String moduleVersion,
String type)
Deprecated.
Creates a
<module> OMElement that can be used to add to serviceGroup file. |
static org.apache.axiom.om.OMElement |
createOperation(org.apache.axis2.description.AxisDescription ad,
String opName)
Deprecated.
|
static org.apache.axiom.om.OMElement |
createPolicyElement(org.apache.neethi.Policy policy)
Deprecated.
Creates a registry Resource for a given Policy
|
static org.wso2.carbon.registry.core.Resource |
createPolicyResource(org.wso2.carbon.registry.core.Registry configRegistry,
org.apache.neethi.Policy policy,
String policyId,
String policyType)
Deprecated.
Creates a registry Resource for a given Policy
|
static String |
getBindingOperationPath(String serviceXPath,
org.apache.axis2.description.AxisBindingOperation abo)
Deprecated.
Returns the resource path for the specified AxisBindingOperation
|
static String |
getBindingPath(String serviceXPath,
org.apache.axis2.description.AxisBinding binding)
Deprecated.
Returns the resource path for the specified AxisBindingOperation
|
static String |
getModuleVersion(org.apache.axis2.description.AxisModule axisModule)
Deprecated.
|
static org.apache.axiom.om.OMElement |
getPolicyElementFromList(String policyId,
List policyElementList)
Deprecated.
Finds a policy with the given uuid in the provided list of policies
|
static String |
getPolicyUUIDFromWrapperOM(org.apache.axiom.om.OMElement policyWrapperElement)
Deprecated.
Returns the policyUUID (Resources.POLICY_UUID) from the given policyWrapperElement OMElement
A policyWrapperElement is a <policy> element that wraps <wsp:policy>.
|
static String |
getRegistryResourcePath(org.apache.axis2.description.AxisService service)
Deprecated.
Used for Proxy services since we write the policy to both registry and file system
|
static org.apache.axiom.om.OMElement |
getResourceDocumentElement(File resourceFile)
Deprecated.
|
static String |
getResourcePath(org.apache.axis2.description.AxisModule module)
Deprecated.
Returns the xpath for the given module
The name of the module isn't needed here, because it's not needed to calculate
the xpath as it's one file per moduleName.
|
static String |
getResourcePath(org.apache.axis2.description.AxisOperation operation)
Deprecated.
Returns the resource path for the specified AxisOperation
|
static String |
getResourcePath(org.apache.axis2.description.AxisService service)
Deprecated.
Returns the resource path for the specified AxisService
/serviceGroup/service[@name="xxx"]
Ideal for use with get* operations.
|
static String |
getXPathAttrPredicate(String attrName,
String attrValue)
Deprecated.
[@attrName="attrValue"]
|
static String |
getXPathTextPredicate(String prefixes,
String textValue)
Deprecated.
Set null for prefixes if there aren't any.
|
static void |
handleGlobalParams(org.apache.axis2.description.AxisModule axisModule,
org.apache.axiom.om.OMElement moduleVerEl)
Deprecated.
Set the needed global params for the module by reading from registry resource
|
static boolean |
isProxyService(org.apache.axis2.description.AxisService service)
Deprecated.
Checks whether the given service is a proxy service
|
static void |
markFaultyModule(org.apache.axis2.description.AxisModule axisModule)
Deprecated.
Mark this module as faulty
|
public static String getResourcePath(org.apache.axis2.description.AxisService service)
service
- - AxisService instancepublic static String getRegistryResourcePath(org.apache.axis2.description.AxisService service)
service
- - AxisService instancepublic static String getResourcePath(org.apache.axis2.description.AxisOperation operation)
operation
- - AxisService instancepublic static String getResourcePath(org.apache.axis2.description.AxisModule module)
module
- - AxisModule instancepublic static String getBindingPath(String serviceXPath, org.apache.axis2.description.AxisBinding binding)
serviceXPath
- - service resource pathbinding
- public static String getBindingOperationPath(String serviceXPath, org.apache.axis2.description.AxisBindingOperation abo)
serviceXPath
- - service resource pathabo
- - AxisBindingOperation instancepublic static org.apache.axiom.om.OMElement getPolicyElementFromList(String policyId, List policyElementList)
policyId
- - uuid to findpolicyElementList
- - resource list - the policyWrapperElementspublic static boolean isProxyService(org.apache.axis2.description.AxisService service)
service
- - AxisService instancepublic static void markFaultyModule(org.apache.axis2.description.AxisModule axisModule)
axisModule
- - AxisModule instance to be marked as faultypublic static void handleGlobalParams(org.apache.axis2.description.AxisModule axisModule, org.apache.axiom.om.OMElement moduleVerEl) throws org.apache.axis2.AxisFault
axisModule
- - AxisModule instancemoduleVerEl
- - module version elementorg.apache.axis2.AxisFault
- - on axis level errorspublic static String getXPathAttrPredicate(String attrName, String attrValue)
attrName
- attrValue
- public static String getXPathTextPredicate(String prefixes, String textValue)
prefixes
- textValue
- public static org.apache.axiom.om.OMElement createAssociation(String destinationPath, String type)
destinationPath
- type
- public static org.apache.axiom.om.OMElement createModule(String moduleName, String moduleVersion, String type)
<module>
OMElement that can be used to add to serviceGroup file.
ex. <module name="rampart" version="3.2" type=""/>
version attr not added is null.
moduleName
- moduleVersion
- type
- public static org.apache.axiom.om.OMElement createOperation(org.apache.axis2.description.AxisDescription ad, String opName)
public static org.apache.axiom.om.OMElement createPolicyElement(org.apache.neethi.Policy policy) throws Exception
policy
- - Policy instance
todo now policyId, and policyType is removed, adjust invocations of this method (PersistenceUtils.createPolicyElement) - kasungException
- - error on serializationpublic static org.wso2.carbon.registry.core.Resource createPolicyResource(org.wso2.carbon.registry.core.Registry configRegistry, org.apache.neethi.Policy policy, String policyId, String policyType) throws org.wso2.carbon.registry.core.exceptions.RegistryException
configRegistry
- config registrypolicy
- - Policy instancepolicyId
- - policy uuidpolicyType
- - policy typeException
- - error on serializationorg.wso2.carbon.registry.core.exceptions.RegistryException
public static String getPolicyUUIDFromWrapperOM(org.apache.axiom.om.OMElement policyWrapperElement)
policyWrapperElement
- public static String getModuleVersion(org.apache.axis2.description.AxisModule axisModule)
public static org.apache.axiom.om.OMElement getResourceDocumentElement(File resourceFile) throws XMLStreamException, IOException
XMLStreamException
IOException
Copyright © 2016 WSO2 Inc. All rights reserved.