Inherits java::util::Vector< Filter >.
Public Member Functions | |
FiltersVector () | |
void | addFilter (Filter f, boolean active) |
void | setFilters (Filter[] f, boolean[] active) |
void | setFilters (FiltersVector flts) |
int[] | getAppliedFiltersIndexes () |
boolean | hasActiveFilters () |
boolean | isActive (int n) |
boolean | applyFilters (ILogEntry log) |
String | getFilterString () |
void | clear () |
void | loadFilters (File f, boolean eraseFilters, String fileName) throws Exception |
void | saveFilters (File f) throws IOException |
Filter | remove (int index) |
void | activateFilter (Filter f, boolean active) |
This class stores all the filters defined by the user. It supports all the functionalities needed by the filters like load and save, the check if a log is compatible with the filters and so on
FiltersList is a Vector. It uses another vector to store the indexes of the active filters
com.cosylab.logging.engine.FiltersVector.FiltersVector | ( | ) |
Constructor
void com.cosylab.logging.engine.FiltersVector.activateFilter | ( | Filter | f, | |
boolean | active | |||
) |
Activate/deactivate a filter
f | The filter to activate/deactivate | |
active | If true, activate the filter |
void com.cosylab.logging.engine.FiltersVector.addFilter | ( | Filter | f, | |
boolean | active | |||
) |
Add a filter to the vector. If it is active, its index is added to the vector of the active filters
f | The filter to add | |
active | true if the filter is active |
Referenced by com.cosylab.logging.engine.ACS.LCEngine.addFilter(), com.cosylab.logging.engine.FiltersVector.loadFilters(), alma.acs.logging.table.LogTableRowSorter.setFilters(), and com.cosylab.logging.engine.ACS.LCEngine.setFilters().
boolean com.cosylab.logging.engine.FiltersVector.applyFilters | ( | ILogEntry | log | ) |
Apply the (active) filters to a log
log | The log to check |
Referenced by alma.acs.logging.tools.LogFileExtractor.logEntryReceived(), and com.cosylab.logging.engine.LogMatcher.match().
void com.cosylab.logging.engine.FiltersVector.clear | ( | ) |
Delete all the filters (and the active vector)
Referenced by com.cosylab.logging.engine.FiltersVector.loadFilters(), alma.acs.logging.table.LogTableRowSorter.setFilters(), com.cosylab.logging.engine.ACS.LCEngine.setFilters(), and com.cosylab.logging.engine.FiltersVector.setFilters().
int [] com.cosylab.logging.engine.FiltersVector.getAppliedFiltersIndexes | ( | ) |
Return the indexes of the active filters
String com.cosylab.logging.engine.FiltersVector.getFilterString | ( | ) |
Returns the filter(s) applied as a string.
Referenced by alma.acs.logging.table.LogTableRowSorter.getFiltersString(), and com.cosylab.logging.engine.ACS.LCEngine.getFiltersString().
boolean com.cosylab.logging.engine.FiltersVector.hasActiveFilters | ( | ) |
Check if there are active filters
Referenced by com.cosylab.logging.engine.ACS.LCEngine.isFiltered().
boolean com.cosylab.logging.engine.FiltersVector.isActive | ( | int | n | ) |
Return true if the filter is active
n | The index of the filters |
Referenced by com.cosylab.logging.engine.FiltersVector.saveFilters(), alma.acs.logging.table.LogTableRowSorter.setFilters(), and com.cosylab.logging.engine.ACS.LCEngine.setFilters().
void com.cosylab.logging.engine.FiltersVector.loadFilters | ( | File | f, | |
boolean | eraseFilters, | |||
String | fileName | |||
) | throws Exception |
Load filters In case of errors an exception is thrown
f | The xml file to parse (java.io.File) | |
eraseFilters | If true existing filters will be deleted before loading | |
fileName | Is the name of the file (it is usually null and the name is read from the parameter f. However when this method is called recursively we need to pass the name because the file we're reading is a temporary file (generated by converting the original file) |
<code>Exception</code> | In case of error loading the filters |
References com.cosylab.logging.engine.FiltersVector.addFilter(), and com.cosylab.logging.engine.FiltersVector.clear().
Referenced by alma.acs.logging.tools.LogFileExtractor.LogFileExtractor(), and alma.acs.logging.dialogs.main.LogFrame.LogFrame().
Filter com.cosylab.logging.engine.FiltersVector.remove | ( | int | index | ) |
Remove an element from the FiltersVector (We need to override this method because we need to keep the activeFilters aligned)
void com.cosylab.logging.engine.FiltersVector.saveFilters | ( | File | f | ) | throws IOException |
Save the filters on a file
f | The xml file to store the filters in (java.io.File) |
References com.cosylab.logging.engine.FiltersVector.isActive().
void com.cosylab.logging.engine.FiltersVector.setFilters | ( | FiltersVector | flts | ) |
Set the filters in this vector to be the same of the passed vector
flts | The vector of filters |
References com.cosylab.logging.engine.FiltersVector.clear().
void com.cosylab.logging.engine.FiltersVector.setFilters | ( | Filter[] | f, | |
boolean[] | active | |||
) |
Set the filters in the vector deleting any other filter. The activeFilters vector is also updated
filters | The array of filters to add | |
active | The array of active filters |
References com.cosylab.logging.engine.FiltersVector.clear().
Referenced by alma.acs.logging.table.LogTableRowSorter.setFilters(), and com.cosylab.logging.settings.FilterChooserDialog.setFilters().