xref: /AOO41X/main/desktop/test/deployment/passive/Services.java (revision 7c448b185c334cf5775051c7e51ef450c1327808)
1*7c448b18SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*7c448b18SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*7c448b18SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*7c448b18SAndrew Rist  * distributed with this work for additional information
6*7c448b18SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*7c448b18SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*7c448b18SAndrew Rist  * "License"); you may not use this file except in compliance
9*7c448b18SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*7c448b18SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*7c448b18SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*7c448b18SAndrew Rist  * software distributed under the License is distributed on an
15*7c448b18SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7c448b18SAndrew Rist  * KIND, either express or implied.  See the License for the
17*7c448b18SAndrew Rist  * specific language governing permissions and limitations
18*7c448b18SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*7c448b18SAndrew Rist  *************************************************************/
21*7c448b18SAndrew Rist 
22*7c448b18SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir package com.sun.star.comp.test.deployment.passive_java;
25cdf0e10cSrcweir 
26cdf0e10cSrcweir import com.sun.star.lang.XSingleComponentFactory;
27cdf0e10cSrcweir import com.sun.star.lib.uno.helper.Factory;
28cdf0e10cSrcweir 
29cdf0e10cSrcweir public final class Services {
Services()30cdf0e10cSrcweir     private Services() {}
31cdf0e10cSrcweir 
__getComponentFactory( String implementation)32cdf0e10cSrcweir     public static XSingleComponentFactory __getComponentFactory(
33cdf0e10cSrcweir         String implementation)
34cdf0e10cSrcweir     {
35cdf0e10cSrcweir         if (implementation.equals(Dispatch.implementationName)) {
36cdf0e10cSrcweir             return Factory.createComponentFactory(
37cdf0e10cSrcweir                 Dispatch.class, Dispatch.implementationName,
38cdf0e10cSrcweir                 Dispatch.serviceNames);
39cdf0e10cSrcweir         } else if (implementation.equals(Provider.implementationName)) {
40cdf0e10cSrcweir             return Factory.createComponentFactory(
41cdf0e10cSrcweir                 Provider.class, Provider.implementationName,
42cdf0e10cSrcweir                 Provider.serviceNames);
43cdf0e10cSrcweir         } else {
44cdf0e10cSrcweir             return null;
45cdf0e10cSrcweir         }
46cdf0e10cSrcweir     }
47cdf0e10cSrcweir }
48