Package web.operator.request

Source Code of web.operator.request.DenyController

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package web.operator.request;

import domain.UserRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import web.generic.CH;
import web.generic.GenericAbstractController;
/**
* Контроллер отказа подтверждения пациента
* Обязательные параметры:
*     clientrequested - ID UserRequestа
* @author lacoste
*/

public class DenyController extends GenericAbstractController {

    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String requestedStr = request.getParameter("clientrequested");
        if (requestedStr != null && !requestedStr.isEmpty()) {
            try {
                UserRequest requested = CH.get(getDao(), UserRequest.class, requestedStr);
                getDao().delete(requested);
            } catch (Exception ex) {
            }
        }

        return new ModelAndView("redirect:/operator/request/index.htm");
    }

}
TOP

Related Classes of web.operator.request.DenyController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.