Repository: incubator-taverna-mobile Updated Branches: refs/heads/master f4b64b13d -> afae2b90f
add download workflow content and upload to taverna player method in Data layer Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/commit/63402bdf Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/63402bdf Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/63402bdf Branch: refs/heads/master Commit: 63402bdf3458c01642e6e1acb892dafbc5907826 Parents: 9ad5a11 Author: Sagar <kumarsagar15...@gmail.com> Authored: Fri Aug 26 23:41:40 2016 +0530 Committer: Sagar <kumarsagar15...@gmail.com> Committed: Fri Aug 26 23:41:40 2016 +0530 ---------------------------------------------------------------------- .../org/apache/taverna/mobile/data/DataManager.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/63402bdf/app/src/main/java/org/apache/taverna/mobile/data/DataManager.java ---------------------------------------------------------------------- diff --git a/app/src/main/java/org/apache/taverna/mobile/data/DataManager.java b/app/src/main/java/org/apache/taverna/mobile/data/DataManager.java index 420bec0..c9bc757 100644 --- a/app/src/main/java/org/apache/taverna/mobile/data/DataManager.java +++ b/app/src/main/java/org/apache/taverna/mobile/data/DataManager.java @@ -31,6 +31,7 @@ import org.apache.taverna.mobile.data.remote.BaseApiManager; import java.util.List; import java.util.Map; +import okhttp3.RequestBody; import okhttp3.ResponseBody; import rx.Observable; import rx.functions.Func1; @@ -166,9 +167,20 @@ public class DataManager { }); } - + /** + * @param url is Workflow's content xml URL + * @return OkHTTP ResponseBody of download file + */ public Observable<ResponseBody> downloadWorkflowContent(String url) { return mBaseApiManager.getTavernaApi().downloadWorkflowContent(url); } + /** + * @param body is body of + * @return OkHTTP ResponseBody of requested + */ + public Observable<ResponseBody> uploadWorkflowContent(RequestBody body, String baseAuth) { + return mBaseApiManager.getTavernaPlayerApi().uploadWorkflow(body, baseAuth); + } + } \ No newline at end of file