Search in sources :

Example 1 with SessionTableSelectDialog

use of org.zaproxy.zap.view.SessionTableSelectDialog in project zaproxy by zaproxy.

the class MenuFileControl method openDbBasedSession.

private void openDbBasedSession() {
    try {
        List<String> sessionList = new ArrayList<String>();
        for (RecordSession rs : model.getDb().getTableSession().listSessions()) {
            sessionList.add("" + rs.getSessionId());
        }
        SessionTableSelectDialog ssd = new SessionTableSelectDialog(View.getSingleton().getMainFrame(), sessionList);
        ssd.setVisible(true);
        if (ssd.getSelectedSession() != null) {
            waitMessageDialog = view.getWaitMessageDialog(Constant.messages.getString("menu.file.loadSession"));
            control.openSession(ssd.getSelectedSession(), this);
            waitMessageDialog.setVisible(true);
        }
    } catch (DatabaseException e) {
        log.error(e.getMessage(), e);
    }
}
Also used : ArrayList(java.util.ArrayList) SessionTableSelectDialog(org.zaproxy.zap.view.SessionTableSelectDialog) RecordSession(org.parosproxy.paros.db.RecordSession) DatabaseException(org.parosproxy.paros.db.DatabaseException)

Aggregations

ArrayList (java.util.ArrayList)1 DatabaseException (org.parosproxy.paros.db.DatabaseException)1 RecordSession (org.parosproxy.paros.db.RecordSession)1 SessionTableSelectDialog (org.zaproxy.zap.view.SessionTableSelectDialog)1