blob: 23d6bffd5c33413b9169715862f5b7b921216c36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.ws.internal.wsfinder;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.wst.ws.internal.ext.WebServiceExtension;
import org.eclipse.wst.ws.internal.ext.WebServiceExtensionRegistryImpl;
/**
* @author joan
*
* Retrieves locators which extend {@link org.eclipse.wst.ws.internal.wsfinder.AbstractWebServiceLocator}.
* Locators must create an extension for the org.eclipse.wst.ws.locator extension point in order to be retrieved by
* the registry.
*/
public class WebServiceLocatorRegistry extends WebServiceExtensionRegistryImpl {
// Copyright
public static final String copyright = "(c) Copyright IBM Corporation 2000, 2002.";
/*
* This is a singleton becasue it was decided that the memory foot print
* is not as expensive as the time taken retrieving the data
*
*/
private static WebServiceLocatorRegistry wslr;
public static WebServiceLocatorRegistry getInstance()
{
if(wslr == null) wslr = new WebServiceLocatorRegistry();
return wslr;
}
private WebServiceLocatorRegistry()
{
super();
}
/**
* Children registries will have different extension types
* @return WebserviceExtension holds a config elem
* for that extension capable of creating an executable file
*/
public WebServiceExtension createWebServiceExtension(IConfigurationElement configElement)
{
return new WebServiceLocatorExtension(configElement);
}
/**
* Contacts platform registry and gets all locators which have registered
* using the org.eclipse.wst.ws.locator extension point.
* @return IConfigurationElement[] an array of elements which contain locators
* extending AbstractWebServiceLocator.
*/
public IConfigurationElement[] getConfigElements()
{
IExtensionRegistry reg = Platform.getExtensionRegistry();
IConfigurationElement[] config = reg.getConfigurationElementsFor(
"org.eclipse.wst.ws",
"locator");
return config;
}
}
|