19 package org.sleuthkit.autopsy.filesearch;
21 import java.awt.event.ActionListener;
22 import org.openide.util.NbBundle.Messages;
27 class DataSourceFilter
extends AbstractFileSearchFilter<DataSourcePanel> {
33 public DataSourceFilter(DataSourcePanel component) {
40 public DataSourceFilter() {
41 this(
new DataSourcePanel());
45 public boolean isEnabled() {
46 return this.getComponent().isSelected();
50 public String getPredicate() throws FilterValidationException {
51 String predicate =
"";
52 for (Long dataSourceObjId : this.getComponent().getDataSourcesSelected()) {
53 if (!predicate.isEmpty()) {
56 predicate +=
"data_source_obj_id = '" + dataSourceObjId +
"'";
62 public void addActionListener(ActionListener lis) {
68 "DataSourceFilter.errorMessage.emptyDataSource=At least one data source must be selected."
70 public boolean isValid() {
71 if(this.getComponent().getDataSourcesSelected().isEmpty()){
72 setLastError(Bundle.DataSourceFilter_errorMessage_emptyDataSource());