LibreOffice Module dbaccess (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
dbaccess::ODsnTypeCollection Class Referencefinal

#include <dsntypes.hxx>

Inheritance diagram for dbaccess::ODsnTypeCollection:
[legend]
Collaboration diagram for dbaccess::ODsnTypeCollection:
[legend]

Public Member Functions

 ODsnTypeCollection (const css::uno::Reference< css::uno::XComponentContext > &_xContext)
 
 ~ODsnTypeCollection ()
 
OUString getTypeDisplayName (std::u16string_view _sURL) const
 get the datasource type display name from a DSN string More...
 
OUString cutPrefix (std::u16string_view _sURL) const
 on a given string, cut the type prefix and return the result More...
 
OUString getPrefix (std::u16string_view _sURL) const
 on a given string, return the type prefix More...
 
bool hasDriver (const char *_pAsciiPattern) const
 determines whether there is a driver for the given URL prefix/pattern More...
 
OUString getJavaDriverClass (std::u16string_view _sURL) const
 on a given string, return the Java Driver Class More...
 
OUString getMediaType (std::u16string_view _sURL) const
 returns the media type of a file based database More...
 
OUString getDatasourcePrefixFromMediaType (std::u16string_view _sMediaType, std::u16string_view _sExtension)
 returns the dsn prefix for a given media type More...
 
void extractHostNamePort (const OUString &_rDsn, OUString &_sDatabaseName, OUString &_rHostname, sal_Int32 &_nPortNumber) const
 
bool supportsTableCreation (std::u16string_view _sURL) const
 check if the given data source allows creation of tables More...
 
bool supportsColumnDescription (std::u16string_view _sURL) const
 check if the given data source allows to show column description. More...
 
bool supportsBrowsing (std::u16string_view _sURL) const
 
bool supportsDBCreation (std::u16string_view _sURL) const
 
bool isFileSystemBased (std::u16string_view _sURL) const
 check if the given data source type is based on the file system - i.e. the URL is a prefix plus a file URL More...
 
bool isConnectionUrlRequired (std::u16string_view _sURL) const
 
css::uno::Sequence< css::beans::PropertyValue > getDefaultDBSettings (std::u16string_view _sURL) const
 returns default settings for newly created databases of the given type. More...
 
TypeIterator begin () const
 get access to the first element of the types collection More...
 
TypeIterator end () const
 get access to the (last + 1st) element of the types collection More...
 
void fillPageIds (std::u16string_view _sURL, std::vector< sal_Int16 > &_rOutPathIds) const
 
DATASOURCE_TYPE determineType (std::u16string_view _rDsn) const
 
sal_Int32 getIndexOf (std::u16string_view _sURL) const
 
sal_Int32 size () const
 
OUString getType (std::u16string_view _sURL) const
 
 TypeIterator (const TypeIterator &_rSource)
 
 ~TypeIterator ()
 
OUString const & getURLPrefix () const
 
OUString const & getDisplayName () const
 
const TypeIteratoroperator++ ()
 prefix increment More...
 

Static Public Member Functions

static bool isEmbeddedDatabase (std::u16string_view _sURL)
 checks if the given data source type embeds its data into the database document More...
 
static OUString getEmbeddedDatabase ()
 
static bool isShowPropertiesEnabled (const OUString &_sURL)
 

Protected Member Functions

 TypeIterator (const ODsnTypeCollection *_pContainer, sal_Int32 _nInitialPos)
 

Protected Attributes

const ODsnTypeCollectionm_pContainer
 
sal_Int32 m_nPosition
 

Private Attributes

std::vector< OUString > m_aDsnTypesDisplayNames
 
std::vector< OUString > m_aDsnPrefixes
 user readable names for the datasource types More...
 
::connectivity::DriversConfig m_aDriverConfig
 DSN prefixes which determine the type of a datasource. More...
 
sal_Int32 m_nLivingIterators
 

Friends

class ODsnTypeCollection::TypeIterator
 
class ODsnTypeCollection
 
bool OOO_DLLPUBLIC_DBA operator== (const TypeIterator &lhs, const TypeIterator &rhs)
 
bool OOO_DLLPUBLIC_DBA operator!= (const TypeIterator &lhs, const TypeIterator &rhs)
 

Detailed Description

Definition at line 104 of file dsntypes.hxx.

Constructor & Destructor Documentation

◆ ODsnTypeCollection()

dbaccess::ODsnTypeCollection::ODsnTypeCollection ( const css::uno::Reference< css::uno::XComponentContext > &  _xContext)

◆ ~ODsnTypeCollection()

dbaccess::ODsnTypeCollection::~ODsnTypeCollection ( )

Definition at line 72 of file dsntypes.cxx.

References m_nLivingIterators.

◆ ~TypeIterator()

dbaccess::ODsnTypeCollection::~TypeIterator ( )

Member Function Documentation

◆ begin()

ODsnTypeCollection::TypeIterator dbaccess::ODsnTypeCollection::begin ( ) const
inline

get access to the first element of the types collection

Definition at line 216 of file dsntypes.hxx.

References TypeIterator().

Referenced by dbaui::OGeneralPageWizard::initializeEmbeddedDBList(), dbaui::OGeneralPage::initializeTypeList(), and dbaui::ODbTypeWizDialogSetup::ODbTypeWizDialogSetup().

◆ cutPrefix()

OUString dbaccess::ODsnTypeCollection::cutPrefix ( std::u16string_view  _sURL) const

◆ determineType()

DATASOURCE_TYPE dbaccess::ODsnTypeCollection::determineType ( std::u16string_view  _rDsn) const

Definition at line 299 of file dsntypes.cxx.

References dbaccess::DST_ADO, dbaccess::DST_CALC, dbaccess::DST_DBASE, dbaccess::DST_EMBEDDED_FIREBIRD, dbaccess::DST_EMBEDDED_HSQLDB, dbaccess::DST_EMBEDDED_UNKNOWN, dbaccess::DST_EVOLUTION, dbaccess::DST_EVOLUTION_GROUPWISE, dbaccess::DST_EVOLUTION_LDAP, dbaccess::DST_FIREBIRD, dbaccess::DST_FLAT, dbaccess::DST_JDBC, dbaccess::DST_KAB, dbaccess::DST_LDAP, dbaccess::DST_MACAB, dbaccess::DST_MOZILLA, dbaccess::DST_MSACCESS, dbaccess::DST_MSACCESS_2007, dbaccess::DST_MYSQL_JDBC, dbaccess::DST_MYSQL_NATIVE, dbaccess::DST_MYSQL_NATIVE_DIRECT, dbaccess::DST_MYSQL_ODBC, dbaccess::DST_ODBC, dbaccess::DST_ORACLE_JDBC, dbaccess::DST_OUTLOOK, dbaccess::DST_OUTLOOKEXP, dbaccess::DST_POSTGRES, dbaccess::DST_THUNDERBIRD, dbaccess::DST_UNKNOWN, dbaccess::DST_WRITER, eType, match(), sPrefix, comphelper::string::stripEnd(), and u.

Referenced by dbaui::ODbTypeWizDialogSetup::activateDatabasePath(), dbaui::OGeneralPage::approveDatasourceType(), dbaui::OConnectionTabPage::checkTestConnection(), dbaui::OConnectionTabPageSetup::checkTestConnection(), dbaui::OConnectionHelper::commitURL(), dbaui::ODbDataSourceAdministrationHelper::convertUrl(), dbaui::ODbTypeWizDialog::determineNextState(), dbaxml::ODBExport::exportConnectionData(), dbaui::OConnectionTabPage::FillItemSet(), fillPageIds(), dbaui::ODbDataSourceAdministrationHelper::getConnectionURL(), dbaui::ODbAdminDialog::impl_resetPages(), dbaui::ODbAdminDialog::impl_selectDataSource(), dbaui::OConnectionHelper::implInitControls(), dbaui::OConnectionTabPage::implInitControls(), and dbaui::OConnectionTabPageSetup::implInitControls().

◆ end()

ODsnTypeCollection::TypeIterator dbaccess::ODsnTypeCollection::end ( ) const
inline

get access to the (last + 1st) element of the types collection

Definition at line 217 of file dsntypes.hxx.

References m_aDsnTypesDisplayNames, and TypeIterator().

Referenced by dbaui::OGeneralPageWizard::initializeEmbeddedDBList(), dbaui::OGeneralPage::initializeTypeList(), and dbaui::ODbTypeWizDialogSetup::ODbTypeWizDialogSetup().

◆ extractHostNamePort()

void dbaccess::ODsnTypeCollection::extractHostNamePort ( const OUString &  _rDsn,
OUString &  _sDatabaseName,
OUString &  _rHostname,
sal_Int32 &  _nPortNumber 
) const

◆ fillPageIds()

void dbaccess::ODsnTypeCollection::fillPageIds ( std::u16string_view  _sURL,
std::vector< sal_Int16 > &  _rOutPathIds 
) const

◆ getDatasourcePrefixFromMediaType()

OUString dbaccess::ODsnTypeCollection::getDatasourcePrefixFromMediaType ( std::u16string_view  _sMediaType,
std::u16string_view  _sExtension 
)

◆ getDefaultDBSettings()

Sequence< PropertyValue > dbaccess::ODsnTypeCollection::getDefaultDBSettings ( std::u16string_view  _sURL) const

returns default settings for newly created databases of the given type.

Definition at line 279 of file dsntypes.cxx.

References aProperties, connectivity::DriversConfig::getProperties(), and m_aDriverConfig.

Referenced by dbaui::ODbTypeWizDialogSetup::CreateDatabase().

◆ getDisplayName()

OUString const & dbaccess::ODsnTypeCollection::getDisplayName ( ) const

◆ getEmbeddedDatabase()

OUString dbaccess::ODsnTypeCollection::getEmbeddedDatabase ( )
static

◆ getIndexOf()

sal_Int32 dbaccess::ODsnTypeCollection::getIndexOf ( std::u16string_view  _sURL) const

◆ getJavaDriverClass()

OUString dbaccess::ODsnTypeCollection::getJavaDriverClass ( std::u16string_view  _sURL) const

◆ getMediaType()

OUString dbaccess::ODsnTypeCollection::getMediaType ( std::u16string_view  _sURL) const

returns the media type of a file based database

Definition at line 153 of file dsntypes.cxx.

References connectivity::DriversConfig::getMetaData(), comphelper::NamedValueCollection::getOrDefault(), and m_aDriverConfig.

Referenced by dbaxml::ODBExport::exportConnectionData().

◆ getPrefix()

OUString dbaccess::ODsnTypeCollection::getPrefix ( std::u16string_view  _sURL) const

◆ getType()

OUString dbaccess::ODsnTypeCollection::getType ( std::u16string_view  _sURL) const

◆ getTypeDisplayName()

OUString dbaccess::ODsnTypeCollection::getTypeDisplayName ( std::u16string_view  _sURL) const

◆ getURLPrefix()

OUString const & dbaccess::ODsnTypeCollection::getURLPrefix ( ) const

◆ hasDriver()

bool dbaccess::ODsnTypeCollection::hasDriver ( const char *  _pAsciiPattern) const

determines whether there is a driver for the given URL prefix/pattern

Definition at line 131 of file dsntypes.cxx.

References getPrefix(), and sPrefix.

Referenced by dbaui::OGeneralPage::approveDatasourceType(), and dbaui::OMySQLIntroPageSetup::implInitControls().

◆ isConnectionUrlRequired()

bool dbaccess::ODsnTypeCollection::isConnectionUrlRequired ( std::u16string_view  _sURL) const

◆ isEmbeddedDatabase()

bool dbaccess::ODsnTypeCollection::isEmbeddedDatabase ( std::u16string_view  _sURL)
static

checks if the given data source type embeds its data into the database document

Definition at line 285 of file dsntypes.cxx.

References o3tl::starts_with(), and u.

Referenced by dbaui::ODbTypeWizDialogSetup::CreateDatabase(), dbaui::OGeneralPageWizard::getEmbeddedDBName(), dbaui::OApplicationController::GetState(), and dbaui::OGeneralPageWizard::initializeEmbeddedDBList().

◆ isFileSystemBased()

bool dbaccess::ODsnTypeCollection::isFileSystemBased ( std::u16string_view  _sURL) const

◆ isShowPropertiesEnabled()

bool dbaccess::ODsnTypeCollection::isShowPropertiesEnabled ( const OUString &  _sURL)
static

Definition at line 188 of file dsntypes.cxx.

Referenced by dbaui::OApplicationController::GetState().

◆ operator++()

const TypeIterator & dbaccess::ODsnTypeCollection::operator++ ( )

prefix increment

◆ size()

sal_Int32 dbaccess::ODsnTypeCollection::size ( ) const

◆ supportsBrowsing()

bool dbaccess::ODsnTypeCollection::supportsBrowsing ( std::u16string_view  _sURL) const

◆ supportsColumnDescription()

bool dbaccess::ODsnTypeCollection::supportsColumnDescription ( std::u16string_view  _sURL) const

check if the given data source allows to show column description.

Definition at line 261 of file dsntypes.cxx.

References connectivity::DriversConfig::getMetaData(), comphelper::NamedValueCollection::getOrDefault(), and m_aDriverConfig.

Referenced by dbaui::OTableEditorCtrl::Init().

◆ supportsDBCreation()

bool dbaccess::ODsnTypeCollection::supportsDBCreation ( std::u16string_view  _sURL) const

◆ supportsTableCreation()

bool dbaccess::ODsnTypeCollection::supportsTableCreation ( std::u16string_view  _sURL) const

check if the given data source allows creation of tables

Definition at line 255 of file dsntypes.cxx.

References connectivity::DriversConfig::getMetaData(), comphelper::NamedValueCollection::getOrDefault(), and m_aDriverConfig.

Referenced by dbaui::ODbTypeWizDialogSetup::enterState().

◆ TypeIterator() [1/2]

dbaccess::ODsnTypeCollection::TypeIterator ( const ODsnTypeCollection _pContainer,
sal_Int32  _nInitialPos 
)
protected

◆ TypeIterator() [2/2]

dbaccess::ODsnTypeCollection::TypeIterator ( const TypeIterator &  _rSource)

Friends And Related Function Documentation

◆ ODsnTypeCollection

friend class ODsnTypeCollection
friend

Definition at line 192 of file dsntypes.hxx.

◆ ODsnTypeCollection::TypeIterator

friend class ODsnTypeCollection::TypeIterator
friend

Definition at line 117 of file dsntypes.hxx.

◆ operator!=

bool OOO_DLLPUBLIC_DBA operator!= ( const TypeIterator lhs,
const TypeIterator rhs 
)
friend

Definition at line 195 of file dsntypes.hxx.

◆ operator==

bool OOO_DLLPUBLIC_DBA operator== ( const TypeIterator lhs,
const TypeIterator rhs 
)
friend

Member Data Documentation

◆ m_aDriverConfig

::connectivity::DriversConfig dbaccess::ODsnTypeCollection::m_aDriverConfig
private

◆ m_aDsnPrefixes

std::vector<OUString> dbaccess::ODsnTypeCollection::m_aDsnPrefixes
private

user readable names for the datasource types

Definition at line 108 of file dsntypes.hxx.

Referenced by cutPrefix(), getIndexOf(), getPrefix(), getType(), isConnectionUrlRequired(), ODsnTypeCollection(), and size().

◆ m_aDsnTypesDisplayNames

std::vector<OUString> dbaccess::ODsnTypeCollection::m_aDsnTypesDisplayNames
private

Definition at line 107 of file dsntypes.hxx.

Referenced by end(), and ODsnTypeCollection().

◆ m_nLivingIterators

sal_Int32 dbaccess::ODsnTypeCollection::m_nLivingIterators
private

Definition at line 112 of file dsntypes.hxx.

Referenced by ~ODsnTypeCollection().

◆ m_nPosition

sal_Int32 dbaccess::ODsnTypeCollection::m_nPosition
protected

Definition at line 199 of file dsntypes.hxx.

◆ m_pContainer

const ODsnTypeCollection* dbaccess::ODsnTypeCollection::m_pContainer
protected

Definition at line 198 of file dsntypes.hxx.


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