LibreOffice
LibreOffice 24.2 SDK API Reference
|
Provides a collection of implementations for services. More...
import"ServiceManager.idl";
Included Services | |
service | com::sun::star::lang::MultiServiceFactory |
This is a derived MultiServiceFactory service. More... | |
Exported Interfaces | |
interface | com::sun::star::lang::XComponent |
Disposing of service manager. More... | |
interface | com::sun::star::container::XSet |
Management of service factories. More... | |
interface | com::sun::star::container::XContentEnumerationAccess |
Enumeration of all service factories. More... | |
interface | com::sun::star::beans::XPropertySet |
Property access. More... | |
Exported Interfaces inherited from MultiServiceFactory | |
interface | com::sun::star::lang::XMultiServiceFactory |
This interface uses a service name to instantiate a component which supports the specified service. More... | |
interface | com::sun::star::lang::XMultiComponentFactory |
This interface uses a service name and a component context to instantiate a component which supports the specified service. More... | |
Public Attributes | |
com::sun::star::uno::XComponentContext | DefaultContext |
specifies the default component context to be used, if instantiating services via XMultiServiceFactory More... | |
Additional Inherited Members | |
Public Member Functions inherited from XMultiServiceFactory | |
com::sun::star::uno::XInterface | createInstance ([in] string aServiceSpecifier) raises ( com::sun::star::uno::Exception ) |
Creates an instance classified by the specified name. More... | |
com::sun::star::uno::XInterface | createInstanceWithArguments ([in] string ServiceSpecifier, [in] sequence< any > Arguments) raises ( com::sun::star::uno::Exception ) |
Creates an instance classified by the specified name and passes the arguments to that instance. More... | |
sequence< string > | getAvailableServiceNames () |
Provides the available names of the factory to be used to create instances. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
Public Member Functions inherited from XMultiComponentFactory | |
com::sun::star::uno::XInterface | createInstanceWithContext ([in] string aServiceSpecifier, [in] com::sun::star::uno::XComponentContext Context) raises (com::sun::star::uno::Exception) |
Creates an instance of a component which supports the services specified by the factory. More... | |
com::sun::star::uno::XInterface | createInstanceWithArgumentsAndContext ([in] string ServiceSpecifier, [in] sequence< any > Arguments, [in] com::sun::star::uno::XComponentContext Context) raises (com::sun::star::uno::Exception) |
Creates an instance of a component which supports the services specified by the factory, and initializes the new instance with the given arguments and context. More... | |
sequence< string > | getAvailableServiceNames () |
Gets the names of all supported services. More... | |
Public Member Functions inherited from XComponent | |
void | dispose () |
The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More... | |
void | addEventListener ([in] XEventListener xListener) |
adds an event listener to the object. More... | |
void | removeEventListener ([in] XEventListener aListener) |
removes an event listener from the listener list. More... | |
Public Member Functions inherited from XSet | |
boolean | has ([in] any aElement) |
void | insert ([in] any aElement) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException ) |
inserts the given element into this container. More... | |
void | remove ([in] any aElement) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::NoSuchElementException ) |
removes the given element from this container. More... | |
Public Member Functions inherited from XEnumerationAccess | |
com::sun::star::container::XEnumeration | createEnumeration () |
Public Member Functions inherited from XElementAccess | |
type | getElementType () |
boolean | hasElements () |
Public Member Functions inherited from XContentEnumerationAccess | |
com::sun::star::container::XEnumeration | createContentEnumeration ([in] string aServiceName) |
sequence< string > | getAvailableServiceNames () |
Protected Member Functions inherited from XPropertySet | |
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo () |
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the value of the property with the specified name. More... | |
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XPropertyChangeListener to the specified property. More... | |
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XPropertyChangeListener from the listener list. More... | |
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XVetoableChangeListener to the specified property with the name PropertyName. More... | |
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XVetoableChangeListener from the listener list. More... | |
Provides a collection of implementations for services.
This is a singleton you commonly find in your component context under key /singletons/com.sun.star.lang.theServiceManager
.
The factories are accessed with a service name. It is possible to access the factories with their implementation names, but you should avoid this.
Service factories added via com::sun::star::container::XSet should support the following interfaces:
supported interfaces/ implementation name
is used to create instances of the implementation.
Since LibreOffice 3.6, in addition to instances of XServiceInfo et al, the com::sun::star::container::XSet of at least the default C++ service manager implementation now also supports sequences of com::sun::star::beans::NamedValue in insert
and remove
. The sequence elements must each have a Name
of uri
and a string Value
that is the URI of a service rdb. It is legal for there to be no such uri
elements. For insert
, there can additionally be an optional element with a Name
of component-context
and a value that is a non-null reference of type com::sun::star::uno::XComponentContext that shall be used instead of this service manager's default component context when loading the corresponding implementations.
This is a derived MultiServiceFactory service.
|
optional |
Property access.
Enumeration of all service factories.
It is possible to enumerate all implementations that support the service specified with the argument of the com::sun::star::container::XContentEnumerationAccess::createContentEnumeration() method. The enumerator commonly returns XSingleComponentFactory interfaces.
interface com::sun::star::container::XSet |
Management of service factories.
interface com::sun::star::lang::XComponent |
Disposing of service manager.
The component context disposes its service manager singleton when going down (i.e. when the component context is disposed).
|
optionalproperty |
specifies the default component context to be used, if instantiating services via XMultiServiceFactory