Search in sources :

Example 11 with ColumnFilter

use of org.netxms.client.log.ColumnFilter in project netxms by netxms.

the class ZoneConditionEditor method createFilter.

/* (non-Javadoc)
	 * @see org.netxms.ui.eclipse.logviewer.widgets.ConditionEditor#createFilter()
	 */
@Override
public ColumnFilter createFilter() {
    int op = getSelectedOperation();
    ColumnFilter filter = new ColumnFilter(ColumnFilterType.EQUALS, zoneUin);
    filter.setNegated(op == 1);
    return filter;
}
Also used : ColumnFilter(org.netxms.client.log.ColumnFilter)

Example 12 with ColumnFilter

use of org.netxms.client.log.ColumnFilter in project netxms by netxms.

the class AlarmStateConditionEditor method createFilter.

/* (non-Javadoc)
	 * @see org.netxms.ui.eclipse.logviewer.widgets.ConditionEditor#createFilter()
	 */
@Override
public ColumnFilter createFilter() {
    ColumnFilter filter = new ColumnFilter(ColumnFilterType.EQUALS, state.getSelectionIndex());
    filter.setNegated(getSelectedOperation() == 1);
    return filter;
}
Also used : ColumnFilter(org.netxms.client.log.ColumnFilter)

Example 13 with ColumnFilter

use of org.netxms.client.log.ColumnFilter in project netxms by netxms.

the class FilterBuilder method createFilter.

/**
 * @return
 */
public LogFilter createFilter() {
    LogFilter filter = new LogFilter();
    for (Entry<String, ColumnFilterEditor> e : columns.entrySet()) {
        ColumnFilter cf = e.getValue().buildFilterTree();
        if (cf != null) {
            filter.setColumnFilter(e.getKey(), cf);
        }
    }
    filter.setOrderingColumns(new ArrayList<OrderingColumn>(orderingColumns));
    return filter;
}
Also used : ColumnFilter(org.netxms.client.log.ColumnFilter) OrderingColumn(org.netxms.client.log.OrderingColumn) LogFilter(org.netxms.client.log.LogFilter)

Example 14 with ColumnFilter

use of org.netxms.client.log.ColumnFilter in project netxms by netxms.

the class ObjectConditionEditor method createFilter.

/* (non-Javadoc)
	 * @see org.netxms.ui.eclipse.logviewer.widgets.ConditionEditor#createFilter()
	 */
@Override
public ColumnFilter createFilter() {
    int op = getSelectedOperation();
    ColumnFilter filter = new ColumnFilter(((op == 2) || (op == 3)) ? ColumnFilterType.CHILDOF : ColumnFilterType.EQUALS, objectId);
    filter.setNegated((op == 1) || (op == 3));
    return filter;
}
Also used : ColumnFilter(org.netxms.client.log.ColumnFilter)

Example 15 with ColumnFilter

use of org.netxms.client.log.ColumnFilter in project netxms by netxms.

the class TextConditionEditor method createFilter.

/* (non-Javadoc)
	 * @see org.netxms.ui.eclipse.logviewer.widgets.ConditionEditor#createFilter()
	 */
@Override
public ColumnFilter createFilter() {
    ColumnFilter filter = new ColumnFilter(value.getText());
    filter.setNegated(getSelectedOperation() == 1);
    return filter;
}
Also used : ColumnFilter(org.netxms.client.log.ColumnFilter)

Aggregations

ColumnFilter (org.netxms.client.log.ColumnFilter)16 LogFilter (org.netxms.client.log.LogFilter)4 OrderingColumn (org.netxms.client.log.OrderingColumn)4 ArrayList (java.util.ArrayList)3 ISelection (org.eclipse.jface.viewers.ISelection)3 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)3 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)3 PartInitException (org.eclipse.ui.PartInitException)3 AbstractNode (org.netxms.client.objects.AbstractNode)3 AbstractObject (org.netxms.client.objects.AbstractObject)3 LogViewer (org.netxms.ui.eclipse.logviewer.views.LogViewer)3 Calendar (java.util.Calendar)1