Search in sources :

Example 1 with ExternalCallAction

use of org.palladiosimulator.pcm.seff.ExternalCallAction in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddExternalCallAction method execute.

@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
    ExternalCallAction extCall = (ExternalCallAction) parameters.get("instance");
    HashMap<OperationInterface, OperationRequiredRole> requiredRolesMap = new HashMap<OperationInterface, OperationRequiredRole>();
    OperationSignature os = getOperationSignature(extCall, requiredRolesMap);
    if (os != null) {
        extCall.setCalledService_ExternalService(os);
        extCall.setRole_ExternalService(requiredRolesMap.get(os.getInterface__OperationSignature()));
    }
}
Also used : HashMap(java.util.HashMap) OperationSignature(org.palladiosimulator.pcm.repository.OperationSignature) ExternalCallAction(org.palladiosimulator.pcm.seff.ExternalCallAction) OperationInterface(org.palladiosimulator.pcm.repository.OperationInterface) OperationRequiredRole(org.palladiosimulator.pcm.repository.OperationRequiredRole)

Aggregations

HashMap (java.util.HashMap)1 OperationInterface (org.palladiosimulator.pcm.repository.OperationInterface)1 OperationRequiredRole (org.palladiosimulator.pcm.repository.OperationRequiredRole)1 OperationSignature (org.palladiosimulator.pcm.repository.OperationSignature)1 ExternalCallAction (org.palladiosimulator.pcm.seff.ExternalCallAction)1