@Handler( id = "getProvidersByType", input = { @HandlerInput(name = "msgSecurityName", type = String.class, required = true), @HandlerInput(name = "configName", type = String.class, required = true), @HandlerInput(name = "type", type = List.class, required = true) }, output = {@HandlerOutput(name = "result", type = List.class)}) public static void getProvidersByType(HandlerContext handlerCtx) throws Exception { List type = (List) handlerCtx.getInputValue("type"); List result = new ArrayList(); String configName = (String) handlerCtx.getInputValue("configName"); String msgSecurityName = (String) handlerCtx.getInputValue("msgSecurityName"); String endpoint = GuiUtil.getSessionValue("REST_URL") + "/configs/config/" + configName + "/security-service/message-security-config/" + msgSecurityName + "/provider-config"; List<String> providers = (List<String>) RestUtil.getChildList(endpoint); for (String providerEndpoint : providers) { Map providerAttrs = (HashMap) RestUtil.getAttributesMap(providerEndpoint); String providerType = (String) providerAttrs.get("providerType"); if (type.contains(providerType)) { result.add( com.sun.jsftemplating.util.Util.htmlEscape((String) providerAttrs.get("providerId"))); } } result.add(0, ""); handlerCtx.setOutputValue("result", result); }