Class GreenhouseController
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.controller.GreenhouseController
-
public class GreenhouseController extends java.lang.Object
Controller for the greenhouse.
-
-
Constructor Summary
Constructors Constructor Description GreenhouseController(java.util.Properties settings)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Greenhouse
getGreenhouse()
Get the current greenhouse.boolean
isSetup()
Check if the greenhouse is initialized.boolean
registerGreenhouse(GreenhouseSetup greenhouseSetup)
Register a new greenhouse.
-
-
-
Method Detail
-
getGreenhouse
public Greenhouse getGreenhouse() throws GreenhouseNotInitializedException
Get the current greenhouse.- Returns:
- The current greenhouse as a Greenhouse object.
- Throws:
GreenhouseNotInitializedException
- If the greenhouse is not initialized.
-
registerGreenhouse
public boolean registerGreenhouse(GreenhouseSetup greenhouseSetup)
Register a new greenhouse.- Parameters:
greenhouseSetup
- The greenhouse settings, required to initialize the greenhouse.- Returns:
- True if the greenhouse was successfully initialized, false otherwise.
-
isSetup
public boolean isSetup()
Check if the greenhouse is initialized.- Returns:
- True if the greenhouse is initialized, false otherwise.
-
-