1162 |
aurelien |
1 |
package org.tela_botanica.del.client.navigation.evenement.supressionmotcleimage;
|
|
|
2 |
|
|
|
3 |
import java.util.ArrayList;
|
|
|
4 |
import java.util.List;
|
|
|
5 |
|
|
|
6 |
import com.google.gwt.event.shared.GwtEvent;
|
|
|
7 |
|
|
|
8 |
public class EvenementSuppressionMotCleImage extends GwtEvent<GestionnaireEvenementSuppressionMotCleImage> {
|
|
|
9 |
|
|
|
10 |
public static com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementSuppressionMotCleImage> TYPE = new com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementSuppressionMotCleImage>();
|
|
|
11 |
private String idImage;
|
|
|
12 |
private List<String> motsCles;
|
|
|
13 |
|
|
|
14 |
public EvenementSuppressionMotCleImage(String idImage, String motCle) {
|
|
|
15 |
this.idImage = idImage;
|
|
|
16 |
if(motCle.indexOf(",") != -1) {
|
|
|
17 |
String[] motsClesTab = motCle.split(",");
|
|
|
18 |
motsCles = new ArrayList<String>(motsClesTab.length);
|
|
|
19 |
for (int i = 0; i < motsClesTab.length; i++) {
|
|
|
20 |
motsCles.add(motsClesTab[i]);
|
|
|
21 |
}
|
|
|
22 |
} else {
|
|
|
23 |
motsCles = new ArrayList<String>(1);
|
|
|
24 |
motsCles.add(motCle);
|
|
|
25 |
}
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
@Override
|
|
|
29 |
protected void dispatch(GestionnaireEvenementSuppressionMotCleImage handler) {
|
|
|
30 |
handler.onSuppressionMotCleImage(this);
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
public String getIdImage() {
|
|
|
34 |
return idImage;
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
public List<String> getMotsCles() {
|
|
|
38 |
return motsCles;
|
|
|
39 |
}
|
|
|
40 |
|
|
|
41 |
@Override
|
|
|
42 |
public com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementSuppressionMotCleImage> getAssociatedType() {
|
|
|
43 |
return TYPE;
|
|
|
44 |
}
|
|
|
45 |
}
|