/*********************************************************************************************************************** | |
* Copyright (c) 2010 Attensity Europe GmbH. 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 | |
**********************************************************************************************************************/ | |
package org.eclipse.smila.processing.designer.ui.factories; | |
import org.eclipse.emf.common.notify.Adapter; | |
import org.eclipse.smila.processing.designer.model.processor.util.ProcessorAdapterFactory; | |
import org.eclipse.smila.processing.designer.ui.adapters.InvokePipeletAdapter; | |
import org.eclipse.smila.processing.designer.ui.adapters.InvokeServiceAdapter; | |
/** | |
* Used to create adapters of the EMF model. | |
* | |
* Copyright (c) 2010 Attensity Europe GmbH | |
* | |
* @author Tobias Liefke | |
*/ | |
public class UIAdapterFactory extends ProcessorAdapterFactory { | |
private static UIAdapterFactory instance; | |
private InvokePipeletAdapter invokePipeletAdapter; | |
private InvokeServiceAdapter invokeServiceAdapter; | |
/** | |
* Resolves the singleton instance of this factory. | |
* | |
* @return the singleton instance | |
*/ | |
public static UIAdapterFactory getInstance() { | |
if (instance == null) { | |
instance = new UIAdapterFactory(); | |
} | |
return instance; | |
} | |
/** | |
* Private constructor, as we are singleton. | |
*/ | |
private UIAdapterFactory() { | |
super(); | |
} | |
/** | |
* @see ProcessorAdapterFactory#createInvokePipeletAdapter() | |
*/ | |
@Override | |
public Adapter createInvokePipeletAdapter() { | |
if (invokePipeletAdapter == null) { | |
invokePipeletAdapter = new InvokePipeletAdapter(); | |
} | |
return invokePipeletAdapter; | |
} | |
} |