SharedLibraryLoader.java (a893be29) SharedLibraryLoader.java (c86fe57e)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 20 unchanged lines hidden (view full) ---

29
30/**
31 * @deprecated use class Bootstrap bootstrapping a native UNO installation
32 * and use the shared library loader service.
33 *
34 * The <code>SharedLibraryLoader</code> class provides the functionality of the <code>com.sun.star.loader.SharedLibrary</code>
35 * service.
36 * <p>
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 20 unchanged lines hidden (view full) ---

29
30/**
31 * @deprecated use class Bootstrap bootstrapping a native UNO installation
32 * and use the shared library loader service.
33 *
34 * The <code>SharedLibraryLoader</code> class provides the functionality of the <code>com.sun.star.loader.SharedLibrary</code>
35 * service.
36 * <p>
37 * @see com.sun.star.loader.SharedLibrary
37 * @see "com.sun.star.loader.SharedLibrary"
38 * @see com.sun.star.comp.servicemanager.ServiceManager
38 * @see com.sun.star.comp.servicemanager.ServiceManager
39 * @see com.sun.star.lang.ServiceManager
39 * @see "com.sun.star.lang.ServiceManager"
40 */
41public class SharedLibraryLoader {
42 /**
43 * The default library which contains the SharedLibraryLoader component
44 */
45 public static final String DEFAULT_LIBRARY = "shlibloader.uno";
46
47 /**

--- 17 unchanged lines hidden (view full) ---

65 * Supplies the ServiceFactory of the default SharedLibraryLoader.
66 * The defaults are "shlibloader.uno"
67 * for the library and "com.sun.star.comp.stoc.DLLComponentLoader"
68 * for the component name.
69 * <p>
70 * @return the factory for the "com.sun.star.comp.stoc.DLLComponentLoader" component.
71 * @param smgr the ServiceManager
72 * @param regKey the root registry key
40 */
41public class SharedLibraryLoader {
42 /**
43 * The default library which contains the SharedLibraryLoader component
44 */
45 public static final String DEFAULT_LIBRARY = "shlibloader.uno";
46
47 /**

--- 17 unchanged lines hidden (view full) ---

65 * Supplies the ServiceFactory of the default SharedLibraryLoader.
66 * The defaults are "shlibloader.uno"
67 * for the library and "com.sun.star.comp.stoc.DLLComponentLoader"
68 * for the component name.
69 * <p>
70 * @return the factory for the "com.sun.star.comp.stoc.DLLComponentLoader" component.
71 * @param smgr the ServiceManager
72 * @param regKey the root registry key
73 * @see com.sun.star.loader.SharedLibrary
74 * @see com.sun.star.lang.ServiceManager
75 * @see com.sun.star.registry.RegistryKey
73 * @see "com.sun.star.loader.SharedLibrary"
74 * @see "com.sun.star.lang.ServiceManager"
75 * @see "com.sun.star.registry.RegistryKey"
76 */
77 public static XSingleServiceFactory getServiceFactory(
78 XMultiServiceFactory smgr,
79 XRegistryKey regKey )
80 {
81 return UnoRuntime.queryInterface(
82 XSingleServiceFactory.class,
83 component_getFactory(

--- 4 unchanged lines hidden (view full) ---

88 /**
89 * Loads and returns a specific factory for a given library and implementation name.
90 * <p>
91 * @return the factory of the component
92 * @param libName the name of the shared library
93 * @param impName the implementation name of the component
94 * @param smgr the ServiceManager
95 * @param regKey the root registry key
76 */
77 public static XSingleServiceFactory getServiceFactory(
78 XMultiServiceFactory smgr,
79 XRegistryKey regKey )
80 {
81 return UnoRuntime.queryInterface(
82 XSingleServiceFactory.class,
83 component_getFactory(

--- 4 unchanged lines hidden (view full) ---

88 /**
89 * Loads and returns a specific factory for a given library and implementation name.
90 * <p>
91 * @return the factory of the component
92 * @param libName the name of the shared library
93 * @param impName the implementation name of the component
94 * @param smgr the ServiceManager
95 * @param regKey the root registry key
96 * @see com.sun.star.loader.SharedLibrary
97 * @see com.sun.star.lang.ServiceManager
98 * @see com.sun.star.registry.RegistryKey
96 * @see "com.sun.star.loader.SharedLibrary"
97 * @see "com.sun.star.lang.ServiceManager"
98 * @see "com.sun.star.registry.RegistryKey"
99 */
100 public static XSingleServiceFactory getServiceFactory(
101 String libName,
102 String impName,
103 XMultiServiceFactory smgr,
104 XRegistryKey regKey )
105 {
106 return UnoRuntime.queryInterface(

--- 4 unchanged lines hidden (view full) ---

111 }
112
113 /**
114 * Registers the SharedLibraryLoader under a RegistryKey.
115 * <p>
116 * @return true if the registration was successful - otherwise false
117 * @param smgr the ServiceManager
118 * @param regKey the root key under that the component should be registered
99 */
100 public static XSingleServiceFactory getServiceFactory(
101 String libName,
102 String impName,
103 XMultiServiceFactory smgr,
104 XRegistryKey regKey )
105 {
106 return UnoRuntime.queryInterface(

--- 4 unchanged lines hidden (view full) ---

111 }
112
113 /**
114 * Registers the SharedLibraryLoader under a RegistryKey.
115 * <p>
116 * @return true if the registration was successful - otherwise false
117 * @param smgr the ServiceManager
118 * @param regKey the root key under that the component should be registered
119 * @see com.sun.star.loader.SharedLibrary
120 * @see com.sun.star.lang.ServiceManager
121 * @see com.sun.star.registry.RegistryKey
119 * @see "com.sun.star.loader.SharedLibrary"
120 * @see "com.sun.star.lang.ServiceManager"
121 * @see "com.sun.star.registry.RegistryKey"
122 */
123 public static boolean writeRegistryServiceInfo(
124 com.sun.star.lang.XMultiServiceFactory smgr,
125 com.sun.star.registry.XRegistryKey regKey )
126 {
127 return component_writeInfo(
128 DEFAULT_LIBRARY, smgr, regKey,
129 SharedLibraryLoader.class.getClassLoader() );
130 }
131
132 /**
133 * Registers the SharedLibraryLoader under a RegistryKey.
134 * <p>
135 * @return true if the registration was successful - otherwise false
136 * @param libName name of the shared library
137 * @param smgr the ServiceManager
138 * @param regKey the root key under that the component should be registered
122 */
123 public static boolean writeRegistryServiceInfo(
124 com.sun.star.lang.XMultiServiceFactory smgr,
125 com.sun.star.registry.XRegistryKey regKey )
126 {
127 return component_writeInfo(
128 DEFAULT_LIBRARY, smgr, regKey,
129 SharedLibraryLoader.class.getClassLoader() );
130 }
131
132 /**
133 * Registers the SharedLibraryLoader under a RegistryKey.
134 * <p>
135 * @return true if the registration was successful - otherwise false
136 * @param libName name of the shared library
137 * @param smgr the ServiceManager
138 * @param regKey the root key under that the component should be registered
139 * @see com.sun.star.loader.SharedLibrary
140 * @see com.sun.star.lang.ServiceManager
141 * @see com.sun.star.registry.RegistryKey
139 * @see "com.sun.star.loader.SharedLibrary"
140 * @see "com.sun.star.lang.ServiceManager"
141 * @see "com.sun.star.registry.RegistryKey"
142 */
143 public static boolean writeRegistryServiceInfo(
144 String libName,
145 com.sun.star.lang.XMultiServiceFactory smgr,
146 com.sun.star.registry.XRegistryKey regKey )
147
148 throws com.sun.star.registry.InvalidRegistryException,
149 com.sun.star.uno.RuntimeException
150 {
151 return component_writeInfo(
152 libName, smgr, regKey, SharedLibraryLoader.class.getClassLoader() );
153 }
154}
155
142 */
143 public static boolean writeRegistryServiceInfo(
144 String libName,
145 com.sun.star.lang.XMultiServiceFactory smgr,
146 com.sun.star.registry.XRegistryKey regKey )
147
148 throws com.sun.star.registry.InvalidRegistryException,
149 com.sun.star.uno.RuntimeException
150 {
151 return component_writeInfo(
152 libName, smgr, regKey, SharedLibraryLoader.class.getClassLoader() );
153 }
154}
155