Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 90e0e76920b4a77d30fe8dd8df451142ced9a2ae (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
/*****************************************************************************
 * Copyright (c) 2014 CEA LIST.
 *
 * 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:
 *  CEA LIST - Initial API and implementation
 *****************************************************************************/
package org.eclipse.papyrus.moka.fuml.registry.service.framework;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.uml2.uml.Class;
import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
import org.eclipse.papyrus.moka.fuml.registry.AbstractSystemServicesRegistry;

public abstract class AbstractServicesRegistery extends AbstractSystemServicesRegistry {

	protected IServiceFactory serviceFactory;

	protected List<String> serviceQualifiedNames;

	protected String libraryName;

	public abstract void initServiceQualifiedNames();

	public abstract void initServiceFactory();

	public abstract void initLibraryName();

	public AbstractServicesRegistery() {
		this.initLibraryName();
		this.initServiceFactory();
		this.serviceQualifiedNames = new ArrayList<String>();
		this.initServiceQualifiedNames();
	}

	@Override
	public List<Object_> instantiateServices() {
		return this.instantiateServices(this.libraryName, this.serviceQualifiedNames);
	}

	@Override
	protected Object_ instantiateService(Class service) {
		return this.serviceFactory.instantiate(service);
	}
}

Back to the top