Class GreenhouseSetup


  • public class GreenhouseSetup
    extends java.lang.Object
    GreenhouseSetup is a class that represents data necessary for the setup of a greenhouse.
    • Constructor Summary

      Constructors 
      Constructor Description
      GreenhouseSetup​(java.lang.String name, java.lang.String description, java.lang.String token)
      Constructor for GreenhouseSetup.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static GreenhouseSetup fromJson​(org.json.JSONObject json)
      Converts a JSON to a GreenhouseSetup object.
      java.lang.String getDescription()
      Returns the description of the greenhouse.
      java.lang.String getName()
      Returns the name of the greenhouse.
      java.lang.String getToken()
      Returns the access token that will be used to register the greenhouse inside the API server.
      • Methods inherited from class java.lang.Object

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

      • GreenhouseSetup

        public GreenhouseSetup​(java.lang.String name,
                               java.lang.String description,
                               java.lang.String token)
        Constructor for GreenhouseSetup.
        Parameters:
        name - The name of the greenhouse.
        description - The description of the greenhouse.
        token - The access token that will be used to register the greenhouse inside the API server.
    • Method Detail

      • fromJson

        public static GreenhouseSetup fromJson​(org.json.JSONObject json)
                                        throws java.text.ParseException
        Converts a JSON to a GreenhouseSetup object.
        Parameters:
        json - The JSONObject to be converted.
        Returns:
        The GreenhouseSetup object.
        Throws:
        java.text.ParseException - Thrown if the JSON data is missing or not valid.
      • getName

        public java.lang.String getName()
        Returns the name of the greenhouse.
        Returns:
        The name of the greenhouse.
      • getDescription

        public java.lang.String getDescription()
        Returns the description of the greenhouse.
        Returns:
        The description of the greenhouse.
      • getToken

        public java.lang.String getToken()
        Returns the access token that will be used to register the greenhouse inside the API server.
        Returns:
        The access token that will be used to register the greenhouse inside the API server.