Class DefaultDebugSupport
java.lang.Object
org.apache.olingo.server.api.debug.DefaultDebugSupport
- All Implemented Interfaces:
DebugSupport
Supports the default debug case. Will always deliver a debug response if requested from the server.
-
Field Summary
Fields inherited from interface org.apache.olingo.server.api.debug.DebugSupport
ODATA_DEBUG_DOWNLOAD, ODATA_DEBUG_HTML, ODATA_DEBUG_JSON, ODATA_DEBUG_QUERY_PARAMETER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDebugResponse
(String debugFormat, DebugInformation debugInfo) Creates a debug response and delivers it back to the Olingo library.void
Initializes the debug support implementation.boolean
Ensures that the user that requested the debug output is authorized to see this output.
-
Constructor Details
-
DefaultDebugSupport
public DefaultDebugSupport()
-
-
Method Details
-
init
Description copied from interface:DebugSupport
Initializes the debug support implementation. Is called beforeDebugSupport.isUserAuthorized()
andDebugSupport.createDebugResponse(String, DebugInformation)
.- Specified by:
init
in interfaceDebugSupport
- Parameters:
odata
- related OData/Olingo service factory
-
isUserAuthorized
public boolean isUserAuthorized()Description copied from interface:DebugSupport
Ensures that the user that requested the debug output is authorized to see this output.- Specified by:
isUserAuthorized
in interfaceDebugSupport
- Returns:
- true if the current user is authorized
-
createDebugResponse
Description copied from interface:DebugSupport
Creates a debug response and delivers it back to the Olingo library. This method MUST NEVER throw an exception.- Specified by:
createDebugResponse
in interfaceDebugSupport
- Parameters:
debugFormat
- the value of the odata-debug query parameterdebugInfo
- all necessary information to construct debug output- Returns:
- a new debug response which will be sent to the client
-