Line 50... |
Line 50... |
50 |
// Si le code de réponse HTTP ne vaut pas 200 OK, on lance le mécanise d'erreur HTTP
|
50 |
// Si le code de réponse HTTP ne vaut pas 200 OK, on lance le mécanise d'erreur HTTP
|
51 |
if (response.getStatusCode() != 200) {
|
51 |
if (response.getStatusCode() != 200) {
|
52 |
onErrorHTTP(request, response);
|
52 |
onErrorHTTP(request, response);
|
53 |
} else {
|
53 |
} else {
|
54 |
Information info = new Information("selection_structure");
|
54 |
Information info = new Information("selection_structure");
|
55 |
if (response.getHeader("X-DebugJrest-Data").length() != 0) {
|
55 |
if (response.getHeader("X-DebugJrest-Data") != null && response.getHeader("X-DebugJrest-Data").length() != 0) {
|
56 |
final JSONValue reponseEnteteDeboguage = JSONParser.parse(response.getHeader("X-DebugJrest-Data"));
|
56 |
final JSONValue reponseEnteteDeboguage = JSONParser.parse(response.getHeader("X-DebugJrest-Data"));
|
57 |
if (reponseEnteteDeboguage.isArray() != null) {
|
57 |
if (reponseEnteteDeboguage.isArray() != null) {
|
58 |
info.setDeboguages(reponseEnteteDeboguage.isArray());
|
58 |
info.setDeboguages(reponseEnteteDeboguage.isArray());
|
59 |
GWT.log("DEBOGUAGE:\n"+info.getDeboguages().toString(), null);
|
59 |
GWT.log("DEBOGUAGE:\n"+info.getDeboguages().toString(), null);
|
60 |
}
|
60 |
}
|
Line 108... |
Line 108... |
108 |
"";
|
108 |
"";
|
Line 109... |
Line 109... |
109 |
|
109 |
|
Line 110... |
Line 110... |
110 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
|
110 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
|
111 |
|
- |
|
- |
|
111 |
|
112 |
String postDonneesEncodees = construirePost(utilisateurId, str, conservation, valorisation);
|
112 |
String postDonneesEncodees = construirePost(utilisateurId, str, conservation, valorisation);
|
113 |
|
113 |
GWT.log(conservation.toString()+"-"+valorisation.toString(), null);
|
Line 114... |
Line 114... |
114 |
try {
|
114 |
try {
|
115 |
rb.sendRequest(postDonneesEncodees, new RequestCallback() {
|
115 |
rb.sendRequest(postDonneesEncodees, new RequestCallback() {
|
Line 131... |
Line 131... |
131 |
// Si le code de réponse HTTP ne vaut pas 200 OK, on lance le mécanise d'erreur HTTP
|
131 |
// Si le code de réponse HTTP ne vaut pas 200 OK, on lance le mécanise d'erreur HTTP
|
132 |
if (response.getStatusCode() != 200) {
|
132 |
if (response.getStatusCode() != 200) {
|
133 |
onErrorHTTP(request, response);
|
133 |
onErrorHTTP(request, response);
|
134 |
} else {
|
134 |
} else {
|
135 |
Information info = new Information("ajout_structure");
|
135 |
Information info = new Information("ajout_structure");
|
136 |
if (response.getHeader("X-DebugJrest-Data").length() != 0) {
|
136 |
if (response.getHeader("X-DebugJrest-Data") != null && response.getHeader("X-DebugJrest-Data").length() != 0) {
|
137 |
final JSONValue reponseEnteteDeboguage = JSONParser.parse(response.getHeader("X-DebugJrest-Data"));
|
137 |
final JSONValue reponseEnteteDeboguage = JSONParser.parse(response.getHeader("X-DebugJrest-Data"));
|
138 |
if (reponseEnteteDeboguage.isArray() != null) {
|
138 |
if (reponseEnteteDeboguage.isArray() != null) {
|
139 |
info.setDeboguages(reponseEnteteDeboguage.isArray());
|
139 |
info.setDeboguages(reponseEnteteDeboguage.isArray());
|
140 |
GWT.log("DEBOGUAGE:\n"+info.getDeboguages().toString(), null);
|
140 |
GWT.log("DEBOGUAGE:\n"+info.getDeboguages().toString(), null);
|
141 |
}
|
141 |
}
|
Line 201... |
Line 201... |
201 |
// Si le code de réponse HTTP ne vaut pas 200 OK, on lance le mécanise d'erreur HTTP
|
201 |
// Si le code de réponse HTTP ne vaut pas 200 OK, on lance le mécanise d'erreur HTTP
|
202 |
if (response.getStatusCode() != 200) {
|
202 |
if (response.getStatusCode() != 200) {
|
203 |
onErrorHTTP(request, response);
|
203 |
onErrorHTTP(request, response);
|
204 |
} else {
|
204 |
} else {
|
205 |
Information info = new Information("suppression_structure");
|
205 |
Information info = new Information("suppression_structure");
|
206 |
if (response.getHeader("X-DebugJrest-Data").length() != 0) {
|
206 |
if (response.getHeader("X-DebugJrest-Data") != null && response.getHeader("X-DebugJrest-Data").length() != 0) {
|
207 |
final JSONValue reponseEnteteDeboguage = JSONParser.parse(response.getHeader("X-DebugJrest-Data"));
|
207 |
final JSONValue reponseEnteteDeboguage = JSONParser.parse(response.getHeader("X-DebugJrest-Data"));
|
208 |
if (reponseEnteteDeboguage.isArray() != null) {
|
208 |
if (reponseEnteteDeboguage.isArray() != null) {
|
209 |
info.setDeboguages(reponseEnteteDeboguage.isArray());
|
209 |
info.setDeboguages(reponseEnteteDeboguage.isArray());
|
210 |
GWT.log("DEBOGUAGE:\n"+info.getDeboguages().toString(), null);
|
210 |
GWT.log("DEBOGUAGE:\n"+info.getDeboguages().toString(), null);
|
211 |
}
|
211 |
}
|