Improve javadoc for all addons (#15667)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -18,7 +18,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.thing.ThingTypeUID;
|
||||
|
||||
/**
|
||||
* The {@link OpenSprinklerBinding} class defines common constants, which are
|
||||
* The {@link OpenSprinklerBindingConstants} class defines common constants, which are
|
||||
* used across the whole binding.
|
||||
*
|
||||
* @author Chris Graham - Initial contribution
|
||||
|
||||
@@ -47,14 +47,16 @@ public interface OpenSprinklerApi {
|
||||
/**
|
||||
* Enters the "manual" mode of the device so that API requests are accepted.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
void enterManualMode() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Disables the manual mode, if it is enabled.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
void leaveManualMode() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
@@ -63,7 +65,8 @@ public interface OpenSprinklerApi {
|
||||
*
|
||||
* @param station Index of the station to open starting at 0.
|
||||
* @param duration The duration in seconds for how long the station should be turned on.
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws GeneralApiException
|
||||
*/
|
||||
void openStation(int station, BigDecimal duration) throws CommunicationApiException, GeneralApiException;
|
||||
|
||||
@@ -71,7 +74,8 @@ public interface OpenSprinklerApi {
|
||||
* Closes a station on the OpenSprinkler device.
|
||||
*
|
||||
* @param station Index of the station to open starting at 0.
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws GeneralApiException
|
||||
*/
|
||||
void closeStation(int station) throws CommunicationApiException, GeneralApiException;
|
||||
|
||||
@@ -80,7 +84,8 @@ public interface OpenSprinklerApi {
|
||||
*
|
||||
* @param station Index of the station to open starting at 0.
|
||||
* @return True if the station is open, false if it is closed or cannot determine.
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws GeneralApiException
|
||||
*/
|
||||
boolean isStationOpen(int station) throws CommunicationApiException, GeneralApiException;
|
||||
|
||||
@@ -89,7 +94,7 @@ public interface OpenSprinklerApi {
|
||||
*
|
||||
* @param station Index of the station to request data from
|
||||
* @return StationProgram
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
*/
|
||||
StationProgram retrieveProgram(int station) throws CommunicationApiException;
|
||||
|
||||
@@ -97,7 +102,6 @@ public interface OpenSprinklerApi {
|
||||
* Returns the state of rain detection on the OpenSprinkler device.
|
||||
*
|
||||
* @return True if rain is detected, false if not or cannot determine.
|
||||
* @throws Exception
|
||||
*/
|
||||
boolean isRainDetected();
|
||||
|
||||
@@ -161,7 +165,8 @@ public interface OpenSprinklerApi {
|
||||
* Returns the firmware version number.
|
||||
*
|
||||
* @return The firmware version of the OpenSprinkler device as an int.
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
int getFirmwareVersion() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
@@ -199,7 +204,7 @@ public interface OpenSprinklerApi {
|
||||
/**
|
||||
* Runs a Program that is setup and stored inside the OpenSprinkler
|
||||
*
|
||||
* @param Program index number that you wish to run.
|
||||
* @param command Program index number that you wish to run.
|
||||
*
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
|
||||
@@ -47,13 +47,10 @@ public class OpenSprinklerApiFactory {
|
||||
* Factory method used to determine what version of the API is in use at the
|
||||
* OpenSprinkler API and return the proper class for control of the device.
|
||||
*
|
||||
* @param hostname Hostname or IP address as a String of the OpenSprinkler device.
|
||||
* @param port The port number the OpenSprinkler API is listening on.
|
||||
* @param password Admin password for the OpenSprinkler device.
|
||||
* @param basicUsername Used when basic auth is required
|
||||
* @param basicPassword Used when basic auth is required
|
||||
* @param config Interface settings
|
||||
* @return OpenSprinkler HTTP API class for control of the device.
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws GeneralApiException
|
||||
*/
|
||||
public OpenSprinklerApi getHttpApi(OpenSprinklerHttpInterfaceConfig config)
|
||||
throws CommunicationApiException, GeneralApiException {
|
||||
|
||||
@@ -131,7 +131,8 @@ class OpenSprinklerHttpApiV210 extends OpenSprinklerHttpApiV100 {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
@Override
|
||||
public void enterManualMode() throws CommunicationApiException, UnauthorizedApiException {
|
||||
@@ -150,7 +151,7 @@ class OpenSprinklerHttpApiV210 extends OpenSprinklerHttpApiV100 {
|
||||
*
|
||||
* @param returnContent String value of the return content from the OpenSprinkler device when
|
||||
* an action result is returned from the API.
|
||||
* @throws Exception Returns a custom exception based on the result key.
|
||||
* @throws GeneralApiException Returns a custom exception based on the result key.
|
||||
*/
|
||||
protected void resultParser(String returnContent) throws GeneralApiException {
|
||||
int returnCode;
|
||||
|
||||
Reference in New Issue
Block a user