1616import org .apache .http .client .methods .HttpGet ;
1717import org .apache .http .client .utils .URIBuilder ;
1818import org .apache .http .impl .client .DefaultHttpClient ;
19+ import org .apache .log4j .Logger ;
1920import org .apache .struts2 .ServletActionContext ;
2021import org .codehaus .jackson .JsonNode ;
2122import org .codehaus .jackson .map .DeserializationConfig ;
6667 * @version 1.2
6768 */
6869public abstract class ServiceBackendDataTablesAction extends AbstractAction {
70+ /**
71+ * Logger for this class
72+ */
73+ private static final Logger logger = Logger .getLogger (ServiceBackendDataTablesAction .class );
6974
7075 /**
7176 * The display start in the request.
@@ -262,12 +267,12 @@ protected void setupFilterPanel() throws Exception {
262267 */
263268 protected URI buildServiceEndPoint (Map <String , String > parameters ) throws URISyntaxException {
264269
265- int pageSize = getIDisplayLength () == -1 ? MAX_PAGINATION_SIZE : getIDisplayLength ();
270+ int pageSize = getiDisplayLength () == -1 ? MAX_PAGINATION_SIZE : getiDisplayLength ();
266271
267272
268273 URIBuilder builder = new URIBuilder ();
269274 builder .setScheme ("http" ).setHost (ServerConfiguration .DIRECT_API_SERVICE_ENDPOINT ).setPath (getServiceURL ())
270- .setParameter ("offset" , String .valueOf (getIDisplayStart ()))
275+ .setParameter ("offset" , String .valueOf (getiDisplayStart ()))
271276 .setParameter ("limit" , String .valueOf (pageSize ));
272277
273278 if (parameters != null ) {
@@ -300,7 +305,7 @@ protected static String getErrorMessage(int httpStatusCode) {
300305 }
301306
302307 protected JsonNode getJsonResultFromAPI (URI apiEndPoint ) throws Exception {
303-
308+ logger . debug ( "Get JSON result from API: " + apiEndPoint );
304309 DefaultHttpClient httpClient = new DefaultHttpClient ();
305310 JsonNode jsonNode = null ;
306311
@@ -345,7 +350,7 @@ protected JsonNode getJsonResultFromAPI(URI apiEndPoint) throws Exception {
345350 *
346351 * @return the displayStart.
347352 */
348- public int getIDisplayStart () {
353+ public int getiDisplayStart () {
349354 return iDisplayStart ;
350355 }
351356
@@ -354,7 +359,7 @@ public int getIDisplayStart() {
354359 *
355360 * @param iDisplayStart the display start.
356361 */
357- public void setIDisplayStart (int iDisplayStart ) {
362+ public void setiDisplayStart (int iDisplayStart ) {
358363 this .iDisplayStart = iDisplayStart ;
359364 }
360365
@@ -363,7 +368,7 @@ public void setIDisplayStart(int iDisplayStart) {
363368 *
364369 * @return the displayLength.
365370 */
366- public int getIDisplayLength () {
371+ public int getiDisplayLength () {
367372 return iDisplayLength ;
368373 }
369374
@@ -372,7 +377,7 @@ public int getIDisplayLength() {
372377 *
373378 * @param iDisplayLength the displayLength.
374379 */
375- public void setIDisplayLength (int iDisplayLength ) {
380+ public void setiDisplayLength (int iDisplayLength ) {
376381 this .iDisplayLength = iDisplayLength ;
377382 }
378383
@@ -381,7 +386,7 @@ public void setIDisplayLength(int iDisplayLength) {
381386 *
382387 * @return the sEcho.
383388 */
384- public String getSEcho () {
389+ public String getsEcho () {
385390 return sEcho ;
386391 }
387392
@@ -390,7 +395,7 @@ public String getSEcho() {
390395 *
391396 * @param sEcho the sEcho.
392397 */
393- public void setSEcho (String sEcho ) {
398+ public void setsEcho (String sEcho ) {
394399 this .sEcho = sEcho ;
395400 }
396401
@@ -417,7 +422,7 @@ public void setServiceURL(String serviceURL) {
417422 *
418423 * @return the sort column index.
419424 */
420- public int getISortCol_0 () {
425+ public int getiSortCol_0 () {
421426 return iSortCol_0 ;
422427 }
423428
@@ -426,7 +431,7 @@ public int getISortCol_0() {
426431 *
427432 * @param iSortCol_0 the sort column index.
428433 */
429- public void setISortCol_0 (int iSortCol_0 ) {
434+ public void setiSortCol_0 (int iSortCol_0 ) {
430435 this .iSortCol_0 = iSortCol_0 ;
431436 }
432437
@@ -435,7 +440,7 @@ public void setISortCol_0(int iSortCol_0) {
435440 *
436441 * @return the sort order.
437442 */
438- public String getSSortDir_0 () {
443+ public String getsSortDir_0 () {
439444 return sSortDir_0 ;
440445 }
441446
@@ -444,7 +449,7 @@ public String getSSortDir_0() {
444449 *
445450 * @param sSortDir_0 the sort order.
446451 */
447- public void setSSortDir_0 (String sSortDir_0 ) {
452+ public void setsSortDir_0 (String sSortDir_0 ) {
448453 this .sSortDir_0 = sSortDir_0 ;
449454 }
450455
0 commit comments