Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions pepdb/src/org/scharp/atlas/pepdb/PepDBController.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.springframework.validation.Errors;
import org.springframework.web.servlet.ModelAndView;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.LinkedList;
Expand Down Expand Up @@ -784,14 +783,13 @@ public class ImportPeptidePoolsAction extends FormViewAction<FileForm>
ActionURL url = null;

@Override
public ModelAndView getView(FileForm form, boolean reshow, BindException errors) throws Exception
public ModelAndView getView(FileForm form, boolean reshow, BindException errors)
{
JspView v = new JspView<FileForm>("/org/scharp/atlas/pepdb/view/importPools.jsp", form, errors);
return v;
return new JspView<>("/org/scharp/atlas/pepdb/view/importPools.jsp", form, errors);
}

@Override
public boolean handlePost(FileForm form, BindException errors) throws Exception
public boolean handlePost(FileForm form, BindException errors)
{
try
{
Expand All @@ -813,7 +811,6 @@ public boolean handlePost(FileForm form, BindException errors) throws Exception
}
catch (Exception e)
{
e.printStackTrace();
_log.error(e.getMessage(), e);
errors.reject(null, "There was a problem uploading File: " + e.getMessage());
return false;
Expand Down Expand Up @@ -843,9 +840,9 @@ public void addNavTrail(NavTree root)


@RequiresPermission(ReadPermission.class)
public abstract class PeptideExcelExportAction extends ExportAction
public abstract class PeptideExcelExportAction extends ExportAction<Object>
{
public void printExcel(Object bean, HttpServletResponse response, BindException errors, PeptideQueryForm form) throws Exception
public void printExcel(Object bean, HttpServletResponse response, BindException errors, PeptideQueryForm form)
{
try
{
Expand All @@ -860,17 +857,9 @@ public void printExcel(Object bean, HttpServletResponse response, BindException
ew.setFooter(form.getMessage());
ew.renderWorkbook(getResponse());
}
catch (SQLException e)
{
_log.error("export: " + e);
}
catch (IOException e)
{
_log.error("export: " + e);
}
catch (Exception e)
{
_log.error("export: " + e);
_log.error("PeptideExcelExportAction: ", e);
}
}
}
Expand Down Expand Up @@ -907,7 +896,7 @@ public void export(Object bean, HttpServletResponse response, BindException erro
public class PeptideDefaultExcelExportAction extends PeptideExcelExportAction
{
@Override
public void export(Object bean, HttpServletResponse response, BindException errors) throws Exception
public void export(Object bean, HttpServletResponse response, BindException errors)
{
ViewContext ctx = getViewContext();
HttpSession session = ctx.getRequest().getSession();
Expand All @@ -922,7 +911,7 @@ public void export(Object bean, HttpServletResponse response, BindException erro
@RequiresPermission(ReadPermission.class)
public abstract class PeptideTextExportAction extends ExportAction
{
public void printText(Object bean, HttpServletResponse response, BindException errors, PeptideQueryForm form) throws Exception
public void printText(Object bean, HttpServletResponse response, BindException errors, PeptideQueryForm form)
{
try
{
Expand All @@ -939,7 +928,7 @@ public void printText(Object bean, HttpServletResponse response, BindException e
}
catch (Exception e)
{
_log.error("export: " + e);
_log.error("PeptideTextExportAction: ", e);
}
}
}
Expand Down