Class SGrDeclarationLibrary


  • public class SGrDeclarationLibrary
    extends java.lang.Object
    Provides a client for the SGr declaration library. Can be used to retrieve EI-XML data and information. The implementation is backed by the commhandler's HTTP driver.
    • Constructor Summary

      Constructors 
      Constructor Description
      SGrDeclarationLibrary()
      Constructs with default HTTP implementation.
      SGrDeclarationLibrary​(com.smartgridready.driver.api.http.GenHttpClientFactory httpClientFactory)
      Constructs with custom HTTP implementation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getProductEidXml​(java.lang.String eidName)
      Gets product EI-XML data.
      ProductInfo getProductInfo​(java.lang.String eidName)
      Gets information about a product EID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SGrDeclarationLibrary

        public SGrDeclarationLibrary()
        Constructs with default HTTP implementation.
      • SGrDeclarationLibrary

        public SGrDeclarationLibrary​(com.smartgridready.driver.api.http.GenHttpClientFactory httpClientFactory)
        Constructs with custom HTTP implementation.
        Parameters:
        httpClientFactory - the HTTP client factory implementation
    • Method Detail

      • getProductEidXml

        public java.lang.String getProductEidXml​(java.lang.String eidName)
                                          throws java.io.IOException
        Gets product EI-XML data.
        Parameters:
        eidName - the EID name
        Returns:
        EI-XML as string
        Throws:
        java.io.IOException - when the request failed
      • getProductInfo

        public ProductInfo getProductInfo​(java.lang.String eidName)
                                   throws java.io.IOException
        Gets information about a product EID.
        Parameters:
        eidName - the EID name
        Returns:
        an instance of ProductInfo
        Throws:
        java.io.IOException - when the request or decoding failed