| /** |
| * 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.processstrategies; |
| |
| import org.eclipse.emf.common.command.Command; |
| import org.eclipse.emf.transaction.TransactionalEditingDomain; |
| import org.eclipse.papyrus.pdp4eng.designer.engine.api.IStrategy; |
| import org.eclipse.uml2.uml.Activity; |
| import org.eclipse.uml2.uml.Element; |
| import org.eclipse.papyrus.pdp4eng.designer.processstrategies.command.InstantiateGDPRConsentPatternCommand; |
| |
| public class InstantiateGDPRConsentPatternStrategy implements IStrategy { |
| |
| @Override |
| public String getName() { |
| return "GDPRConsentPatternStrategy"; |
| } |
| |
| @Override |
| public String getGoal() { |
| return "Instantiate GDPR Consent Pattern Strategy"; |
| } |
| |
| @Override |
| public boolean canBeApplied(Element element) { |
| if( element instanceof org.eclipse.uml2.uml.Activity) {return true;} |
| return false; |
| } |
| |
| @Override |
| public Command getCommand(Element element, TransactionalEditingDomain domain) { |
| // TODO Auto-generated method stub |
| return new InstantiateGDPRConsentPatternCommand(domain, (Activity) element); |
| |
| } |
| |
| } |
| |