Example #1
0
  public Set<String> getParamsByCategory(String category) {
    Map<String, List<Param>> postgresqlconfparamsByCategory =
        pgConfiguration.getPostgresqlconfparamsByCategory();
    if (category == null || !postgresqlconfparamsByCategory.containsKey(category)) {
      return null;
    }

    List<Param> params = postgresqlconfparamsByCategory.get(category);
    Set<String> paramNames = new TreeSet<String>();
    for (Param param : params) {
      paramNames.add(param.getParam());
    }

    return paramNames;
  }
Example #2
0
 @GET
 @Path(ServiceConfiguration.WS_CATEGORIES_PATH)
 @Produces(MediaType.APPLICATION_JSON)
 public Set<String> categories() {
   return pgConfiguration.getParamCategories();
 }
Example #3
0
 @GET
 @Path(ServiceConfiguration.WS_PARAMS_PATH)
 @Produces(MediaType.APPLICATION_JSON)
 public Set<String> params(@QueryParam("category") String category) {
   return null == category ? pgConfiguration.getParamNames() : getParamsByCategory(category);
 }