Beispiel #1
0
 public void addGewinnspielDaten(GewinnspielDaten gDaten, int quizid) {
   Gson gson = new Gson();
   ControllerASync scontroller = new ControllerASync();
   scontroller.delegate = this;
   scontroller.execute(
       IP,
       RequestMethod.POST.toString(),
       "api/gewinnspieldaten/" + quizid,
       AsyncResponseType.POSTGEWINNSPIELDATEN.toString(),
       gson.toJson(gDaten, GewinnspielDaten.class));
 }
Beispiel #2
0
 public void addStandRating(StandRating stRating, Stand st) {
   Gson gson = new Gson();
   ControllerASync rcontroller = new ControllerASync();
   rcontroller.delegate = this;
   rcontroller.execute(
       IP,
       RequestMethod.POST.toString(),
       "api/staende/" + st.getSt_id() + "/ratings",
       AsyncResponseType.POSTRATING.toString(),
       gson.toJson(stRating, StandRating.class));
 }
Beispiel #3
0
 public void addGuideRating(GuideRating gRating, Guide gtmp) {
   Gson gson = new Gson();
   ControllerASync scontroller = new ControllerASync();
   scontroller.delegate = this;
   scontroller.execute(
       IP,
       RequestMethod.POST.toString(),
       "api/guides/" + gtmp.getS_id() + "/ratings",
       AsyncResponseType.POSTRATING.toString(),
       gson.toJson(gRating, GuideRating.class));
 }
Beispiel #4
0
  public void loadAll(AsyncResponse asyncResponse, String alternativeIP) {

    if (alternativeIP.length() != 0) {
      this.IP = alternativeIP;
    }
    this.asyncresponse = asyncResponse;

    ControllerASync Guidecontroller = new ControllerASync();
    Guidecontroller.delegate = this;
    Guidecontroller.execute(
        IP, RequestMethod.GET.toString(), "api/guides", AsyncResponseType.GUIDES.toString());

    ControllerASync Abteilungcontroller = new ControllerASync();
    Abteilungcontroller.delegate = this;
    Abteilungcontroller.execute(
        IP,
        RequestMethod.GET.toString(),
        "api/abteilungen/staende",
        AsyncResponseType.ABTEILUNGEN.toString());
  }