10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::ee::licensing::authzapi::DefaultLicenseReleaseRequest Class Reference

#include <DefaultLicenseReleaseRequest.h>

Detailed Description

Default implementation of tenduke::ee::licensing::LicenseReleaseRequest.

Inheritance diagram for tenduke::ee::licensing::authzapi::DefaultLicenseReleaseRequest:
tenduke::ee::licensing::authzapi::LicensingRequest< T >

Public Member Functions

 DefaultLicenseReleaseRequest (const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::jwt::JWTParser > &jwtParser, const std::shared_ptr< const ::tenduke::ee::licensing::LicensingConfiguration > &configuration, ::tenduke::ee::licensing::LicenseReleaseParameters parameters)
 Constructs new instance.
 
tenduke::ee::licensing::LicenseReleaseResponse execute () override
 Execute the request synchronously.
 

Protected Member Functions

virtual tenduke::ee::licensing::LicenseReleaseResponse parseResponsePayload (const std::string &payload)
 Parses response payload to tenduke::ee::licensing::LicenseReleaseResponse.
 
virtual void parseSingleToken (const std::string &token, std::vector< std::string > &successfullyReleasedLeaseIds, std::map< std::string, tenduke::ee::licensing::LicensingError > &errors)
 Parses single token from the response, and places the token either to successfullyReleasedLeaseIds or errors depending on the contents of the token.
 

Constructor & Destructor Documentation

◆ DefaultLicenseReleaseRequest()

tenduke::ee::licensing::authzapi::DefaultLicenseReleaseRequest::DefaultLicenseReleaseRequest ( const std::shared_ptr< const ::tenduke::http::HTTPClient > &  httpClient,
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &  httpRequestAuthenticator,
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &  throwException,
const std::shared_ptr< const ::tenduke::jwt::JWTParser > &  jwtParser,
const std::shared_ptr< const ::tenduke::ee::licensing::LicensingConfiguration > &  configuration,
::tenduke::ee::licensing::LicenseReleaseParameters  parameters 
)

Constructs new instance.

Parameters
configuration-
parameters-
httpClient-
httpRequestAuthenticator-
jwtParser-
throwException-

Member Function Documentation

◆ execute()

xdlic::LicenseReleaseResponse tenduke::ee::licensing::authzapi::DefaultLicenseReleaseRequest::execute ( )
overridevirtual

Execute the request synchronously.

Returns
the response. IMPORTANT: Failures (e.g. user does not have access to requested license) do not throw an exception, but are listed as failed items in the response.
Exceptions
tenduke::http::HTTPExceptione.g. internal server errors, invalid configuration (e.g. HTTP 404 not found) et al.
tenduke::json::JSONParsingExceptionJSON has errors (should not usually happen)
tenduke::ee::licensing::LicensingRequestFailuree.g. invalid response (not JSON)
tenduke::net::NetworkingExceptione.g. timeouts, networking communication problems
tenduke::TimedOutgeneric time outs

Implements tenduke::ee::licensing::authzapi::LicensingRequest< T >.

◆ parseResponsePayload()

xdlic::LicenseReleaseResponse tenduke::ee::licensing::authzapi::DefaultLicenseReleaseRequest::parseResponsePayload ( const std::string &  payload)
protectedvirtual

Parses response payload to tenduke::ee::licensing::LicenseReleaseResponse.

Parameters
payloadthe payload
Returns
parsed response

◆ parseSingleToken()

void tenduke::ee::licensing::authzapi::DefaultLicenseReleaseRequest::parseSingleToken ( const std::string &  token,
std::vector< std::string > &  successfullyReleasedLeaseIds,
std::map< std::string, tenduke::ee::licensing::LicensingError > &  errors 
)
protectedvirtual

Parses single token from the response, and places the token either to successfullyReleasedLeaseIds or errors depending on the contents of the token.

Parameters
tokenthe token
successfullyReleasedLeaseIdslease-IDs successfully released
errorserrors-map (key is lease-ID)

The documentation for this class was generated from the following files: