Examples of FotoDTO


Examples of fing.satode.data.FotoDTO

    public void setAntes(boolean antes) {
      this.antes = antes;
    }

    public FotoDTO getDTO(){
      FotoDTO dto = new FotoDTO();
      dto.setId(id);
      dto.setDatos(datos);
      dto.setAntes(antes);
      dto.setNombre(nombre);
      return dto;
    }
View Full Code Here

Examples of fing.satode.data.FotoDTO

     
      hacinamientoDTO.setCantHabTrabajo(Integer.valueOf((cantHabTrabajo.getText())));
     
      ArrayList<FotoDTO> imag=new ArrayList<FotoDTO>();
      for(String i: imagenes){
        FotoDTO f= new FotoDTO();
        f.setAntes(true);
        f.setUrl(i);
        imag.add(f);
      }
      parcelaDTO.setFotos(imag);
     
     
View Full Code Here

Examples of fing.satode.data.FotoDTO

            if(fotos==null){
              fotos=new ArrayList<FotoDTO>();
              request.getSession().setAttribute("foto.lista", fotos);
            }
           
            FotoDTO foto= new FotoDTO();
            foto.setAntes(antes);
            foto.setNombre(item.getName());
            foto.setDatos(item.get());
           
            fotos.add(foto);
           
             /// Create a temporary file placed in the default system temp folder
              File file = File.createTempFile("upload-", ".bin");
View Full Code Here

Examples of fing.satode.data.FotoDTO

   public void doGet(HttpServletRequest request, HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException{
    
     Long id = Long.valueOf(request.getParameter("id"));
    
     FotoDTO foto = ServiceFactory.getInstance().getPropiedadesSiniestradasService().getFoto(id);
    
     // Get the absolute path of the image
        ServletContext sc = getServletContext();
        String filename =foto.getNombre();

        // Get the MIME type of the image
        String mimeType = sc.getMimeType(filename);
        if (mimeType == null) {
            sc.log("No se encuantra el MIME type de "+filename);
            resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            return;
        }

        resp.setContentType(mimeType);

        resp.setContentLength(foto.getDatos().length);

        OutputStream out = resp.getOutputStream();

        out.write(foto.getDatos(), 0, foto.getDatos().length);
        out.close();
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.