Subversion Repositories Integrator Subversion

Rev

Rev 526 | Rev 530 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 526 Rev 528
Line 125... Line 125...
125
                                servletContext.getRealPath("") + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator :
125
                                servletContext.getRealPath("") + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator :
126
                                servletContext.getRealPath("") + File.separator + ".." + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator;
126
                                servletContext.getRealPath("") + File.separator + ".." + File.separator + ConstantesSEC.Imagem.NOME_PASTA_PADRAO + File.separator;
127
        }
127
        }
128
       
128
       
129
        @Transient
129
        @Transient
130
        public String imagemPromocao() {
-
 
-
 
130
        public String imagemPromocoes() {
131
                return retornarImagemPngOuJpg("promocoes_");
131
                return retornarImagemPngOuJpg("promocoes_");
132
        }
132
        }
133
       
133
       
134
        @Transient
134
        @Transient
135
        public String imagemEscala() {
135
        public String imagemEscala() {
Line 138... Line 138...
138
       
138
       
139
        private String retornarImagemPngOuJpg(String pasta) {
139
        private String retornarImagemPngOuJpg(String pasta) {
140
                File foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".jpg");
140
                File foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".jpg");
141
                if (foto.exists()) {
141
                if (foto.exists()) {
142
                        return caminhoPadraoImagens() + pasta + getSequencial() + ".jpg";
142
                        return caminhoPadraoImagens() + pasta + getSequencial() + ".jpg";
-
 
143
                }
-
 
144
                foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".jpeg");
-
 
145
                if (foto.exists()) {
-
 
146
                        return caminhoPadraoImagens() + pasta + getSequencial() + ".jpeg";
143
                }
147
                }
144
                if (!foto.exists()) {
148
                if (!foto.exists()) {
145
                        foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".png");
149
                        foto = new File(caminhoPastaImagens() + pasta + getSequencial() + ".png");
146
                }
150
                }
147
                return foto.exists()? caminhoPadraoImagens() + pasta + getSequencial() + ".png" : caminhoPadraoImagens() + "SEM_IMAGEM.png";
151
                return foto.exists()? caminhoPadraoImagens() + pasta + getSequencial() + ".png" : caminhoPadraoImagens() + "SEM_IMAGEM.png";