com.sun.star.comp.helper
Class SharedLibraryLoader
java.lang.Object
com.sun.star.comp.helper.SharedLibraryLoader
public class SharedLibraryLoader
extends java.lang.Object
com.sun.star.loader.SharedLibrary
, com.sun.star.comp.servicemanager.ServiceManager
, com.sun.star.lang.ServiceManager
static XSingleServiceFactory | getServiceFactory(String libName, String impName, XMultiServiceFactory smgr, XRegistryKey regKey) - Loads and returns a specific factory for a given library and implementation name.
|
static XSingleServiceFactory | getServiceFactory(XMultiServiceFactory smgr, XRegistryKey regKey) - Supplies the ServiceFactory of the default SharedLibraryLoader.
|
static boolean | writeRegistryServiceInfo(String libName, com.sun.star.lang.XMultiServiceFactory smgr, com.sun.star.registry.XRegistryKey regKey) - Registers the SharedLibraryLoader under a RegistryKey.
|
static boolean | writeRegistryServiceInfo(com.sun.star.lang.XMultiServiceFactory smgr, com.sun.star.registry.XRegistryKey regKey) - Registers the SharedLibraryLoader under a RegistryKey.
|
DEFAULT_IMPLEMENTATION
public static final String DEFAULT_IMPLEMENTATION
The default implementation name
DEFAULT_LIBRARY
public static final String DEFAULT_LIBRARY
The default library which contains the SharedLibraryLoader component
getServiceFactory
public static XSingleServiceFactory getServiceFactory(String libName,
String impName,
XMultiServiceFactory smgr,
XRegistryKey regKey)
Loads and returns a specific factory for a given library and implementation name.
libName
- the name of the shared libraryimpName
- the implementation name of the componentsmgr
- the ServiceManagerregKey
- the root registry key
- the factory of the component
com.sun.star.loader.SharedLibrary
, com.sun.star.lang.ServiceManager
, com.sun.star.registry.RegistryKey
getServiceFactory
public static XSingleServiceFactory getServiceFactory(XMultiServiceFactory smgr,
XRegistryKey regKey)
Supplies the ServiceFactory of the default SharedLibraryLoader.
The defaults are "shlibloader.uno"
for the library and "com.sun.star.comp.stoc.DLLComponentLoader"
for the component name.
smgr
- the ServiceManagerregKey
- the root registry key
- the factory for the "com.sun.star.comp.stoc.DLLComponentLoader" component.
com.sun.star.loader.SharedLibrary
, com.sun.star.lang.ServiceManager
, com.sun.star.registry.RegistryKey
writeRegistryServiceInfo
public static boolean writeRegistryServiceInfo(String libName,
com.sun.star.lang.XMultiServiceFactory smgr,
com.sun.star.registry.XRegistryKey regKey)
throws com.sun.star.registry.InvalidRegistryException,
com.sun.star.uno.RuntimeException
Registers the SharedLibraryLoader under a RegistryKey.
libName
- name of the shared librarysmgr
- the ServiceManagerregKey
- the root key under that the component should be registered
- true if the registration was successfull - otherwise false
com.sun.star.loader.SharedLibrary
, com.sun.star.lang.ServiceManager
, com.sun.star.registry.RegistryKey
writeRegistryServiceInfo
public static boolean writeRegistryServiceInfo(com.sun.star.lang.XMultiServiceFactory smgr,
com.sun.star.registry.XRegistryKey regKey)
Registers the SharedLibraryLoader under a RegistryKey.
smgr
- the ServiceManagerregKey
- the root key under that the component should be registered
- true if the registration was successfull - otherwise false
com.sun.star.loader.SharedLibrary
, com.sun.star.lang.ServiceManager
, com.sun.star.registry.RegistryKey