(incubating) | The Free and Open Productivity Suite
UNO Java Runtime

com.sun.star.comp.helper
Class SharedLibraryLoader

java.lang.Object
  |
  +--com.sun.star.comp.helper.SharedLibraryLoader

public class SharedLibraryLoader
extends java.lang.Object

The SharedLibraryLoader class provides the functionality of the com.sun.star.loader.SharedLibrary service.

Since:
UDK1.0
See Also:
com.sun.star.loader.SharedLibrary, com.sun.star.comp.servicemanager.ServiceManager, com.sun.star.lang.ServiceManager

Field Summary
static java.lang.String DEFAULT_IMPLEMENTATION
          The default implementation name
static java.lang.String DEFAULT_LIBRARY
          The default library which contains the SharedLibraryLoader component
 
Constructor Summary
SharedLibraryLoader()
           
 
Method Summary
static com.sun.star.lang.XSingleServiceFactory getServiceFactory(java.lang.String libName, java.lang.String impName, com.sun.star.lang.XMultiServiceFactory smgr, com.sun.star.registry.XRegistryKey regKey)
          Loads and returns a specific factory for a given library and implementation name.
static com.sun.star.lang.XSingleServiceFactory getServiceFactory(com.sun.star.lang.XMultiServiceFactory smgr, com.sun.star.registry.XRegistryKey regKey)
          Supplies the ServiceFactory of the default SharedLibraryLoader.
static boolean writeRegistryServiceInfo(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LIBRARY

public static final java.lang.String DEFAULT_LIBRARY
The default library which contains the SharedLibraryLoader component

See Also:
Constant Field Values

DEFAULT_IMPLEMENTATION

public static final java.lang.String DEFAULT_IMPLEMENTATION
The default implementation name

See Also:
Constant Field Values
Constructor Detail

SharedLibraryLoader

public SharedLibraryLoader()
Method Detail

getServiceFactory

public static com.sun.star.lang.XSingleServiceFactory getServiceFactory(com.sun.star.lang.XMultiServiceFactory smgr,
                                                                        com.sun.star.registry.XRegistryKey regKey)
Supplies the ServiceFactory of the default SharedLibraryLoader. The defaults are "cpld" for the library and "com.sun.star.comp.stoc.DLLComponentLoader" for the component name.

Parameters:
smgr - the ServiceManager
regKey - the root registry key
Returns:
the factory for the "com.sun.star.comp.stoc.DLLComponentLoader" component.
See Also:
com.sun.star.loader.SharedLibrary, com.sun.star.lang.ServiceManager, com.sun.star.registry.RegistryKey

getServiceFactory

public static com.sun.star.lang.XSingleServiceFactory getServiceFactory(java.lang.String libName,
                                                                        java.lang.String impName,
                                                                        com.sun.star.lang.XMultiServiceFactory smgr,
                                                                        com.sun.star.registry.XRegistryKey regKey)
Loads and returns a specific factory for a given library and implementation name.

Parameters:
libName - the name of the shared library
impName - the implementation name of the component
smgr - the ServiceManager
regKey - the root registry key
Returns:
the factory of the component
See Also:
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.

Parameters:
smgr - the ServiceManager
regKey - the root key under that the component should be registered
Returns:
true if the registration was successfull - otherwise false
See Also:
com.sun.star.loader.SharedLibrary, com.sun.star.lang.ServiceManager, com.sun.star.registry.RegistryKey

writeRegistryServiceInfo

public static boolean writeRegistryServiceInfo(java.lang.String libName,
                                               com.sun.star.lang.XMultiServiceFactory smgr,
                                               com.sun.star.registry.XRegistryKey regKey)
                                        throws com.sun.star.registry.InvalidRegistryException,
                                               RuntimeException
Registers the SharedLibraryLoader under a RegistryKey.

Parameters:
libName - name of the shared library
smgr - the ServiceManager
regKey - the root key under that the component should be registered
Returns:
true if the registration was successfull - otherwise false
com.sun.star.registry.InvalidRegistryException
RuntimeException
See Also:
com.sun.star.loader.SharedLibrary, com.sun.star.lang.ServiceManager, com.sun.star.registry.RegistryKey

UNO Java Runtime

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.