Interface LocationService


public interface LocationService
API for managing locations.
Version:
2.1
Author:
matt
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    An unknown location, which is always available for the UNKNOWN source.
    static final String
    An unknown source, which is always available.
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<net.solarnetwork.domain.datum.GeneralLocationSourceMetadata>
    findLocationMetadata(String query, String sourceId, Set<String> tags)
    Query for general location metadata.
    net.solarnetwork.domain.datum.GeneralLocationSourceMetadata
    getLocationMetadata(Long locationId, String sourceId)
    Get a specific general location metadata.
    net.solarnetwork.domain.Location
    Get the node's own location details from SolarNetwork.
    void
    updateNodeLocation(net.solarnetwork.domain.Location location)
    Update the node's own location details in SolarNetwork.
  • Field Details

    • UNKNOWN_SOURCE

      static final String UNKNOWN_SOURCE
      An unknown source, which is always available.
      See Also:
    • UNKNOWN_LOCATION

      static final String UNKNOWN_LOCATION
      An unknown location, which is always available for the UNKNOWN source.
      See Also:
  • Method Details

    • findLocationMetadata

      Collection<net.solarnetwork.domain.datum.GeneralLocationSourceMetadata> findLocationMetadata(String query, String sourceId, Set<String> tags)
      Query for general location metadata.
      Parameters:
      query - the query text
      sourceId - an optional source ID to limit the results to
      tags - the optional tags
      Returns:
      the matching location metadata, never null
      Since:
      1.1
    • getLocationMetadata

      net.solarnetwork.domain.datum.GeneralLocationSourceMetadata getLocationMetadata(Long locationId, String sourceId)
      Get a specific general location metadata.
      Parameters:
      locationId - the location ID
      sourceId - the source ID
      Returns:
      the location metadata, or null if not found
      Since:
      1.1
    • updateNodeLocation

      void updateNodeLocation(net.solarnetwork.domain.Location location)
      Update the node's own location details in SolarNetwork.

      This is meant to support updating a node's own GPS coordinates. Other location properties may or may not be supported.

      Parameters:
      location - the location details to update
      Since:
      1.2
    • getNodeLocation

      net.solarnetwork.domain.Location getNodeLocation()
      Get the node's own location details from SolarNetwork.
      Returns:
      the location, if available
      Since:
      2.1