Subversion Repositories eFlore/Applications.del

Rev

Rev 1151 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.del.client.navigation.evenement.ajoutmotcleimage;

import java.util.ArrayList;
import java.util.List;

import com.google.gwt.event.shared.GwtEvent;

public class EvenementAjoutMotCleImage extends GwtEvent<GestionnaireEvenementAjoutMotCleImage> {

        public static com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementAjoutMotCleImage> TYPE = new com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementAjoutMotCleImage>();
        private String idImage;
        private List<String> motsCles;

        public EvenementAjoutMotCleImage(String idImage, String motCle) {
                this.idImage = idImage;
                if(motCle.indexOf(",") != -1) {
                        String[] motsClesTab = motCle.split(",");
                        motsCles = new ArrayList<String>(motsClesTab.length);
                        for (int i = 0; i < motsClesTab.length; i++) {
                                motsCles.add(motsClesTab[i]);
                        }
                } else {
                        motsCles = new ArrayList<String>(1);
                        motsCles.add(motCle);
                }
        }

        @Override
        protected void dispatch(GestionnaireEvenementAjoutMotCleImage handler) {
                handler.onAjoutMotCleImage(this);
        }

        public String getIdImage() {
                return idImage;
        }
        
        public List<String> getMotsCles() {
                return motsCles;
        }

        @Override
        public com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementAjoutMotCleImage> getAssociatedType() {
                return TYPE;
        }
}