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

com.sitewhere.microservice.api.search.IDeviceEventSearchProvider Maven / Gradle / Ivy

/*
 * Copyright (c) SiteWhere, LLC. All rights reserved. http://www.sitewhere.com
 *
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */
package com.sitewhere.microservice.api.search;

import java.util.List;

import com.fasterxml.jackson.databind.JsonNode;
import com.sitewhere.spi.SiteWhereException;
import com.sitewhere.spi.device.event.IDeviceEvent;
import com.sitewhere.spi.device.event.IDeviceLocation;
import com.sitewhere.spi.search.IDateRangeSearchCriteria;

/**
 * Search provider that provides information about SiteWhere device events.
 */
public interface IDeviceEventSearchProvider extends ISearchProvider {

    /**
     * Executes an arbitrary event query against the search provider.
     * 
     * @param query
     * @return
     * @throws SiteWhereException
     */
    List executeQuery(String query) throws SiteWhereException;

    /**
     * Execute a query, returning a raw response from the provider.
     * 
     * @param query
     * @return
     * @throws SiteWhereException
     */
    JsonNode executeQueryWithRawResponse(String query) throws SiteWhereException;

    /**
     * Get a list of device locations near the given lat/long in the given time
     * period.
     * 
     * @param latitude
     * @param longitude
     * @param distance
     * @param criteria
     * @return
     * @throws SiteWhereException
     */
    List getLocationsNear(double latitude, double longitude, double distance,
	    IDateRangeSearchCriteria criteria) throws SiteWhereException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy