LibreOffice Module dbaccess (master) 1
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
dbaui::BasicInteractionHandler Class Reference

implements an <type scope="com.sun.star.task">XInteractionHandler</type> for database related interaction requests. More...

#include <dbinteraction.hxx>

Inheritance diagram for dbaui::BasicInteractionHandler:
[legend]
Collaboration diagram for dbaui::BasicInteractionHandler:
[legend]

Public Member Functions

 BasicInteractionHandler (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const bool i_bFallbackToGeneric)
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &rArgs) override
 
virtual sal_Bool SAL_CALL handleInteractionRequest (const css::uno::Reference< css::task::XInteractionRequest > &Request) override
 
virtual void SAL_CALL handle (const css::uno::Reference< css::task::XInteractionRequest > &Request) override
 

Protected Types

enum  Continuation {
  APPROVE ,
  DISAPPROVE ,
  RETRY ,
  ABORT ,
  SUPPLY_PARAMETERS ,
  SUPPLY_DOCUMENTSAVE
}
 known continuation types More...
 

Protected Member Functions

bool impl_handle_throw (const css::uno::Reference< css::task::XInteractionRequest > &i_Request)
 
void implHandle (const css::sdb::ParametersRequest &_rParamRequest, const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &_rContinuations)
 handle parameter requests More...
 
void implHandle (const css::sdb::DocumentSaveRequest &_rParamRequest, const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &_rContinuations)
 handle document save requests More...
 
bool implHandleUnknown (const css::uno::Reference< css::task::XInteractionRequest > &_rxRequest)
 handles requests which are not SDB-specific More...
 

Static Protected Member Functions

static void implHandle (const ::dbtools::SQLExceptionInfo &_rSqlInfo, const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &_rContinuations)
 handle SQLExceptions (and derived classes) More...
 
static sal_Int32 getContinuation (Continuation _eCont, const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &_rContinuations)
 check if a given continuation sequence contains a given continuation type More...
 

Private Attributes

css::uno::Reference< css::awt::XWindow > m_xParentWindow
 
const css::uno::Reference< css::uno::XComponentContext > m_xContext
 
const bool m_bFallbackToGeneric
 

Detailed Description

implements an <type scope="com.sun.star.task">XInteractionHandler</type> for database related interaction requests.

Supported interaction requests by now (specified by an exception: The appropriate exception has to be returned by the getRequest method of the object implementing the <type scope="com.sun.star.task">XInteractionRequest</type> interface.

Definition at line 58 of file dbinteraction.hxx.

Member Enumeration Documentation

◆ Continuation

known continuation types

Enumerator
APPROVE 
DISAPPROVE 
RETRY 
ABORT 
SUPPLY_PARAMETERS 
SUPPLY_DOCUMENTSAVE 

Definition at line 105 of file dbinteraction.hxx.

Constructor & Destructor Documentation

◆ BasicInteractionHandler()

dbaui::BasicInteractionHandler::BasicInteractionHandler ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const bool  i_bFallbackToGeneric 
)

Definition at line 63 of file dbinteraction.cxx.

References m_bFallbackToGeneric.

Member Function Documentation

◆ getContinuation()

sal_Int32 dbaui::BasicInteractionHandler::getContinuation ( Continuation  _eCont,
const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &  _rContinuations 
)
staticprotected

check if a given continuation sequence contains a given continuation type

Returns
the index within <arg>_rContinuations</arg> of the first occurrence of a continuation of the requested type, -1 of no such continuation exists

Definition at line 310 of file dbinteraction.cxx.

References ABORT, APPROVE, DISAPPROVE, i, RETRY, SUPPLY_DOCUMENTSAVE, and SUPPLY_PARAMETERS.

◆ handle()

void SAL_CALL dbaui::BasicInteractionHandler::handle ( const css::uno::Reference< css::task::XInteractionRequest > &  Request)
overridevirtual

Definition at line 82 of file dbinteraction.cxx.

References impl_handle_throw().

◆ handleInteractionRequest()

sal_Bool SAL_CALL dbaui::BasicInteractionHandler::handleInteractionRequest ( const css::uno::Reference< css::task::XInteractionRequest > &  Request)
overridevirtual

Definition at line 77 of file dbinteraction.cxx.

References impl_handle_throw().

◆ impl_handle_throw()

bool dbaui::BasicInteractionHandler::impl_handle_throw ( const css::uno::Reference< css::task::XInteractionRequest > &  i_Request)
protected

◆ implHandle() [1/3]

static void dbaui::BasicInteractionHandler::implHandle ( const ::dbtools::SQLExceptionInfo _rSqlInfo,
const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &  _rContinuations 
)
staticprotected

handle SQLExceptions (and derived classes)

Referenced by impl_handle_throw().

◆ implHandle() [2/3]

void dbaui::BasicInteractionHandler::implHandle ( const css::sdb::DocumentSaveRequest &  _rParamRequest,
const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &  _rContinuations 
)
protected

handle document save requests

◆ implHandle() [3/3]

void dbaui::BasicInteractionHandler::implHandle ( const css::sdb::ParametersRequest &  _rParamRequest,
const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &  _rContinuations 
)
protected

handle parameter requests

◆ implHandleUnknown()

bool dbaui::BasicInteractionHandler::implHandleUnknown ( const css::uno::Reference< css::task::XInteractionRequest > &  _rxRequest)
protected

handles requests which are not SDB-specific

Definition at line 298 of file dbinteraction.cxx.

References m_xContext.

Referenced by impl_handle_throw().

◆ initialize()

void SAL_CALL dbaui::BasicInteractionHandler::initialize ( const css::uno::Sequence< css::uno::Any > &  rArgs)
overridevirtual

Definition at line 71 of file dbinteraction.cxx.

References aMap, and m_xParentWindow.

Member Data Documentation

◆ m_bFallbackToGeneric

const bool dbaui::BasicInteractionHandler::m_bFallbackToGeneric
private

Definition at line 64 of file dbinteraction.hxx.

Referenced by BasicInteractionHandler(), and impl_handle_throw().

◆ m_xContext

const css::uno::Reference< css::uno::XComponentContext > dbaui::BasicInteractionHandler::m_xContext
private

Definition at line 63 of file dbinteraction.hxx.

Referenced by implHandleUnknown().

◆ m_xParentWindow

css::uno::Reference< css::awt::XWindow > dbaui::BasicInteractionHandler::m_xParentWindow
private

Definition at line 61 of file dbinteraction.hxx.

Referenced by initialize().


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