<commit_before>/**
 * 
 */
package org.bluecross.volunteer.controller;

import java.util.List;

import org.bluecross.persistence.data.Volunteer;
import org.bluecross.service.VolunteerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author x074134
 *
 */
@RestController
@RequestMapping("/volunteer")
public class VolunteerController {
	
	@Autowired
	private VolunteerService volunteerService;
	
    /**
     * @param volunteer
     * @return
     */
    @RequestMapping("/add")
    public String save(@RequestBody Volunteer volunteer) {
        return volunteerService.save(volunteer);
    }
    
    @RequestMapping("/getByStatus/{status}")
    public List<Volunteer> getVolunteersByStatus(@PathVariable String status) {
    	return volunteerService.getByStatus(status);
    }
    
    @RequestMapping("/getAll")
    public List<Volunteer> getAllVolunteers() {
    	return volunteerService.getAll();<commit_msg>BCI: Added POST method type to controller<commit_after>/**
 * 
 */
package org.bluecross.volunteer.controller;

import java.util.List;

import org.bluecross.persistence.data.Volunteer;
import org.bluecross.service.VolunteerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author x074134
 *
 */
@RestController
@RequestMapping("/volunteer")
public class VolunteerController {
	
	@Autowired
	private VolunteerService volunteerService;
	
    /**
     * @param volunteer
     * @return
     */
    @RequestMapping(value="/add",method=RequestMethod.POST)
    public String save(@RequestBody Volunteer volunteer) {
        return volunteerService.save(volunteer);
    }
    
    @RequestMapping("/getByStatus/{status}")
    public List<Volunteer> getVolunteersByStatus(@PathVariable String status) {
    	return volunteerService.getByStatus(status);
    }
    
    @RequestMapping("/getAll")
    public List<Volunteer> getAllVolunteers() {
    	return volunteerService.getAll();
{'fraction_non_alphanumeric': 0.10912547528517111, 'fraction_numerical': 0.0045627376425855515, 'mean_word_length': 4.73202614379085, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3527811', 'n_tokens_mistral': 745, 'n_tokens_neox': 730, 'n_words': 121}