protected Map<ClusterEntity, InputsResponse> getInputsFromAllEntities() {
   Map<ClusterEntity, InputsResponse> result = Maps.newHashMap();
   result.putAll(
       api.get(InputsResponse.class).fromAllNodes().path("/system/inputs").executeOnAll());
   try {
     for (Radio radio : nodeService.radios().values()) {
       result.put(
           radio, api.get(InputsResponse.class).radio(radio).path("/system/inputs").execute());
     }
   } catch (APIException e) {
     log.error("Unable to fetch radio list: " + e);
   } catch (IOException e) {
     log.error("Unable to fetch radio list: " + e);
   }
   return result;
 }
 public InputTypeSummaryResponse getInputTypeInformation(Node node, String type)
     throws IOException, APIException {
   return api.get(InputTypeSummaryResponse.class)
       .node(node)
       .path("/system/inputs/types/{0}", type)
       .execute();
 }
  protected List<InputStateSummaryResponse> getInputsFromNode(Node node) {
    List<InputStateSummaryResponse> result = Lists.newArrayList();
    try {
      result = api.get(InputsResponse.class).node(node).path("/system/inputs").execute().inputs;
    } catch (APIException e) {
      log.error("Unable to fetch input list: " + e);
    } catch (IOException e) {
      log.error("Unable to fetch input list: " + e);
    }

    return result;
  }
  public Map<Node, Map<String, String>> getAllInputTypes() throws IOException, APIException {
    Map<Node, Map<String, String>> result = Maps.newHashMap();
    Map<Node, InputTypesResponse> inputTypesResponseMap =
        api.get(InputTypesResponse.class)
            .fromAllNodes()
            .path("/system/inputs/types")
            .executeOnAll();

    for (Map.Entry<Node, InputTypesResponse> entry : inputTypesResponseMap.entrySet())
      result.put(entry.getKey(), entry.getValue().types);

    return result;
  }
  public Map<String, Object> test(String regex, String string) throws IOException, APIException {
    RegexTestResponse r =
        api.get(RegexTestResponse.class)
            .path("/tools/regex_tester")
            .queryParam("regex", regex)
            .queryParam("string", string)
            .execute();

    Map<String, Object> match = Maps.newHashMap();
    match.put("start", r.match.start);
    match.put("end", r.match.end);
    match.put("match", r.match.match);

    Map<String, Object> result = Maps.newHashMap();
    result.put("string", r.string);
    result.put("regex", r.regex);
    result.put("finds", r.matched);

    if (r.matched) {
      result.put("match", match);
    }

    return result;
  }
 protected Map<Node, InputsResponse> getInputsFromAllNodes() {
   return api.get(InputsResponse.class).fromAllNodes().path("/system/inputs").executeOnAll();
 }