com.ibm.wsspi.zos.connect

Interface DataXform



  • public interface DataXform
    Defines an OSGI service provider that has the ability to transform data from/to different object types.
    • Method Summary

      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.
      com.ibm.json.java.JSONObject getRequestSchema(java.lang.String serviceName)
      Returns the request schema.
      com.ibm.json.java.JSONObject getResponseSchema(java.lang.String serviceName)
      Returns the response schema.
    • 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 service
        bytes - The bytes to be transformed.
        Returns:
        The JSON representation of the byte array.
        Throws:
        DataXformException
      • 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 service
        payload - The json object to be transformed.
        Returns:
        The byte array representation of the JSON object.
        Throws:
        DataXformException
      • 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
      • 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