use of teamdash.hist.ProjectHistoryException in project processdash by dtuma.
the class WBSChangeHistoryReport method loadHistory.
private void loadHistory(HttpServletRequest req) throws ProjectHistoryException {
PDashContext ctx = PDashServletUtils.getContext(req);
PDashData data = ctx.getData();
ProjectHistory hist = ProjectHistoryFactory.getProjectHistory(data);
if (hist == null)
throw new ProjectHistoryException("Not_Team_Project_HTML_FMT", ctx.getProjectPath());
String dateParam = req.getParameter("before");
Date beforeDate = dateParam == null ? null : new Date(Long.parseLong(dateParam));
ProjectChangeList changes;
try {
changes = ProjectChangeListFactory.getChanges(hist, beforeDate, 10, true, true);
} catch (IOException ioe) {
throw hist.wrapException(ioe);
}
req.setAttribute("changes", changes);
req.setAttribute("followupTimestamp", changes.getFollowupTimestamp());
// compute the URI that will be used to open WBS hyperlinks
String processID = data.getString("Team_Process_PID");
String modeIndicator = Settings.isPersonalMode() ? "indiv" : "forteam";
String openWbsUri = "../" + processID + "/setup/openWBS.shtm?trigger&" + modeIndicator + "&showItem=";
req.setAttribute("openWbsUri", openWbsUri);
}
use of teamdash.hist.ProjectHistoryException in project processdash by dtuma.
the class BlameHistoryDialog method showCalculationError.
public void showCalculationError(Throwable calcError) {
calcError.printStackTrace();
ProjectHistoryException phe;
if (calcError instanceof ProjectHistoryException) {
phe = (ProjectHistoryException) calcError;
} else if (projectHistory != null) {
phe = projectHistory.wrapException(calcError);
} else {
phe = new ProjectHistoryException(calcError, "Dir.Cannot_Read_HTML_FMT", dataLocation);
}
String title = resources.getString("Message.Error");
String message = "<html><div style='width:400px'>" + phe.getHtml() + "</div></html>";
JEditorPane pane = new JEditorPane("text/html", message);
pane.setEditable(false);
pane.setBackground(null);
JOptionPane.showMessageDialog(this, pane, title, JOptionPane.ERROR_MESSAGE);
showReadyMessage();
}
use of teamdash.hist.ProjectHistoryException in project processdash by dtuma.
the class WBSChangeHistoryReport method doGet.
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
try {
loadHistory(req);
} catch (ProjectHistoryException u) {
u.printStackTrace();
req.setAttribute("errorMessage", u.getHtml());
}
RequestDispatcher disp = getServletContext().getRequestDispatcher("/WEB-INF/jsp/wbsChangeHistory.jsp");
disp.forward(req, resp);
}
Aggregations