Rev 531 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 531 | Rev 533 | ||
|---|---|---|---|
| Line 142... | Line 142... | ||
| 142 | }
|
142 | }
|
| 143 | 143 | ||
| 144 | public void uploadImagem(final FileUploadEvent e) { |
144 | public void uploadImagem(final FileUploadEvent e) { |
| 145 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
145 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 146 | public void execute() { |
146 | public void execute() { |
| 147 | ImagemDTO imagemEnviada = imagemService.uploadImagem(e.getFile(), getEntidade().identificadorEstampa(), imagemService.caminhoPastaEstampas()); |
- | |
| - | 147 | ImagemDTO imagemEnviada = imagemService.uploadImagem(e.getFile(), getEntidade().identificadorImagemEstampa(), imagemService.caminhoPastaEstampas()); |
|
| 148 | getEntidade().setExtensao(imagemEnviada.getExtensao()); |
148 | getEntidade().setExtensao(imagemEnviada.getExtensao()); |
| 149 | alterar(getEntidade()); |
149 | alterar(getEntidade()); |
| 150 | LancadorMensagem.lancarSucessoRedirecionandoTela("ESTAMPA ADICIONADA COM SUCESSO", "/sistema/estampas/estampas.xhtml"); |
150 | LancadorMensagem.lancarSucessoRedirecionandoTela("ESTAMPA ADICIONADA COM SUCESSO", "/sistema/estampas/estampas.xhtml"); |
| 151 | }
|
151 | }
|
| 152 | }); |
152 | }); |
| 153 | }
|
153 | }
|
| 154 | 154 | ||
| 155 | public String retornarCaminhoEstampa(Estampa estampa) { |
155 | public String retornarCaminhoEstampa(Estampa estampa) { |
| 156 | return imagemService.retornarCaminhoImagem(imagemService.caminhoPastaEstampas(), estampa.identificadorImagemEstampa(), estampa.getExtensao()); |
- | |
| - | 156 | return imagemService.retornarCaminhoImagem(imagemService.caminhoPastaEstampas(), imagemService.caminhoPadraoEstampas(), estampa.identificadorImagemEstampa(), estampa.getExtensao()); |
|
| 157 | }
|
157 | }
|
| 158 | 158 | ||
| 159 | }
|
159 | }
|