16
16
import org .apache .http .client .methods .HttpGet ;
17
17
import org .apache .http .client .utils .URIBuilder ;
18
18
import org .apache .http .impl .client .DefaultHttpClient ;
19
+ import org .apache .log4j .Logger ;
19
20
import org .apache .struts2 .ServletActionContext ;
20
21
import org .codehaus .jackson .JsonNode ;
21
22
import org .codehaus .jackson .map .DeserializationConfig ;
66
67
* @version 1.2
67
68
*/
68
69
public abstract class ServiceBackendDataTablesAction extends AbstractAction {
70
+ /**
71
+ * Logger for this class
72
+ */
73
+ private static final Logger logger = Logger .getLogger (ServiceBackendDataTablesAction .class );
69
74
70
75
/**
71
76
* The display start in the request.
@@ -262,12 +267,12 @@ protected void setupFilterPanel() throws Exception {
262
267
*/
263
268
protected URI buildServiceEndPoint (Map <String , String > parameters ) throws URISyntaxException {
264
269
265
- int pageSize = getIDisplayLength () == -1 ? MAX_PAGINATION_SIZE : getIDisplayLength ();
270
+ int pageSize = getiDisplayLength () == -1 ? MAX_PAGINATION_SIZE : getiDisplayLength ();
266
271
267
272
268
273
URIBuilder builder = new URIBuilder ();
269
274
builder .setScheme ("http" ).setHost (ServerConfiguration .DIRECT_API_SERVICE_ENDPOINT ).setPath (getServiceURL ())
270
- .setParameter ("offset" , String .valueOf (getIDisplayStart ()))
275
+ .setParameter ("offset" , String .valueOf (getiDisplayStart ()))
271
276
.setParameter ("limit" , String .valueOf (pageSize ));
272
277
273
278
if (parameters != null ) {
@@ -300,7 +305,7 @@ protected static String getErrorMessage(int httpStatusCode) {
300
305
}
301
306
302
307
protected JsonNode getJsonResultFromAPI (URI apiEndPoint ) throws Exception {
303
-
308
+ logger . debug ( "Get JSON result from API: " + apiEndPoint );
304
309
DefaultHttpClient httpClient = new DefaultHttpClient ();
305
310
JsonNode jsonNode = null ;
306
311
@@ -345,7 +350,7 @@ protected JsonNode getJsonResultFromAPI(URI apiEndPoint) throws Exception {
345
350
*
346
351
* @return the displayStart.
347
352
*/
348
- public int getIDisplayStart () {
353
+ public int getiDisplayStart () {
349
354
return iDisplayStart ;
350
355
}
351
356
@@ -354,7 +359,7 @@ public int getIDisplayStart() {
354
359
*
355
360
* @param iDisplayStart the display start.
356
361
*/
357
- public void setIDisplayStart (int iDisplayStart ) {
362
+ public void setiDisplayStart (int iDisplayStart ) {
358
363
this .iDisplayStart = iDisplayStart ;
359
364
}
360
365
@@ -363,7 +368,7 @@ public void setIDisplayStart(int iDisplayStart) {
363
368
*
364
369
* @return the displayLength.
365
370
*/
366
- public int getIDisplayLength () {
371
+ public int getiDisplayLength () {
367
372
return iDisplayLength ;
368
373
}
369
374
@@ -372,7 +377,7 @@ public int getIDisplayLength() {
372
377
*
373
378
* @param iDisplayLength the displayLength.
374
379
*/
375
- public void setIDisplayLength (int iDisplayLength ) {
380
+ public void setiDisplayLength (int iDisplayLength ) {
376
381
this .iDisplayLength = iDisplayLength ;
377
382
}
378
383
@@ -381,7 +386,7 @@ public void setIDisplayLength(int iDisplayLength) {
381
386
*
382
387
* @return the sEcho.
383
388
*/
384
- public String getSEcho () {
389
+ public String getsEcho () {
385
390
return sEcho ;
386
391
}
387
392
@@ -390,7 +395,7 @@ public String getSEcho() {
390
395
*
391
396
* @param sEcho the sEcho.
392
397
*/
393
- public void setSEcho (String sEcho ) {
398
+ public void setsEcho (String sEcho ) {
394
399
this .sEcho = sEcho ;
395
400
}
396
401
@@ -417,7 +422,7 @@ public void setServiceURL(String serviceURL) {
417
422
*
418
423
* @return the sort column index.
419
424
*/
420
- public int getISortCol_0 () {
425
+ public int getiSortCol_0 () {
421
426
return iSortCol_0 ;
422
427
}
423
428
@@ -426,7 +431,7 @@ public int getISortCol_0() {
426
431
*
427
432
* @param iSortCol_0 the sort column index.
428
433
*/
429
- public void setISortCol_0 (int iSortCol_0 ) {
434
+ public void setiSortCol_0 (int iSortCol_0 ) {
430
435
this .iSortCol_0 = iSortCol_0 ;
431
436
}
432
437
@@ -435,7 +440,7 @@ public void setISortCol_0(int iSortCol_0) {
435
440
*
436
441
* @return the sort order.
437
442
*/
438
- public String getSSortDir_0 () {
443
+ public String getsSortDir_0 () {
439
444
return sSortDir_0 ;
440
445
}
441
446
@@ -444,7 +449,7 @@ public String getSSortDir_0() {
444
449
*
445
450
* @param sSortDir_0 the sort order.
446
451
*/
447
- public void setSSortDir_0 (String sSortDir_0 ) {
452
+ public void setsSortDir_0 (String sSortDir_0 ) {
448
453
this .sSortDir_0 = sSortDir_0 ;
449
454
}
450
455
0 commit comments