com.ibm.zosconnect.spi
Interface DataXform
-
- All Known Subinterfaces:
- DataXformExt
- All Known Implementing Classes:
- com.ibm.zosconnect.internal.xform.DataXformImpl, SarDataXform
public interface DataXform
Defines an OSGI service provider that has the ability to transform data from/to different object types.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
copyright_notice
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description byte[]
getBytes(java.lang.String serviceName, com.ibm.json.java.JSONObject payload)
Transforms a JSON object to byte array.com.ibm.json.java.JSONObject
getJSON(java.lang.String serviceName, byte[] bytes)
Transforms a byte array to a JSON object.java.lang.String
getProviderName()
Retrieves the data transformation's provider name.java.lang.Long
getRequestPayloadDataSize(java.lang.String serviceName)
Returns the size of the data in the request payload.com.ibm.json.java.JSONObject
getRequestSchema(java.lang.String serviceName)
Returns the request schema.java.lang.Long
getResponsePayloadDataSize(java.lang.String serviceName)
Returns the size of the data in the response payload.com.ibm.json.java.JSONObject
getResponseSchema(java.lang.String serviceName)
Returns the response schema.
-
-
-
Field Detail
-
copyright_notice
static final java.lang.String copyright_notice
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProviderName
java.lang.String getProviderName()
Retrieves the data transformation's provider name.- Returns:
- The data transformation's provider name.
-
getJSON
com.ibm.json.java.JSONObject getJSON(java.lang.String serviceName, byte[] bytes) throws DataXformException
Transforms a byte array to a JSON object.- Parameters:
serviceName
- The name of the servicebytes
- The bytes to be transformed.- Returns:
- The JSON representation of the byte array.
- Throws:
DataXformException
- If an error occurred during the data transformation.
-
getBytes
byte[] getBytes(java.lang.String serviceName, com.ibm.json.java.JSONObject payload) throws DataXformException
Transforms a JSON object to byte array.- Parameters:
serviceName
- The name of the servicepayload
- The json object to be transformed.- Returns:
- The byte array representation of the JSON object.
- Throws:
DataXformException
- If an error occurred during the data transformation.
-
getRequestSchema
com.ibm.json.java.JSONObject getRequestSchema(java.lang.String serviceName) throws DataXformException
Returns the request schema.- Parameters:
serviceName
- The name of the service- Returns:
- The schema as a JSON object.
- Throws:
DataXformException
- If there is a processing error.
-
getResponseSchema
com.ibm.json.java.JSONObject getResponseSchema(java.lang.String serviceName) throws DataXformException
Returns the response schema.- Parameters:
serviceName
- The name of the service- Returns:
- The schema as a JSON object.
- Throws:
DataXformException
- If there is a processing error.
-
getRequestPayloadDataSize
java.lang.Long getRequestPayloadDataSize(java.lang.String serviceName) throws DataXformException
Returns the size of the data in the request payload.- Parameters:
serviceName
- The name of the service- Returns:
- The size of the data in the request payload.
- Throws:
DataXformException
- If there is a processing error.
-
getResponsePayloadDataSize
java.lang.Long getResponsePayloadDataSize(java.lang.String serviceName) throws DataXformException
Returns the size of the data in the response payload.- Parameters:
serviceName
- The name of the service- Returns:
- The size of the data in the response payload.
- Throws:
DataXformException
- If there is a processing error.
-
-