Example #1
0
  public void onServiceCallSuccess(DataTransferObject data) {
    lastSuccessfullServiceCallTime = Tm.getCurrentTimeMillis();

    if (data.conversationNumber != null) {
      conversationNumber = data.conversationNumber;
      log.info("conversatioNumber received:", conversationNumber);
    }
    Scope.get().getComponent(Dao.class).handleDataFromServer(data);

    ScrumGwtApplication app = ScrumGwtApplication.get();
    if (data.applicationInfo != null) {
      app.applicationInfo = data.applicationInfo;
      log.debug("applicationInfo:", data.applicationInfo);
      // Scope.get().putComponent(data.applicationInfo);
    } else {
      assert app.applicationInfo != null;
    }

    new ServerDataReceivedEvent(data).fireInCurrentScope();
  }
Example #2
0
 public void onServiceCallFailure(AServiceCall serviceCall, List<ErrorWrapper> errors) {
   long timeFromLastSuccess = Tm.getCurrentTimeMillis() - lastSuccessfullServiceCallTime;
   if (serviceCall.isDispensable() && timeFromLastSuccess < MAX_FAILURE_TIME) {
     log.warn("Dispensable service call failed:", serviceCall, errors);
     return;
   }
   log.error("Service call failed:", serviceCall, errors);
   String serviceCallName = Str.getSimpleName(serviceCall.getClass());
   serviceCallName = Str.removeSuffix(serviceCallName, "ServiceCall");
   ScrumGwtApplication.get().handleServiceCallError(serviceCallName, errors);
 }
Example #3
0
  @Override
  protected Widget onInitialization() {
    dao = Scope.get().getComponent(Dao.class);
    ScrumGwtApplication app = (ScrumGwtApplication) Scope.get().getComponent("app");
    serviceCaller = Scope.get().getComponent(ServiceCaller.class);

    entityCountWrapper = new SimplePanel();
    stateInformationWrapper = new SimplePanel();

    PagePanel page = new PagePanel();
    page.addHeader("Entities");
    page.addSection(entityCountWrapper);

    page.addHeader("State information");
    page.addSection(stateInformationWrapper);

    if (!app.getApplicationInfo().isProductionStage()) {
      page.addHeader("Generators");
      page.addSection(createGenerators());
    }

    return page;
  }