/** | |
* 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 org.eclipse.emf.common.command.Command; | |
import org.eclipse.emf.transaction.TransactionalEditingDomain; | |
import org.eclipse.uml2.uml.Element; | |
/** | |
* Req001.001: A strategy shall be a model transformation. | |
* <BR> | |
* Req001.001.001: A Strategy shall contains a name in order to identify it. | |
* <BR> | |
* Req001.001.002: A Strategy shall contains a goal to explain to user the purpose of this transformation. | |
* <BR> | |
* Req001.001.003: A strategy shall contain the transformation of the model. | |
* | |
*/ | |
public interface IStrategy { | |
/**@return the name of the strategy | |
* **/ | |
public String getName(); | |
/** | |
* | |
* @return some information about the strategy | |
*/ | |
public String getGoal(); | |
/** | |
* | |
* @param model the model to apply the transformation | |
* @return true if the strategy can be applied | |
*/ | |
public boolean canBeApplied(Element element); | |
/** | |
* | |
* @param model the model to apply the transformation | |
* @return the command that is the transformation | |
*/ | |
public Command getCommand(Element element, TransactionalEditingDomain domain); | |
} |