ReabrirProcessoController.java
2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package br.com.centralit.controller;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import br.com.centralit.api.framework.json.ViewsEcm;
import br.com.centralit.api.model.Processo;
import br.com.centralit.api.model.ReabrirProcesso;
import br.com.centralit.api.service.ReabrirProcessoService;
import br.com.centralit.framework.controller.GenericController;
import br.com.centralit.framework.json.ResponseBodyWrapper;
import br.com.centralit.framework.view.ResultResponseVH;
/**
* <p><img src="http://centralit.com.br/images/logo_central.png"></p>
*
* <p><b>Company: </b> Central IT - Governança Corporativa - </p>
*
* <p><b>Title: </b></p>
*
* <p><b>Description: </b></p>
*
* <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p>
*
* <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p>
*
* @since 01/04/2016 - 19:06:06
*
* @version 1.0.0
*
* @author maycon.silva
*
*/
@Controller
@RequestMapping("/rest/reabrirProcesso")
public class ReabrirProcessoController extends GenericController<ReabrirProcesso> {
/** Atributo reabrirProcessoDao. */
private ReabrirProcessoService reabrirProcessoService;
/**
* Responsável pela criação de novas instâncias desta classe.
*
* @param reabrirProcessoService
*/
@Autowired
public ReabrirProcessoController( ReabrirProcessoService reabrirProcessoService ) {
super(reabrirProcessoService);
this.reabrirProcessoService = reabrirProcessoService;
}
@RequestMapping(value = "/findSolicitacaoEmAberto", method = RequestMethod.GET, produces = "application/json")
@ResponseBody
public ResponseBodyWrapper findSolicitacaoEmAberto() {
ResultResponseVH<Collection<ReabrirProcesso>> resultResponseVH = new ResultResponseVH<Collection<ReabrirProcesso>>(this.reabrirProcessoService.findSolicitacaoEmAberto());
ResponseBodyWrapper responseBody = new ResponseBodyWrapper(resultResponseVH, getListView());
return responseBody;
}
@Override
public Class<ViewsEcm.ReabrirProcessoEditView> getEditView() {
return ViewsEcm.ReabrirProcessoEditView.class;
}
@Override
public Class<ViewsEcm.ReabrirProcessoListView> getListView() {
return ViewsEcm.ReabrirProcessoListView.class;
}
}