class MapReduceBean {

    @GET
    @Produces({"application/xml", "text/xml", "application/json", "text/yaml", "text/x-yaml", "application/x-yaml", "application/x-protobuf",
            "application/x-protostuff"})
    @javax.ws.rs.Path("/listConfigurations")
    @GZIP
    public List<MapReduceJobDescription> listConfiguredMapReduceJobs(@DefaultValue("none") @QueryParam("jobType") String jobType) {
        List<MapReduceJobDescription> jobs = new ArrayList<>();
        if (jobType.equals("none")) {
            jobType = null;
        }
        for (Entry<String,MapReduceJobConfiguration> entry : this.mapReduceConfiguration.getJobConfiguration().entrySet()) {
            if (jobType != null && !entry.getValue().getJobType().equals(jobType)) {
                continue;
            }
            jobs.add(entry.getValue().getConfigurationDescription(entry.getKey()));
        }
        return jobs;
    }

}