1*a5b190bfSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*a5b190bfSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*a5b190bfSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*a5b190bfSAndrew Rist  * distributed with this work for additional information
6*a5b190bfSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*a5b190bfSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*a5b190bfSAndrew Rist  * "License"); you may not use this file except in compliance
9*a5b190bfSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*a5b190bfSAndrew Rist  *
11*a5b190bfSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*a5b190bfSAndrew Rist  *
13*a5b190bfSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*a5b190bfSAndrew Rist  * software distributed under the License is distributed on an
15*a5b190bfSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*a5b190bfSAndrew Rist  * KIND, either express or implied.  See the License for the
17*a5b190bfSAndrew Rist  * specific language governing permissions and limitations
18*a5b190bfSAndrew Rist  * under the License.
19*a5b190bfSAndrew Rist  *
20*a5b190bfSAndrew Rist  *************************************************************/
21*a5b190bfSAndrew Rist 
22*a5b190bfSAndrew Rist 
23cdf0e10cSrcweir package com.sun.star.comp;
24cdf0e10cSrcweir 
25cdf0e10cSrcweir import com.sun.star.lib.uno.helper.Factory;
26cdf0e10cSrcweir import com.sun.star.lang.XSingleComponentFactory;
27cdf0e10cSrcweir import com.sun.star.comp.juhtest.SmoketestCommandEnvironment;
28cdf0e10cSrcweir 
29cdf0e10cSrcweir 
30cdf0e10cSrcweir /** This class is the registration class for all services in this module.
31cdf0e10cSrcweir  *
32cdf0e10cSrcweir  * Note that not all files which can be used as service need to be registered
33cdf0e10cSrcweir  * by this class.
34cdf0e10cSrcweir  */
35cdf0e10cSrcweir public class JavaUNOHelperServices {
36cdf0e10cSrcweir 
37cdf0e10cSrcweir         static private final String __service_smoketestCommandEnv =
38cdf0e10cSrcweir         "com.sun.star.deployment.test.SmoketestCommandEnvironment";
39cdf0e10cSrcweir 
40cdf0e10cSrcweir      /**
41cdf0e10cSrcweir      * Gives a factory for creating the service.
42cdf0e10cSrcweir      * This method is called by the <code>JavaLoader</code>
43cdf0e10cSrcweir      * <p>
44cdf0e10cSrcweir      * @return  returns a <code>XSingleComponentFactory</code> for creating
45cdf0e10cSrcweir      *          the component
46cdf0e10cSrcweir      * @param   sImplName the name of the implementation for which a
47cdf0e10cSrcweir      *          service is desired
48cdf0e10cSrcweir      * @see     com.sun.star.comp.loader.JavaLoader
49cdf0e10cSrcweir      */
__getComponentFactory(String sImplName)50cdf0e10cSrcweir     public static XSingleComponentFactory __getComponentFactory(String sImplName)
51cdf0e10cSrcweir     {
52cdf0e10cSrcweir         XSingleComponentFactory xFactory = null;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir         if ( sImplName.equals( SmoketestCommandEnvironment.class.getName() ) )
55cdf0e10cSrcweir             xFactory = Factory.createComponentFactory(SmoketestCommandEnvironment.class,
56cdf0e10cSrcweir                                             SmoketestCommandEnvironment.getServiceNames());
57cdf0e10cSrcweir 
58cdf0e10cSrcweir         return xFactory;
59cdf0e10cSrcweir     }
60cdf0e10cSrcweir }
61