From 01154dbd78c8f72c02eb5e95ef2bda5fff66760f Mon Sep 17 00:00:00 2001 From: drizea Date: Sun, 10 Jun 2012 20:41:02 +0300 Subject: [PATCH] bookbag retrieve functions added --- .../android/accountAccess/AccountAccess.java | 45 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java b/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java index 1360de0ff5..fd55c148a0 100644 --- a/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java +++ b/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java @@ -151,6 +151,8 @@ public class AccountAccess { */ public static String METHOD_CREATE_HOLD = " open-ils.circ.holds.create"; + //Used for Fines + /** The METHODS_FETCH_FINES_SUMMARY * description : * @param : authToken, UserID @@ -172,6 +174,27 @@ public class AccountAccess { */ public static String METHOD_FETCH_MONEY_BILLING = "open-ils.circ.money.billing.retrieve.all"; + + //Used for book bags + /** The METHOD_FLESH_CONTAINERS + * description : Retrieves all un-fleshed buckets by class assigned to a given user + * VIEW_CONTAINER permissions is requestID != owner ID + * @param : authtoken, UserID, "biblio", "bookbag" + * @returns : array of "cbreb" OSRFObjects + */ + public static String METHOD_FLESH_CONTAINERS = "open-ils.actor.container.retrieve_by_class.authoritative"; + + + /** The METHOD_FLESH_PUBLIC_CONTAINER + * description : array of contaoners correspondig to a id + * @param : authtoken , "biblio" , boobkbag ID + * @returns : array of "crebi" OSRF objects (content of bookbag, id's of elements to get more info) + */ + public static String METHOD_FLESH_PUBLIC_CONTAINER = "open-ils.actor.container.flesh"; + + + + /** The conn. */ public HttpConnection conn; @@ -715,7 +738,7 @@ public class AccountAccess { //----------------------------Fines Summary------------------------------------// - private OSRFObject getFinesSummary(){ + public OSRFObject getFinesSummary(){ OSRFObject finesSummary = (OSRFObject) doRequest(SERVICE_ACTOR, METHOD_FETCH_FINES_SUMMARY, new Object[]{authToken,userID}); @@ -729,6 +752,26 @@ public class AccountAccess { return transactions; } + public Object getBookbags(){ + + Object response = doRequest(SERVICE_ACTOR, METHOD_FLESH_CONTAINERS, new Object[]{authToken,userID,"biblio","bookbag"}); + + List bookbags = (List)response; + + for(int i=0;i