|
@@ -89,7 +89,7 @@ public class DownloadController {
|
|
|
* @param response HttpServletResponse
|
|
* @param response HttpServletResponse
|
|
|
* @return A FileSystemResource representing the file to download
|
|
* @return A FileSystemResource representing the file to download
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping(value="/download/{fileName}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
|
|
|
|
+ @GetMapping(value="/downloads/{fileName}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
public ResponseEntity<byte[]> download(@PathVariable("fileName") BigInteger idInstanciaTasca, HttpServletResponse response) throws FileNotFoundException {
|
|
public ResponseEntity<byte[]> download(@PathVariable("fileName") BigInteger idInstanciaTasca, HttpServletResponse response) throws FileNotFoundException {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -126,7 +126,7 @@ public class DownloadController {
|
|
|
* @param response HttpServletResponse
|
|
* @param response HttpServletResponse
|
|
|
* @return A FileSystemResource representing the document to download
|
|
* @return A FileSystemResource representing the document to download
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping(value="/download/document/{id}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
|
|
|
|
+ @GetMapping(value="/downloads/document/{id}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public ResponseEntity<byte[]> downloadDocument(@PathVariable("id") Integer idDocument, HttpServletResponse response) throws FileNotFoundException {
|
|
public ResponseEntity<byte[]> downloadDocument(@PathVariable("id") Integer idDocument, HttpServletResponse response) throws FileNotFoundException {
|
|
|
Document document = ds.findById(idDocument);
|
|
Document document = ds.findById(idDocument);
|
|
@@ -153,7 +153,7 @@ public class DownloadController {
|
|
|
* @param response HttpServletResponse
|
|
* @param response HttpServletResponse
|
|
|
* @return A FileSystemResource representing the report to download
|
|
* @return A FileSystemResource representing the report to download
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping(value="/download/report/{t}/{p}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
|
|
|
|
+ @GetMapping(value="/downloads/report/{t}/{p}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public ResponseEntity<byte[]> downloadReport(@PathVariable("t") Integer idTitulacio, @PathVariable("p") String nomProces,
|
|
public ResponseEntity<byte[]> downloadReport(@PathVariable("t") Integer idTitulacio, @PathVariable("p") String nomProces,
|
|
|
HttpServletResponse response) throws IOException, XDocReportException {
|
|
HttpServletResponse response) throws IOException, XDocReportException {
|
|
@@ -183,7 +183,7 @@ public class DownloadController {
|
|
|
* @param response HttpServletResponse
|
|
* @param response HttpServletResponse
|
|
|
* @return A byte array representing the populated template to download
|
|
* @return A byte array representing the populated template to download
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping(value="/download/template/{id}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
|
|
|
|
+ @GetMapping(value="/downloads/template/{id}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public ResponseEntity<byte[]> downloadTemplate(@PathVariable("id") BigInteger idTascai, HttpServletResponse response) throws IOException, XDocReportException {
|
|
public ResponseEntity<byte[]> downloadTemplate(@PathVariable("id") BigInteger idTascai, HttpServletResponse response) throws IOException, XDocReportException {
|
|
|
XDocReportRegistry.getRegistry().clear();
|
|
XDocReportRegistry.getRegistry().clear();
|
|
@@ -526,7 +526,7 @@ public class DownloadController {
|
|
|
* @param response HttpServletResponse
|
|
* @param response HttpServletResponse
|
|
|
* @return A byte array representing the generated PDF
|
|
* @return A byte array representing the generated PDF
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping(value="/pdf/download/{idTascai}")
|
|
|
|
|
|
|
+ @GetMapping(value="/pdf/{idTascai}")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public byte[] downloadTemplatePdf(@PathVariable("idTascai") BigInteger idTascai, HttpServletResponse response) throws IOException, InterruptedException {
|
|
public byte[] downloadTemplatePdf(@PathVariable("idTascai") BigInteger idTascai, HttpServletResponse response) throws IOException, InterruptedException {
|
|
|
InstanciaTascaDTO it = core.findInstanciaTascaById(idTascai);
|
|
InstanciaTascaDTO it = core.findInstanciaTascaById(idTascai);
|