org.apache.olingo.server.api.debug

## Interface DebugSupport

- All Known Implementing Classes:
    DefaultDebugSupport

      public interface DebugSupport

  Register this interface to add debug support to your service.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ODATA_DEBUG_DOWNLOAD`
    `static String` | `ODATA_DEBUG_HTML`
    `static String` | `ODATA_DEBUG_JSON`
    `static String` | `ODATA_DEBUG_QUERY_PARAMETER`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ODataResponse` | `createDebugResponse(String debugFormat, DebugInformation debugInfo)` Creates a debug response and delivers it back to the Olingo library.
    `void` | `init(OData odata)` Initializes the debug support implementation.
    `boolean` | `isUserAuthorized()` Ensures that the user that requested the debug output is authorized to see this output.

- - ### Field Detail

    - #### ODATA_DEBUG_QUERY_PARAMETER

          static final String ODATA_DEBUG_QUERY_PARAMETER

      See Also:
        Constant Field Values

    - #### ODATA_DEBUG_JSON

          static final String ODATA_DEBUG_JSON

      See Also:
        Constant Field Values

    - #### ODATA_DEBUG_HTML

          static final String ODATA_DEBUG_HTML

      See Also:
        Constant Field Values

    - #### ODATA_DEBUG_DOWNLOAD

          static final String ODATA_DEBUG_DOWNLOAD

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### init

          void init(OData odata)

      Initializes the debug support implementation. Is called before `isUserAuthorized()` and `createDebugResponse(String, DebugInformation)`.
      Parameters:
        `odata` - related OData/Olingo service factory

    - #### isUserAuthorized

          boolean isUserAuthorized()

      Ensures that the user that requested the debug output is authorized to see this output.
      Returns:
        true if the current user is authorized

    - #### createDebugResponse

          ODataResponse createDebugResponse(String debugFormat,
                                            DebugInformation debugInfo)

      Creates a debug response and delivers it back to the Olingo library. This method MUST NEVER throw an exception.
      Parameters:
        `debugFormat` - the value of the odata-debug query parameter
        `debugInfo` - all necessary information to construct debug output
      Returns:
        a new debug response which will be sent to the client

Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.