예제 #1
0
 public String cancelarProj(int projectId) throws RemoteException {
   System.out.println("[ConnectoToRMI] Cancelar um projecto");
   this.dataToSend[1] = projectId;
   System.out.println("this");
   System.out.println(dataToSend[0]);
   System.out.println(dataToSend[1]);
   this.postCard = new ClientRequest("", this.dataToSend, "");
   this.postCard = connectToRMI.apagaProjecto(this.postCard);
   System.out.println(this.postCard.getResponse()[0]);
   return (String) this.postCard.getResponse()[0];
 }
예제 #2
0
  public void listRewards(int id_proj) throws RemoteException {
    System.out.println("[ConnectToRMI]List Rewards");

    this.dataToSend = new Object[2];
    this.dataToSend[1] = id_proj;

    this.postCard = new ClientRequest("2", this.dataToSend, "tempo");

    this.postCard = connectToRMI.getProjectDetails(this.postCard);

    formatProjectDetails((Object[]) this.postCard.getResponse()[0]);
  }
예제 #3
0
  public void listProjectRewards(int projectID, int flag) throws RemoteException {

    System.out.println("[ConnectToRMI]List project details");

    this.dataToSend = new Object[3];
    if (projectID > 0) flag = 1;
    this.dataToSend[0] = projectID;
    this.dataToSend[1] = this.userID;
    this.dataToSend[2] = flag;

    this.postCard = new ClientRequest("2", this.dataToSend, "tempo");

    this.postCard = connectToRMI.listarRecompensas(this.postCard);
    if (flag == 1) this.projectRewards = (ArrayList<String>) this.postCard.getResponse()[3];
    else if (flag == 0) {
      this.myDefinitiveRewards = (ArrayList<String>) this.postCard.getResponse()[1];
      this.myTemporaryRewards = (ArrayList<String>) this.postCard.getResponse()[2];
    }
  }