package br.com.centralit.controller; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; 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.DocumentoGed; import br.com.centralit.api.service.DocumentoGedService; import br.com.centralit.framework.controller.GenericController; import br.com.centralit.framework.json.ResponseBodyWrapper; import br.com.centralit.framework.view.ResultResponseVH; /** *
*
*
* Company: Central IT - Governança Corporativa - *
* ** Title: *
* ** Description: *
* ** Iniciativa(s): NUMERO_INICIATIVA *
* ** Regra(s) de negócio: NUMERO_REGRA_DE_NEGOCIO *
* * @since 25/04/2016 - 09:18:05 * * @version 1.0.0 * * @author rogerio.costa * */ @Controller @RequestMapping("/rest/documentoGed") public class DocumentoGedController extends GenericController* Iniciativa(s): NUMERO_INICIATIVA *
* ** Regra(s) de negócio: NUMERO_REGRA_DE_NEGOCIO *
* * Método responsável por * * @author andre.silva * * @param idDocumento * @return */ @RequestMapping(value = "/findByIdDocumentoTodasVersoes", method = RequestMethod.GET, produces = "application/json") @ResponseBody public ResponseBodyWrapper findByIdDocumentoTodasVersoes(@RequestParam(value = "idDocumento") String idDocumento) { ResultResponseVH* Iniciativa(s): NUMERO_INICIATIVA *
* ** Regra(s) de negócio: NUMERO_REGRA_DE_NEGOCIO *
* * Método responsável por * * @author andre.silva * * @param idDocumento * @return */ @SuppressWarnings({ "rawtypes", "unchecked" }) @RequestMapping(value = "/validaQuantidadeVersoes", method = RequestMethod.GET, produces = "application/json") @ResponseBody public ResponseBodyWrapper countDocumentos(@RequestParam(value = "idDocumento") String idDocumento) { ResultResponseVH resultResponseVH = new ResultResponseVH(this.documentoGedService.validaQuantidadeVersoes(Long.parseLong(idDocumento))); ResponseBodyWrapper responseBody = new ResponseBodyWrapper(resultResponseVH, ViewsEcm.DocumentoGedEdit.class); return responseBody; } /** * ** Iniciativa(s): NUMERO_INICIATIVA *
* ** Regra(s) de negócio: NUMERO_REGRA_DE_NEGOCIO *
* * Método responsável por * * @author andre.silva * * @param idDocumento * @return */ @SuppressWarnings({ "rawtypes", "unchecked" }) @RequestMapping(value = "/removerDocumento", method = RequestMethod.GET, produces = "application/json") @ResponseBody public ResponseBodyWrapper removerDocumento(@RequestParam(value = "idDocumento") String idDocumento) { ResultResponseVH resultResponseVH = new ResultResponseVH(this.documentoGedService.removerDocumento(Long.parseLong(idDocumento))); ResponseBodyWrapper responseBody = new ResponseBodyWrapper(resultResponseVH, ViewsEcm.DocumentoGedEdit.class); return responseBody; } /** * ** Iniciativa(s): NUMERO_INICIATIVA *
* ** Regra(s) de negócio: NUMERO_REGRA_DE_NEGOCIO *
* * Método responsável por * * @author andre.silva * * @param idProcesso * @return */ @RequestMapping(value = "/findByProcessoSigilo", method = RequestMethod.GET, produces = "application/json") @ResponseBody public ResponseBodyWrapper findByProcessoSigilo(@RequestParam(value = "idProcesso") String idProcesso) { ResultResponseVH