blob: d90e120c39eae742802da7ce17e13a7df70e316f [file] [log] [blame]
/**
* Copyright (c)2020 CEA LIST, Committer Name, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* CEA LIST - Initial API and implementation
* Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr
*
*/
package org.eclipse.papyrus.pdp4eng.designer.engine.api;
import java.util.ArrayList;
/**
* Req002.001: The system shall have an engine to get the selected strategy
* </BR>
* Req002.002: The engine shall be able to execute selected rules
*<BR>
** Req002.003: the engine shall be a singleton .
*/
public interface IStrategyEngine {
/**
* getter of executable rules
* @return the list of possible rules
*/
public IStrategy getStrategyToExecute();
/**
* connect a catalog to the engine.
* @param catalog
*/
public void connectACatalog(IStrategyCatalog catalog);
/** get the current Catalog**/
public ArrayList<IStrategyCatalog> getCurrentCatalogList();
/**
* set the Strategy to execute
* @param strategy
*/
public void setStrategyToExecute(IStrategy strategy);
/**
* clear the list of executable rules
*/
public void clearExecutableStrategy();
/**
*
* @return true is the catalog and the context to execute strategy are set.
*/
public boolean isReadyToRun();
/**
*
* @param index
* @return the catalog in the register "index"
*/
IStrategyCatalog getCatalog(int index);
/**
*
* @param name
* @return the catalog named "name"
*/
IStrategyCatalog getCatalog(String name);
}