Rev 527 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 527 | Rev 529 | ||
|---|---|---|---|
| Line 123... | Line 123... | ||
| 123 | servletContext.getRealPath("") + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator : |
123 | servletContext.getRealPath("") + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator : |
| 124 | servletContext.getRealPath("") + File.separator + ".." + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator; |
124 | servletContext.getRealPath("") + File.separator + ".." + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator; |
| 125 | }
|
125 | }
|
| 126 | 126 | ||
| 127 | @Transient |
127 | @Transient |
| 128 | public String imagemPromocao() { |
- | |
| - | 128 | public String imagemPromocoes() { |
|
| 129 | return retornarImagemPngOuJpg("promocoes_"); |
129 | return retornarImagemPngOuJpg("promocoes_"); |
| 130 | }
|
130 | }
|
| 131 | 131 | ||
| 132 | @Transient |
132 | @Transient |
| 133 | public String imagemEscala() { |
133 | public String imagemEscala() { |
| Line 136... | Line 136... | ||
| 136 | 136 | ||
| 137 | private String retornarImagemPngOuJpg(String pasta) { |
137 | private String retornarImagemPngOuJpg(String pasta) { |
| 138 | File foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".jpg"); |
138 | File foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".jpg"); |
| 139 | if (foto.exists()) { |
139 | if (foto.exists()) { |
| 140 | return caminhoPadraoImagens() + pasta + getSequencial() + ".jpg"; |
140 | return caminhoPadraoImagens() + pasta + getSequencial() + ".jpg"; |
| - | 141 | }
|
|
| - | 142 | foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".jpeg"); |
|
| - | 143 | if (foto.exists()) { |
|
| - | 144 | return caminhoPadraoImagens() + pasta + getSequencial() + ".jpeg"; |
|
| 141 | }
|
145 | }
|
| 142 | if (!foto.exists()) { |
146 | if (!foto.exists()) { |
| 143 | foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".png"); |
147 | foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".png"); |
| 144 | }
|
148 | }
|
| 145 | return foto.exists()? caminhoPadraoImagens() + pasta + getSequencial() + ".png" : caminhoPadraoImagens() + "SEM_IMAGEM.png"; |
149 | return foto.exists()? caminhoPadraoImagens() + pasta + getSequencial() + ".png" : caminhoPadraoImagens() + "SEM_IMAGEM.png"; |