1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
| import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import javax.faces.model.ListDataModel;
import com.projet.common.exceptions.BusinessException;
import com.projet.editique.domain.Evenement;
import com.projet.editique.extractRsd.PdfExtracor;
import com.projet.apiFolders.FLDException;
public class EvenementDataList {
List liste;
ListDataModel result = new ListDataModel();
Evenement curentEvt;
public void doLoadEvt() throws BusinessException, IOException {
final Evenement evt = (Evenement) getResult().getRowData();
FileOutputStream tempOut;
setCurentEvt(evt);
System.out.println(evt.getDocId());
try {
PdfExtracor pdf = new PdfExtracor("log","pass","192.168.1.1",26000);
pdf.connect();
tempOut=(FileOutputStream) pdf.extract(evt.getDocId());
}
catch (FLDException hop) {
System.out.println("Extraction pdf echouée - Erreur : " + hop);
throw new BusinessException("Extraction pdf échoué, le document n'existe pas.");
}
}
/**
*
* @return List
*/
public List getListe() {
return liste;
}
/**
*
* @param liste
*/
public void setListe(List liste) {
this.liste = liste;
}
/**
*
* @return ListDataModel
*/
public ListDataModel getResult() {
result.setWrappedData(liste);
return result;
}
/**
*
* @param result
*/
public void setResult(ListDataModel result) {
this.result = result;
}
/**
*
*
* @return
*/
public Evenement getCurentEvt() {
return curentEvt;
}
/**
*
* @param curentEvt
*/
public void setCurentEvt(Evenement curentEvt) {
this.curentEvt = curentEvt;
}
} |
Partager