Interface MetadataService

All Superinterfaces:
net.solarnetwork.service.Identifiable
All Known Implementing Classes:
UserMetadataService

public interface MetadataService extends net.solarnetwork.service.Identifiable
API for accessing dynamic metadata.
Since:
1.83
Version:
2.0
Author:
matt
  • Field Summary

    Fields inherited from interface net.solarnetwork.service.Identifiable

    GROUP_UID_PROPERTY, UID_PROPERTY
  • Method Summary

    Modifier and Type
    Method
    Description
    net.solarnetwork.domain.datum.GeneralDatumMetadata
    Get all metadata available.
    default Object
    Get a metadata value at a given path.
    default <T> T
    metadataAtPath(String path, Class<T> clazz)
    Get a metadata value of a given type at a given path.

    Methods inherited from interface net.solarnetwork.service.Identifiable

    getDisplayName, getGroupUid, getUid
  • Method Details

    • getAllMetadata

      net.solarnetwork.domain.datum.GeneralDatumMetadata getAllMetadata()
      Get all metadata available.
      Returns:
      the metadata, or null if none available
    • metadataAtPath

      default Object metadataAtPath(String path)
      Get a metadata value at a given path.
      Parameters:
      path - the path of the metadata object to get
      Returns:
      the value, or null
      See Also:
      • GeneralDatumMetadata.metadataAtPath(String)
    • metadataAtPath

      default <T> T metadataAtPath(String path, Class<T> clazz)
      Get a metadata value of a given type at a given path.
      Type Parameters:
      T - the expected value type
      Parameters:
      path - the path of the metadata object to get
      clazz - the expected value type class
      Returns:
      the value, or null
      See Also:
      • GeneralDatumMetadata.metadataAtPath(String, Class)