@@ -56,9 +56,12 @@ public class ServiceRequest {
56
56
Map .entry ("limit" , "limit" ),
57
57
Map .entry ("offset" , "offset" ),
58
58
59
+ //Used by the list method in the WebService class
60
+ Map .entry ("format" , "format" ),
61
+ Map .entry ("count" , "count" ),
62
+
59
63
//Legacy - may be removed in the future
60
64
Map .entry ("filter" , "filter" ),
61
- Map .entry ("count" , "count" ),
62
65
Map .entry ("where" , "where" ),
63
66
Map .entry ("page" , "page" )
64
67
);
@@ -422,7 +425,9 @@ public void setParameter(String key, String val){
422
425
423
426
//Update offset and limit as needed
424
427
String k = key .toLowerCase ();
425
- if (k .equals ("offset" ) || k .equals ("limit" ) || k .equals ("page" )){
428
+ if (k .equals (getKeyword ("offset" )) ||
429
+ k .equals (getKeyword ("limit" )) ||
430
+ k .equals (getKeyword ("page" ))){
426
431
updateOffsetLimit ();
427
432
}
428
433
}
@@ -501,6 +506,30 @@ public Long getLimit(){
501
506
}
502
507
503
508
509
+ //**************************************************************************
510
+ //** getFormat
511
+ //**************************************************************************
512
+ /** Returns the value of the "format" parameter in the request.
513
+ */
514
+ protected String getFormat (){
515
+ String format = getParameter (getKeyword ("format" )).toString ();
516
+ if (format ==null ) return "" ;
517
+ else return format .toLowerCase ();
518
+ }
519
+
520
+
521
+ //**************************************************************************
522
+ //** getCount
523
+ //**************************************************************************
524
+ /** Returns the value of the "count" parameter in the request.
525
+ */
526
+ protected boolean getCount (){
527
+ Boolean count = getParameter (getKeyword ("count" )).toBoolean ();
528
+ if (count ==null ) return false ;
529
+ else return count ;
530
+ }
531
+
532
+
504
533
//**************************************************************************
505
534
//** getRequest
506
535
//**************************************************************************
0 commit comments