Examples of LogSearchCriteria


Examples of aim.logging.LogSearchCriteria

    /**
     * search logs by criteria
     */
    public void search() {
        final LogSearchCriteria searchCriteria = LogSearchCriteria.createCriteria().setDateFrom(dateFrom).setDateTo(dateTo).
                setDateSingle(dateSingle).setDateType(selectedDateType);
        final Collection<PosibleOperations> convertedOperations = convertSelectedOperationsToEnum();
        if (!convertedOperations.contains(PosibleOperations.ALL)) {
            searchCriteria.setOperations(convertedOperations);
        }
        if (user != null) {
            searchCriteria.setUserName(user.getNickname());
        }
        final List<SimpleAction> actions = logManager.getLogs(searchCriteria);
        logs = new ArrayList<LocalizedSimpleAction>();
        for (SimpleAction action : actions) {
            logs.add(new LocalizedSimpleAction(action));
View Full Code Here

Examples of org.jresearch.gossip.beans.LogSearchCriteria

     */
    protected ActionForward process(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws JGossipException {
        SearchLogForm slForm = (SearchLogForm) form;
        LogSearchCriteria criteria = slForm.getSearchCriteria();
        request.getSession().setAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG,
                criteria);
        return (mapping.findForward(IConst.TOKEN.PAGE));
    }
View Full Code Here

Examples of org.jresearch.gossip.beans.LogSearchCriteria

            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();
View Full Code Here

Examples of org.jresearch.gossip.beans.LogSearchCriteria

    /**
     * @return
     */
    public LogSearchCriteria getSearchCriteria() {
        return new LogSearchCriteria(getFrom(), getTo(),
                logger.equals("") ? IConst.VALUES.ALL : logger.trim(), log_level
                        .equals("") ? IConst.VALUES.ALL : log_level.trim(), remote_ip
                        .equals("") ? IConst.VALUES.ALL : remote_ip.trim(), user_name
                        .equals("") ? IConst.VALUES.ALL : user_name.trim(), session_id
                        .equals("") ? IConst.VALUES.ALL : session_id.trim(), true);
View Full Code Here

Examples of org.jresearch.gossip.beans.LogSearchCriteria

  final public void testFillLogEntryList() throws Exception
  {
    RecordsData records = new RecordsData();
    User user = null;
    records.setBlockSize((null != user)?user.getSettings().getMes_per_page():25);
    LogSearchCriteria criteria = new LogSearchCriteria();
    criteria.setFrom(from);
    criteria.setTo(to);
    criteria.setLog_level(IConst.VALUES.ALL);
    criteria.setLogger(IConst.VALUES.ALL);
    criteria.setRemote_ip(IConst.VALUES.ALL);
    criteria.setSession_id(IConst.VALUES.ALL);
    criteria.setUser_name(IConst.VALUES.ALL);
    int block = 1;
    dao.fillLogEntryList(criteria, records, block);
    Iterator it = records.getRecords().iterator();
    assertTrue(it.hasNext());
    assertTrue(records.getRecordsCount() > 0);
View Full Code Here

Examples of org.jresearch.gossip.beans.LogSearchCriteria

  final public void testFillLogEntryListWARN() throws Exception
  {
    RecordsData records = new RecordsData();
    User user = null;
    records.setBlockSize((null != user)?user.getSettings().getMes_per_page():25);
    LogSearchCriteria criteria = new LogSearchCriteria();
    criteria.setFrom(from);
    criteria.setTo(to);
    criteria.setLog_level("WARN");
    criteria.setLogger(IConst.VALUES.ALL);
    criteria.setRemote_ip(IConst.VALUES.ALL);
    criteria.setSession_id(IConst.VALUES.ALL);
    criteria.setUser_name(IConst.VALUES.ALL);
    int block = 1;
    dao.fillLogEntryList(criteria, records, block);
    Iterator it = records.getRecords().iterator();
    assertTrue(!it.hasNext());
    assertTrue(records.getRecordsCount() == 0);
View Full Code Here

Examples of org.jresearch.gossip.beans.LogSearchCriteria

  final public void testFillLogEntryListINFO() throws Exception
  {
    RecordsData records = new RecordsData();
    User user = null;
    records.setBlockSize((null != user)?user.getSettings().getMes_per_page():25);
    LogSearchCriteria criteria = new LogSearchCriteria();
    criteria.setFrom(from);
    criteria.setTo(to);
    criteria.setLog_level("INFO");
    criteria.setLogger("FORUM");
    criteria.setRemote_ip(IConst.VALUES.ALL);
    criteria.setSession_id(IConst.VALUES.ALL);
    criteria.setUser_name(IConst.VALUES.ALL);
    int block = 1;
    dao.fillLogEntryList(criteria, records, block);
    Iterator it = records.getRecords().iterator();
    assertTrue(it.hasNext());
    assertTrue(records.getRecordsCount() > 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.