package jetbrains.buildServer.clouds.kubernetes;

import jetbrains.buildServer.serverSide.InvalidProperty;
import jetbrains.buildServer.serverSide.PropertiesProcessor;

import java.util.Collection;
import java.util.Collections;
import java.util.Map;

/**
 * Created by ekoshkin (koshkinev@gmail.com) on 27.05.17.
 */
public class KubeProfilePropertiesProcessor implements PropertiesProcessor {
    @Override
    public Collection<InvalidProperty> process(Map<String, String> map) {
        return Collections.emptyList();
    }
}

@@ -165,88 +165,320 @@
 or;%0A
-%0Aimport java.util.Collection;%0Aimport java.util.Collections;%0Aimport java.util.Map
+import jetbrains.buildServer.util.StringUtil;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0Aimport java.util.Map;%0A%0Aimport static jetbrains.buildServer.clouds.kubernetes.KubeParametersConstants.API_SERVER_URL;%0Aimport static jetbrains.buildServer.clouds.kubernetes.KubeParametersConstants.AUTH_STRATEGY
 ;%0A%0A/
@@ -719,15 +719,8 @@
     
-return 
 Coll
@@ -729,21 +729,398 @@
 tion
-s.emptyList()
+%3CInvalidProperty%3E invalids = new ArrayList%3C%3E();%0A        if(StringUtil.isEmptyOrSpaces(map.get(API_SERVER_URL))) invalids.add(new InvalidProperty(API_SERVER_URL, %22Kubernetes API server URL must not be empty%22));%0A        if(StringUtil.isEmptyOrSpaces(map.get(AUTH_STRATEGY))) invalids.add(new InvalidProperty(AUTH_STRATEGY, %22Authentication strategy must be selected%22));%0A        return invalids
 ;%0A  

fix TW-51790, validate profile