Skip to content

Package: ECPProviderRegistry

ECPProviderRegistry

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eike Stepper - initial API and implementation
13: * Eugen Neufeld - JavaDoc and API cleanup
14: * Jonas Helming - API cleanup
15: *
16: *******************************************************************************/
17:
18: package org.eclipse.emf.ecp.core;
19:
20: import java.util.Collection;
21:
22: /**
23: * Registry class to manage the registered providers.
24: * It is available as an OSGi service or using {@link org.eclipse.emf.ecp.core.util.ECPUtil} It publishes observable
25: * events on the {@link org.eclipse.emf.ecp.core.util.observer.ECPObserverBus ECPObserverBus}.
26: * Related ECPObserver types: {@link org.eclipse.emf.ecp.core.util.observer.ECPProvidersChangedObserver
27: * ECPProvidersChangedObserver}. Use {@link org.eclipse.emf.ecp.core.util.ECPUtil#getECPObserverBus()
28: * ECPUtil#getECPObserverBus()} to
29: * retrieve the ObserverBus and
30: * {@link org.eclipse.emf.ecp.core.util.observer.ECPObserverBus#register(org.eclipse.emf.ecp.core.util.observer.ECPObserver)
31: * ECPObserverBus#register(ECPObserver)} to register an Observer.
32: *
33: * @author Eike Stepper
34: * @author Jonas
35: * @noimplement This interface is not intended to be implemented by clients.
36: * @noextend This interface is not intended to be extended by clients.
37: */
38: public interface ECPProviderRegistry {
39:
40:         /**
41:          * This method returns the ECPProvider based on the name.
42:          *
43:          * @param name the name of the {@link ECPProvider} to search for
44:          * @return the {@link ECPProvider}
45:          */
46:         ECPProvider getProvider(String name);
47:
48:         /**
49:          * This method returns all known providers.
50:          *
51:          * @return array of {@link ECPProvider ECPProviders}
52:          */
53:         Collection<ECPProvider> getProviders();
54:
55:         /**
56:          * Method to programmatically add an {@link ECPProvider} to list of available provider.
57:          *
58:          * @param provider the {@link ECPProvider} to add
59:          */
60:         void addProvider(ECPProvider provider);
61:
62:         /**
63:          * Delete a provider programmatically from the list of available providers by its name.
64:          *
65:          * @param name the name of the provider to delete
66:          */
67:         void removeProvider(String name);
68:
69: }