Example usage for org.apache.commons.collections.iterators ArrayIterator ArrayIterator

List of usage examples for org.apache.commons.collections.iterators ArrayIterator ArrayIterator

Introduction

In this page you can find the example usage for org.apache.commons.collections.iterators ArrayIterator ArrayIterator.

Prototype

public ArrayIterator() 

Source Link

Document

Constructor for use with setArray.

Usage

From source file:org.jresearch.gossip.actions.admin.log.BrowseLogAction.java

protected ActionForward process(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws JGossipException {
    ForumDAO dao = ForumDAO.getInstance();
    HttpSession session = request.getSession();
    ListForm lForm = (ListForm) form;/*from  w w  w  .  j ava  2 s .  c  o  m*/
    try {
        RecordsData records = new RecordsData();

        User user = (User) session.getAttribute(IConst.SESSION.USER_KEY);
        records.setBlockSize((null != user) ? user.getSettings().getMes_per_page() : 25);
        if (session.getAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG) == null) {
            session.setAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG, new LogSearchCriteria());
        }
        LogSearchCriteria criteria = (LogSearchCriteria) session
                .getAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG);
        int block = Integer.parseInt(lForm.getBlock());
        dao.fillLogEntryList(criteria, records, block);
        request.setAttribute(IConst.REQUEST.RECORDS_DATA, records);
        ArrayIterator it = new ArrayIterator();
        it.setArray(JGossipLog.PRIORITIES);
        request.setAttribute("log_level", it);
    } catch (SQLException sqle) {
        getServlet().log("Connection.process", sqle);
        throw new SystemException(sqle);
    } catch (InstantiationException e) {
        throw new SystemException(e);
    } catch (IllegalAccessException e) {
        throw new SystemException(e);
    } catch (InvocationTargetException e) {
        throw new SystemException(e);
    } catch (NoSuchMethodException e) {
        throw new SystemException(e);
    }

    return (mapping.findForward(IConst.TOKEN.PAGE));
}