22#include <com/sun/star/uno/XComponentContext.hpp>
23#include <com/sun/star/beans/NamedValue.hpp>
25#include <rtl/ustring.hxx>
106 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
168 JobData( css::uno::Reference< css::uno::XComponentContext > xContext );
179 css::uno::Sequence< css::beans::NamedValue >
getConfig ()
const;
180 std::vector< css::beans::NamedValue >
getJobConfig ()
const;
186 void setAlias (
const OUString& sAlias );
188 void setEvent (
const OUString& sEvent ,
189 const OUString& sAlias );
190 void setJobConfig ( std::vector< css::beans::NamedValue >&& lArguments );
193 static std::vector< OUString >
getEnabledJobsForEvent(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
194 std::u16string_view sEvent );
197 const OUString& sEvent ,
198 ::std::vector< JobData::TJob2DocEventBinding >& lJobs );
holds all necessary information about a job and handle it's configuration (if any exist!...
void setEvent(const OUString &sEvent, const OUString &sAlias)
initialize this instance with new job values.
void disableJob()
mark a job as non startable for further requests @descr We don't remove the configuration entry!...
~JobData()
let this instance die @descr There is no chance any longer to work.
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to the uno service manager.
static void appendEnabledJobsForEvent(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const OUString &sEvent, ::std::vector< JobData::TJob2DocEventBinding > &lJobs)
EEnvironment getEnvironment() const
void setService(const OUString &sService)
initialize this instance as a job without configuration @descr This job has no configuration data.
bool hasCorrectContext(std::u16string_view rModuleIdent) const
JobData(css::uno::Reference< css::uno::XComponentContext > xContext)
standard ctor @descr It initialize this new instance.
bool hasConfig() const
return information, if this job is part of the global configuration package org.openoffice....
EMode getMode() const
these functions provides access to our internal members @descr These member represent any information...
EMode
These values can be used to differe between jobs with and jobs without a configuration.
@ E_EVENT
indicates a job with configuration, which was triggered by an event
@ E_SERVICE
indicates a job without configuration (The pure UNO implementation is used only.)
@ E_UNKNOWN_MODE
indicates a missing initialization
@ E_ALIAS
indicates a job with configuration (They alias represent the config key name.)
OUString getEnvironmentDescriptor() const
OUString getEvent() const
EEnvironment m_eEnvironment
Because jobs can be bind to different mechanism inside office, a job should know inside which environ...
OUString m_sContext
the module context list of this job.
EEnvironment
These values represent the environment type, in which a job can run.
@ E_UNKNOWN_ENVIRONMENT
indicates a missing initialization
@ E_DISPATCH
this job is used by the global dispatch framework
@ E_EXECUTION
this job is used by the global JobExecutor service
@ E_DOCUMENTEVENT
this job is used by the global event broadcaster
css::uno::Sequence< css::beans::NamedValue > getConfig() const
static std::vector< OUString > getEnabledJobsForEvent(const css::uno::Reference< css::uno::XComponentContext > &rxContext, std::u16string_view sEvent)
OUString getService() const
void setJobConfig(std::vector< css::beans::NamedValue > &&lArguments)
set the new job specific arguments @descr If a job finish his work, it can give us a new list of argu...
OUString m_sService
the uno implementation name of this job.
std::vector< css::beans::NamedValue > getJobConfig() const
EMode m_eMode
An instance of this class can be used in two different modes:
void setEnvironment(EEnvironment eEnvironment)
set a new environment descriptor for this job @descr It must(!) be done every time this container is ...
JobData & operator=(const JobData &rCopy)
operator for copying JobData instances @descr Sometimes such job data container must be moved from on...
void impl_reset()
reset all internal structures @descr If someone recycles this instance, he can switch from one using ...
std::vector< css::beans::NamedValue > m_lArguments
job specific configuration items... unknown for us! It's read from the configuration.
OUString m_sEvent
a job can be registered for an event.
OUString m_sAlias
the alias name of this job.
void setAlias(const OUString &sAlias)
initialize this instance as a job with configuration @descr They given alias can be used to address s...
Some jobs can be registered to "logical events", which are generated on demand if another document ev...
TJob2DocEventBinding(OUString sJobName, OUString sDocEvent)