summaryrefslogtreecommitdiff
path: root/javaunohelper/com
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-12-01 16:03:15 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-12-01 16:03:15 +0000
commit02f36f4630be1bef33f363928fa33008feda35ca (patch)
treed2bf42f2c1507db97a095f19be6e1bee27ceab98 /javaunohelper/com
parent0d7d333f05431ffbf175163725ac4597bc328cfc (diff)
INTEGRATION: CWS smoketest11 (1.1.2); FILE ADDED
2006/11/02 16:00:51 jl 1.1.2.1: #i71115# new class which is used to register the services in this module
Diffstat (limited to 'javaunohelper/com')
-rw-r--r--javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java101
1 files changed, 101 insertions, 0 deletions
diff --git a/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java b/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java
new file mode 100644
index 000000000000..36745be7e9e0
--- /dev/null
+++ b/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: JavaUNOHelperServices.java,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2006-12-01 17:03:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * the BSD license.
+ *
+ * Copyright (c) 2003 by Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *************************************************************************/
+package com.sun.star.comp;
+
+import com.sun.star.lib.uno.helper.Factory;
+import com.sun.star.lang.XMultiComponentFactory;
+import com.sun.star.lang.XSingleComponentFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.registry.XRegistryKey;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.uno.Type;
+import com.sun.star.uno.Any;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.comp.juhtest.SmoketestCommandEnvironment;
+
+
+/** This class is the registration class for all services in this module.
+ *
+ * Note that not all files which can be used as service need to be registered
+ * by this class.
+ */
+public class JavaUNOHelperServices {
+
+ static private final String __service_smoketestCommandEnv =
+ "com.sun.star.deployment.test.SmoketestCommandEnvironment";
+
+ /**
+ * Gives a factory for creating the service.
+ * This method is called by the <code>JavaLoader</code>
+ * <p>
+ * @return returns a <code>XSingleComponentFactory</code> for creating
+ * the component
+ * @param sImplName the name of the implementation for which a
+ * service is desired
+ * @see com.sun.star.comp.loader.JavaLoader
+ */
+ public static XSingleComponentFactory __getComponentFactory(String sImplName)
+ {
+ XSingleComponentFactory xFactory = null;
+
+ if ( sImplName.equals( SmoketestCommandEnvironment.class.getName() ) )
+ xFactory = Factory.createComponentFactory(SmoketestCommandEnvironment.class,
+ SmoketestCommandEnvironment.getServiceNames());
+
+ return xFactory;
+ }
+
+ /**
+ * Writes the service information into the given registry key.
+ * This method is called by the <code>JavaLoader</code>
+ * <p>
+ * @return returns true if the operation succeeded
+ * @param regKey the registryKey
+ * @see com.sun.star.comp.loader.JavaLoader
+ */
+ public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
+ return Factory.writeRegistryServiceInfo(SmoketestCommandEnvironment.class.getName(),
+ SmoketestCommandEnvironment.getServiceNames(),
+ regKey);
+ }
+}
+
+