package org.alien4cloud.tosca.utils;

import org.alien4cloud.tosca.model.definitions.ImplementationArtifact;
import org.alien4cloud.tosca.model.definitions.Interface;
import org.alien4cloud.tosca.model.definitions.Operation;

import java.util.Map;
import java.util.Optional;

import static alien4cloud.utils.AlienUtils.safe;

public final class InterfaceUtils {
    private InterfaceUtils() {
    }

    public static ImplementationArtifact getArtifact(Map<String, Interface> interfaceMap, String interfaceName, String operationName) {
        Optional.of(safe(interfaceMap).get(interfaceName)).map()
        Interface interfaz = safe(interfaceMap).get(interfaceName);
        if (interfaz == null) {
            return null;
        }
        Operation operation = safe(interfaz.getOperations()).get(operationName);
        if(operation )
    }

}

@@ -31,16 +31,116 @@
 utils;%0A%0A
+import static alien4cloud.utils.AlienUtils.safe;%0A%0Aimport java.util.Map;%0Aimport java.util.Optional;%0A%0A
 import o
@@ -323,108 +323,8 @@
 n;%0A%0A
-import java.util.Map;%0Aimport java.util.Optional;%0A%0Aimport static alien4cloud.utils.AlienUtils.safe;%0A%0A
 publ
@@ -835,15 +835,112 @@
 ion 
-)%0A    %7D%0A
+== null) %7B%0A            return null;%0A        %7D%0A        return operation.getImplementationArtifact();%0A    %7D
 %0A%7D%0A

Allow specific handling of docker image artifact update in the editor, util fix.