/* Date datesys = new java.sql.Date(System.currentTimeMillis()); */
package presentation;
import java.sql.Date;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import metier.GC_Categorie;
import metier.GC_Document;
import metier.GC_Projet;
import metier.*;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
public class FicheForm extends ActionForm{
private String sujet;
private String description;
private String corps;
private String langue;
private String groupe;
private String reference_externe;
private String auteur ;
private String mail ;
private String mot_cle;
private Date date_modification;
private Date date_creation ;
private String etat ;
private String commentaires ;
private String opinion;
private long idprojet;
private long idcategorie;
private long iddocument;
List<GC_Document> Listdocument = new Vector<GC_Document>();
List<GC_Projet> Listprojet = new Vector<GC_Projet>();
List<GC_Categorie> Listcategorie= new Vector<GC_Categorie>();
private String action="";
//private List documents = new Vector<Fiche>();
/* Getters and Setters */
public String getSujet() {
return sujet;
}
public void setSujet(String sujet) {
this.sujet = sujet;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getCorps() {
return corps;
}
public void setCorps(String corps) {
this.corps = corps;
}
public String getLangue() {
return langue;
}
public void setLangue(String langue) {
this.langue = langue;
}
public String getGroupe() {
return groupe;
}
public void setGroupe(String groupe) {
this.groupe = groupe;
}
public String getReference_externe() {
return reference_externe;
}
public void setReference_externe(String reference_externe) {
this.reference_externe = reference_externe;
}
public String getAuteur() {
return auteur;
}
public void setAuteur(String auteur) {
this.auteur = auteur;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
this.mail = mail;
}
public String getMot_cle() {
return mot_cle;
}
public void setMot_cle(String mot_cle) {
this.mot_cle = mot_cle;
}
public Date getDate_modification() {
return date_modification;
}
public void setDate_modification(Date date_modification) {
this.date_modification = date_modification;
}
public Date getDate_creation() {
return date_creation;
}
public void setDate_creation(Date date_creation) {
this.date_creation = date_creation;
}
public String getEtat() {
return etat;
}
public void setEtat(String etat) {
this.etat = etat;
}
public String getCommentaires() {
return commentaires;
}
public void setCommentaires(String commentaires) {
this.commentaires = commentaires;
}
public String getOpinion() {
return opinion;
}
public void setOpinion(String opinion) {
this.opinion = opinion;
}
public long getIdprojet() {
return idprojet;
}
public void setIdprojet(long idprojet) {
this.idprojet = idprojet;
}
public long getIdcategorie() {
return idcategorie;
}
public void setIdcategorie(long idcategorie) {
this.idcategorie = idcategorie;
}
public long getIddocument() {
return iddocument;
}
public void setIddocument(long iddocument) {
this.iddocument = iddocument;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public List getListdocument() {
return Listdocument;
}
public void setListdocument(List listdocument) {
Listdocument = listdocument;
}
public List getListprojet() {
return Listprojet;
}
public void setListprojet(List listprojet) {
Listprojet = listprojet;
}
public List getListcategorie() {
return Listcategorie;
}
public void setListcategorie(List listcategorie) {
Listcategorie = listcategorie;
}
@Override
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();//collection qui contient les erreurs
if(sujet.length()==0){
errors.add("sujetnull", new ActionError("error.sujet.vide"));
}
return errors;
}
@Override
public void reset(ActionMapping mapping, HttpServletRequest request) {
this.sujet="";
}
}
Partager