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