示例#1
0
 @Override
 public void onResponseCode(Request request, Response response) {
   transientRequest = null;
   if (response.getStatusCode() == SC_CREATED) {
     DatasourceDto datasourceDto = JsonUtils.unsafeEval(response.getText());
     importConfig.setTransientDatasourceName(datasourceDto.getName());
     datasourceDiff(datasourceDto);
   } else {
     getView()
         .showDatasourceCreationError(
             (ClientErrorDto) JsonUtils.unsafeEval(response.getText()));
   }
 }
示例#2
0
 @Override
 public void setDatasource(DatasourceDto dto) {
   addBtn.setVisible(false);
   boolean isNull = "null".equals(dto.getType());
   importData.setDisabled(isNull);
   addTable.setDisabled(isNull);
   addUpdateTables.setDisabled(isNull);
 }