Package edu.isi.karma.controller.update

Examples of edu.isi.karma.controller.update.ErrorUpdate


            }
            c.add(new WorksheetListUpdate());
            c.append(WorksheetUpdateFactory.createWorksheetHierarchicalAndCleaningResultsUpdates(wsht.getId(), SuperSelectionManager.DEFAULT_SELECTION));
        } catch (JSONException | IOException | KarmaException | NullPointerException | ClassNotFoundException e) {
            logger.error("Error occured while generating worksheet from " + getTitle() + "!", e);
            return new UpdateContainer(new ErrorUpdate(
                    "Error occured during import: " + e.getMessage()));
        }

        return c;
    }
View Full Code Here


  public UpdateContainer doIt(Workspace workspace) throws CommandException {
   
    final String workspaceId = workspace.getId();
   
    if(!HistoryJsonUtil.historyExists(workspaceId, worksheetId)) {
      return new UpdateContainer(new ErrorUpdate("No history exists for the worksheet!"));
    }
   
    // Copy the history file to a location accessible from web
//    File existingHistoryFile = new File(HistoryJsonUtil.constructWorksheetHistoryJsonFilePath(wkName, wsPreferenceId));
//    final File newFileName = new File("./src/main/webapp/History/"
View Full Code Here

      if (savePreset) {
        uc.append(savePreset(workspace, wsht));
      }
    } catch (JSONException | IOException | KarmaException | NullPointerException | ClassNotFoundException e) {
      logger.error("Error occured while generating worksheet from " + getTitle() + "!", e);
      return new UpdateContainer(new ErrorUpdate(
          "Error occured during import: " + e.getMessage()));
    }
    return uc;
  }
View Full Code Here

        return updateContainer;
      } catch (CommandException e) {
        logger.error(
            "Error occured with command " + command.toString(), e);
        UpdateContainer updateContainer = new UpdateContainer();
        updateContainer.add(new ErrorUpdate("Error occured with command " + command.toString()));
        return updateContainer; // TODO probably need a return that indicates an
        // error.
      }
    }
View Full Code Here

            workspace.getCommandHistory().addPreviewCommand(comm);
            NewDatabaseCommandUpdate upd = new NewDatabaseCommandUpdate(comm.getId());
            c.add(upd);
        } catch (Throwable e) {
            String message = e.getMessage().replaceAll("\n", "").replaceAll("\"", "\\\"");
            ErrorUpdate errUpdt = new ErrorUpdate(message);
            c.add(errUpdt);
        }
        return c;
    }
View Full Code Here

            workspace.getCommandHistory().addPreviewCommand(comm);
            c.add(new InfoUpdate("Sucessfully imported data using SQL"));
            c.add(new SQLCommandUpdate(comm.getId()));
        } catch (Throwable e) {
            String message = e.getMessage().replaceAll("\n", "").replaceAll("\"", "\\\"");
            ErrorUpdate errUpdt = new ErrorUpdate(message);
            c.add(errUpdt);
        }
        return c;
    }
View Full Code Here

TOP

Related Classes of edu.isi.karma.controller.update.ErrorUpdate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.