LibreOffice Module desktop (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
dp_manager::ExtensionManager Class Reference

#include <dp_extensionmanager.hxx>

Inheritance diagram for dp_manager::ExtensionManager:
[legend]
Collaboration diagram for dp_manager::ExtensionManager:
[legend]

Public Member Functions

 ExtensionManager (css::uno::Reference< css::uno::XComponentContext >const &xContext)
 
virtual ~ExtensionManager () override
 
void check ()
 
void fireModified ()
 
virtual void SAL_CALL addModifyListener (css::uno::Reference< css::util::XModifyListener > const &xListener) override
 
virtual void SAL_CALL removeModifyListener (css::uno::Reference< css::util::XModifyListener > const &xListener) override
 
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackageTypeInfo > > SAL_CALL getSupportedPackageTypes () override
 
virtual css::uno::Reference< css::task::XAbortChannel > SAL_CALL createAbortChannel () override
 
virtual css::uno::Reference< css::deployment::XPackage > SAL_CALL addExtension (OUString const &url, css::uno::Sequence< css::beans::NamedValue > const &properties, OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual void SAL_CALL removeExtension (OUString const &identifier, OUString const &filename, OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual void SAL_CALL enableExtension (css::uno::Reference< css::deployment::XPackage > const &extension, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual void SAL_CALL disableExtension (css::uno::Reference< css::deployment::XPackage > const &extension, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual sal_Int32 SAL_CALL checkPrerequisitesAndEnable (css::uno::Reference< css::deployment::XPackage > const &extension, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL getDeployedExtensions (OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual css::uno::Reference< css::deployment::XPackage > SAL_CALL getDeployedExtension (OUString const &repository, OUString const &identifier, OUString const &filename, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL getExtensionsWithSameIdentifier (OUString const &identifier, OUString const &filename, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > > SAL_CALL getAllExtensions (css::uno::Reference< css::task::XAbortChannel > const &, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual void SAL_CALL reinstallDeployedExtensions (sal_Bool force, OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual sal_Bool SAL_CALL synchronize (css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL getExtensionsWithUnacceptedLicenses (OUString const &repository, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual sal_Bool SAL_CALL isReadOnlyRepository (OUString const &repository) override
 

Private Member Functions

css::uno::Reference< css::deployment::XPackageManager > getUserRepository ()
 
css::uno::Reference< css::deployment::XPackageManager > getSharedRepository ()
 
css::uno::Reference< css::deployment::XPackageManager > getBundledRepository ()
 
css::uno::Reference< css::deployment::XPackageManager > getTmpRepository ()
 
css::uno::Reference< css::deployment::XPackageManager > getBakRepository ()
 
bool isUserDisabled (OUString const &identifier, OUString const &filename)
 
void activateExtension (OUString const &identifier, OUString const &fileName, bool bUserDisabled, bool bStartup, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 
std::vector< css::uno::Reference< css::deployment::XPackage > > getExtensionsWithSameId (OUString const &identifier, OUString const &fileName)
 
css::uno::Reference< css::deployment::XPackage > backupExtension (OUString const &identifier, OUString const &fileName, css::uno::Reference< css::deployment::XPackageManager > const &xPackageManager, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 
void checkInstall (OUString const &displayName, css::uno::Reference< css::ucb::XCommandEnvironment > const &cmdEnv)
 
void checkUpdate (OUString const &newVersion, OUString const &newDisplayName, css::uno::Reference< css::deployment::XPackage > const &oldExtension, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 
void addExtensionsToMap (id2extensions &mapExt, css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &seqExt, OUString const &repository)
 
css::uno::Reference< css::deployment::XPackageManager > getPackageManager (OUString const &repository)
 
bool doChecksForAddExtension (css::uno::Reference< css::deployment::XPackageManager > const &xPackageMgr, css::uno::Sequence< css::beans::NamedValue > const &properties, css::uno::Reference< css::deployment::XPackage > const &xTmpExtension, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv, css::uno::Reference< css::deployment::XPackage > &out_existingExtension)
 
- Private Member Functions inherited from dp_misc::MutexHolder
::osl::Mutex & getMutex () const
 

Static Private Member Functions

static OUString StrSyncRepository ()
 
static bool isUserDisabled (css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &seqExtSameId)
 
static void activateExtension (css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &seqExt, bool bUserDisabled, bool bStartup, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::deployment::XPackageManagerFactory > m_xPackageManagerFactory
 
::osl::Mutex m_addMutex
 
std::vector< OUString > m_repositoryNames
 

Detailed Description

Definition at line 43 of file dp_extensionmanager.hxx.

Constructor & Destructor Documentation

dp_manager::ExtensionManager::ExtensionManager ( css::uno::Reference< css::uno::XComponentContext >const &  xContext)
explicit
dp_manager::ExtensionManager::~ExtensionManager ( )
overridevirtual

Definition at line 176 of file dp_extensionmanager.cxx.

Member Function Documentation

void dp_manager::ExtensionManager::activateExtension ( OUString const &  identifier,
OUString const &  fileName,
bool  bUserDisabled,
bool  bStartup,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
private
static void dp_manager::ExtensionManager::activateExtension ( css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &  seqExt,
bool  bUserDisabled,
bool  bStartup,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
staticprivate
Reference< css::deployment::XPackage > dp_manager::ExtensionManager::addExtension ( OUString const &  url,
css::uno::Sequence< css::beans::NamedValue > const &  properties,
OUString const &  repository,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
void dp_manager::ExtensionManager::addExtensionsToMap ( id2extensions mapExt,
css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &  seqExt,
OUString const &  repository 
)
private

Definition at line 234 of file dp_extensionmanager.cxx.

References dp_misc::getIdentifier(), i, index, and m_repositoryNames.

Referenced by getAllExtensions().

void dp_manager::ExtensionManager::addModifyListener ( css::uno::Reference< css::util::XModifyListener > const &  xListener)
overridevirtual

Definition at line 1378 of file dp_extensionmanager.cxx.

References check().

Reference< css::deployment::XPackage > dp_manager::ExtensionManager::backupExtension ( OUString const &  identifier,
OUString const &  fileName,
css::uno::Reference< css::deployment::XPackageManager > const &  xPackageManager,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
private

Definition at line 467 of file dp_extensionmanager.cxx.

References getTmpRepository().

Referenced by removeExtension().

void dp_manager::ExtensionManager::check ( )
void dp_manager::ExtensionManager::checkInstall ( OUString const &  displayName,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  cmdEnv 
)
private

Definition at line 1292 of file dp_extensionmanager.cxx.

References DpResId(), and dp_misc::interactContinuation().

Referenced by doChecksForAddExtension().

sal_Int32 dp_manager::ExtensionManager::checkPrerequisitesAndEnable ( css::uno::Reference< css::deployment::XPackage > const &  extension,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
void dp_manager::ExtensionManager::checkUpdate ( OUString const &  newVersion,
OUString const &  newDisplayName,
css::uno::Reference< css::deployment::XPackage > const &  oldExtension,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
private

Definition at line 1321 of file dp_extensionmanager.cxx.

References DpResId(), and dp_misc::interactContinuation().

Referenced by doChecksForAddExtension().

Reference< task::XAbortChannel > dp_manager::ExtensionManager::createAbortChannel ( )
overridevirtual

Definition at line 201 of file dp_extensionmanager.cxx.

void dp_manager::ExtensionManager::disableExtension ( css::uno::Reference< css::deployment::XPackage > const &  extension,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
bool dp_manager::ExtensionManager::doChecksForAddExtension ( css::uno::Reference< css::deployment::XPackageManager > const &  xPackageMgr,
css::uno::Sequence< css::beans::NamedValue > const &  properties,
css::uno::Reference< css::deployment::XPackage > const &  xTmpExtension,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv,
css::uno::Reference< css::deployment::XPackage > &  out_existingExtension 
)
private
Exceptions
css::deployment::DeploymentException
css::ucb::CommandFailedException
css::ucb::CommandAbortedException
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 507 of file dp_extensionmanager.cxx.

References checkInstall(), checkUpdate(), dp_misc::getDescriptionInfoset(), dp_misc::getIdentifier(), dp_misc::DescriptionInfoset::getSimpleLicenseAttributes(), dp_manager::ExtensionProperties::isExtensionUpdate(), dp_manager::ExtensionProperties::isSuppressedLicense(), m_xContext, and sDisplayName.

Referenced by addExtension().

void dp_manager::ExtensionManager::enableExtension ( css::uno::Reference< css::deployment::XPackage > const &  extension,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
void dp_manager::ExtensionManager::fireModified ( )
uno::Sequence< uno::Sequence< Reference< css::deployment::XPackage > > > dp_manager::ExtensionManager::getAllExtensions ( css::uno::Reference< css::task::XAbortChannel > const &  ,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
Reference< css::deployment::XPackageManager > dp_manager::ExtensionManager::getBakRepository ( )
private

Definition at line 196 of file dp_extensionmanager.cxx.

References m_xPackageManagerFactory.

Referenced by addExtension(), and getPackageManager().

Reference< css::deployment::XPackageManager > dp_manager::ExtensionManager::getBundledRepository ( )
private
Reference< css::deployment::XPackage > dp_manager::ExtensionManager::getDeployedExtension ( OUString const &  repository,
OUString const &  identifier,
OUString const &  filename,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual

Definition at line 1069 of file dp_extensionmanager.cxx.

References getPackageManager().

uno::Sequence< Reference< css::deployment::XPackage > > dp_manager::ExtensionManager::getDeployedExtensions ( OUString const &  repository,
css::uno::Reference< css::task::XAbortChannel > const &  ,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual

Definition at line 1059 of file dp_extensionmanager.cxx.

References getPackageManager().

std::vector< Reference< css::deployment::XPackage > > dp_manager::ExtensionManager::getExtensionsWithSameId ( OUString const &  identifier,
OUString const &  fileName 
)
private
uno::Sequence< Reference< css::deployment::XPackage > > dp_manager::ExtensionManager::getExtensionsWithSameIdentifier ( OUString const &  identifier,
OUString const &  filename,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
uno::Sequence< Reference< css::deployment::XPackage > > SAL_CALL dp_manager::ExtensionManager::getExtensionsWithUnacceptedLicenses ( OUString const &  repository,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
css::uno::Reference< css::deployment::XPackageManager > dp_manager::ExtensionManager::getPackageManager ( OUString const &  repository)
private
Reference< css::deployment::XPackageManager > dp_manager::ExtensionManager::getSharedRepository ( )
private
uno::Sequence< Reference< css::deployment::XPackageTypeInfo > > dp_manager::ExtensionManager::getSupportedPackageTypes ( )
overridevirtual

Definition at line 498 of file dp_extensionmanager.cxx.

References getUserRepository().

Reference< css::deployment::XPackageManager > dp_manager::ExtensionManager::getTmpRepository ( )
private
Reference< css::deployment::XPackageManager > dp_manager::ExtensionManager::getUserRepository ( )
private
sal_Bool dp_manager::ExtensionManager::isReadOnlyRepository ( OUString const &  repository)
overridevirtual

Definition at line 1362 of file dp_extensionmanager.cxx.

References getPackageManager().

bool dp_manager::ExtensionManager::isUserDisabled ( OUString const &  identifier,
OUString const &  filename 
)
private
static bool dp_manager::ExtensionManager::isUserDisabled ( css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &  seqExtSameId)
staticprivate
void dp_manager::ExtensionManager::reinstallDeployedExtensions ( sal_Bool  force,
OUString const &  repository,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
void dp_manager::ExtensionManager::removeExtension ( OUString const &  identifier,
OUString const &  filename,
OUString const &  repository,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual
void dp_manager::ExtensionManager::removeModifyListener ( css::uno::Reference< css::util::XModifyListener > const &  xListener)
overridevirtual

Definition at line 1386 of file dp_extensionmanager.cxx.

References check().

static OUString dp_manager::ExtensionManager::StrSyncRepository ( )
inlinestaticprivate

Definition at line 140 of file dp_extensionmanager.hxx.

References DpResId().

Referenced by synchronize().

sal_Bool dp_manager::ExtensionManager::synchronize ( css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual

Member Data Documentation

::osl::Mutex dp_manager::ExtensionManager::m_addMutex
private

Definition at line 146 of file dp_extensionmanager.hxx.

Referenced by addExtension().

std::vector< OUString > dp_manager::ExtensionManager::m_repositoryNames
private

Definition at line 151 of file dp_extensionmanager.hxx.

Referenced by addExtensionsToMap(), and ExtensionManager().

css::uno::Reference< css::uno::XComponentContext> dp_manager::ExtensionManager::m_xContext
private

Definition at line 142 of file dp_extensionmanager.hxx.

Referenced by doChecksForAddExtension(), ExtensionManager(), and synchronize().

css::uno::Reference<css::deployment::XPackageManagerFactory> dp_manager::ExtensionManager::m_xPackageManagerFactory
private

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