Class ODataResponse

java.lang.Object
de.hybris.platform.odata2services.odata.ODataResponse

public class ODataResponse extends Object
A helper class for exploring and evaluating content of an ODataResponse
  • Method Details

    • createFrom

      public static ODataResponse createFrom(org.apache.olingo.odata2.api.processor.ODataResponse r) throws org.apache.olingo.odata2.api.exception.ODataException
      Throws:
      org.apache.olingo.odata2.api.exception.ODataException
    • getSchemaNames

      public Collection<String> getSchemaNames() throws org.apache.olingo.odata2.api.exception.ODataException
      Returns namespaces of the schemas present in the response.
      Returns:
      a collection of all schema names in this response or an empty collection, if this response contains no schemas.
      Throws:
      org.apache.olingo.odata2.api.exception.ODataException - if failed to obtain schemas from the response.
    • getSchema

      public ODataSchema getSchema(String namespace) throws org.apache.olingo.odata2.api.exception.ODataException
      Searches for the specified schema in the content of this response.
      Parameters:
      namespace - namespace of the EDMX schema to select.
      Returns:
      the schema in the content of this response, which the namespace matching the specified value.
      Throws:
      org.apache.olingo.odata2.api.exception.ODataException - if schemas could not be accessed in the response.
      IllegalArgumentException - if the schema does not exist