public class DataTaskContext extends Object
Constructor and Description |
---|
DataTaskContext(int tid) |
Modifier and Type | Method and Description |
---|---|
org.apache.axiom.om.OMElement |
accessResource(String serviceName,
String resourcePath,
Map<String,org.wso2.carbon.dataservices.core.engine.ParamValue> params,
String accessMethod)
Accesses a data services resource.
|
boolean |
checkServices(String... services)
Checks if the given services are available.
|
Map<String,String> |
getDataTaskProperties() |
void |
invokeOperation(String serviceName,
String operationName,
List<Map<String,org.wso2.carbon.dataservices.core.engine.ParamValue>> batchParams)
Invokes a batch data service operation
|
org.apache.axiom.om.OMElement |
invokeOperation(String serviceName,
String operationName,
Map<String,org.wso2.carbon.dataservices.core.engine.ParamValue> params)
Invokes a single data service operation.
|
void |
setDataServicesUser(String username,
String password)
Sets the Carbon user for the current thread of execution.
|
void |
setDataTaskProperties(Map<String,String> dataTaskProperties) |
public boolean checkServices(String... services)
services
- An array of service names to be checkedpublic org.apache.axiom.om.OMElement invokeOperation(String serviceName, String operationName, Map<String,org.wso2.carbon.dataservices.core.engine.ParamValue> params) throws org.wso2.carbon.dataservices.core.DataServiceFault
serviceName
- The name of the data serviceoperationName
- The data service operation nameparams
- The parameters to be passed into the operationorg.wso2.carbon.dataservices.core.DataServiceFault
- If an error occurs in the service invocationpublic void invokeOperation(String serviceName, String operationName, List<Map<String,org.wso2.carbon.dataservices.core.engine.ParamValue>> batchParams) throws org.wso2.carbon.dataservices.core.DataServiceFault
serviceName
- The name of the data serviceoperationName
- The data service batch operation namebatchParams
- The batch parameters to be passed into the operationorg.wso2.carbon.dataservices.core.DataServiceFault
- If an error occurs in the service invocationpublic org.apache.axiom.om.OMElement accessResource(String serviceName, String resourcePath, Map<String,org.wso2.carbon.dataservices.core.engine.ParamValue> params, String accessMethod) throws org.wso2.carbon.dataservices.core.DataServiceFault
serviceName
- The name of the data serviceresourcePath
- The resource path used to access the resourceparams
- The parameters passed into the resource accessaccessMethod
- The HTTP access methodorg.wso2.carbon.dataservices.core.DataServiceFault
- If an error occurs in the service invocationpublic void setDataServicesUser(String username, String password) throws org.wso2.carbon.dataservices.core.DataServiceFault
username
- The usernamepassword
- The passwordorg.wso2.carbon.dataservices.core.DataServiceFault
- If an error occurs in the service invocationCopyright © 2020 WSO2. All rights reserved.