All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ikasan.dashboard.ui.general.component.SearchResultsDialog Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
package org.ikasan.dashboard.ui.general.component;

import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
import org.ikasan.dashboard.ui.util.DateFormatter;
import org.ikasan.solr.model.IkasanSolrDocument;
import org.ikasan.solr.model.IkasanSolrDocumentSearchResults;
import org.ikasan.spec.error.reporting.ErrorReportingService;
import org.ikasan.spec.hospital.service.HospitalAuditService;
import org.ikasan.spec.metadata.ModuleMetaDataService;
import org.ikasan.spec.module.client.ReplayService;
import org.ikasan.spec.module.client.ResubmissionService;
import org.ikasan.spec.persistence.BatchInsert;
import org.ikasan.spec.solr.SolrGeneralService;

import java.util.List;

public class SearchResultsDialog extends AbstractCloseableResizableDialog {

    private SearchResults searchResults;

    public SearchResultsDialog(SolrGeneralService solrGeneralService
        , HospitalAuditService hospitalAuditService, ResubmissionService resubmissionRestService
        , ReplayService replayRestService, ModuleMetaDataService moduleMetadataService, BatchInsert replayAuditService, DateFormatter dateFormatter
        , int maxDownloadBytes){
        searchResults = new SearchResults(solrGeneralService, hospitalAuditService,
            resubmissionRestService, replayRestService, moduleMetadataService, replayAuditService, dateFormatter, maxDownloadBytes);

        searchResults.setSizeFull();

        HorizontalLayout wrapper = new HorizontalLayout();
        wrapper.setWidthFull();
        wrapper.setHeight("95%");
        wrapper.add(searchResults);
        this.content.add(wrapper);


        this.setSizeFull();
    }

    public void search(long startTime, long endTime, String searchTerm, String type, boolean negateQuery, String moduleName, String flowName) {
        this.searchResults.search(startTime, endTime, searchTerm, List.of(type), negateQuery, List.of(moduleName), List.of(flowName));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy