Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
koubachi
Browse files Browse the repository at this point in the history
  • Loading branch information
watou committed Feb 1, 2016
1 parent 90a0591 commit e519aeb
Showing 1 changed file with 17 additions and 9 deletions.
Expand Up @@ -60,7 +60,7 @@ public class KoubachiBinding extends AbstractActiveBinding<KoubachiBindingProvid
* <ol>
* <li>action type</li>
* </ol>
*
*
* @see https://labs.koubachi.com/documentations/9
*/
private static final String TASKS_BODY = "{\"care_action\":{\"action_type\":\"%1$s\"}}";
Expand Down Expand Up @@ -196,11 +196,11 @@ protected void internalReceiveCommand(final String itemName, final Command comma

/**
* Gets the list of all configured Devices from the Koubachi server.
*
*
* @param appKey
* @param credentials
* @param apiDeviceListUrl
*
*
* @return the list of all configured Devices. Is never {@code null}.
*/
private List<Device> getDevices(String apiDeviceListUrl, String credentials, String appKey) {
Expand Down Expand Up @@ -229,7 +229,7 @@ private List<Device> getDevices(String apiDeviceListUrl, String credentials, Str

/**
* Gets the list of all configured Plants from the Koubachi server.
*
*
* @return the list of all configured Plants. Is never {@code null}.
*/
private List<Plant> getPlants(String apiPlantListUrl, String credentials, String appKey) {
Expand Down Expand Up @@ -262,7 +262,7 @@ private List<Plant> getPlants(String apiPlantListUrl, String credentials, String
* Refer to the <a
* href="https://labs.koubachi.com/documentations/9">Koubachi API
* documentation</a> for supported actions.
*
*
* @param plantId
* the id of the plant the action was performed on
* @param actionType
Expand All @@ -287,10 +287,10 @@ private void performCareAction(final String plantId, final String actionType) {

/**
* Maps the given {@code jsonString} to {@code type}.
*
*
* @param type to type to map the given {@code jsonString}
* @param jsonString the content which should be mapped to {@code type}
*
*
* @return a new instance of {@code type} with content of {@code jsonString}
*/
private <T> T fromJSON(final TypeReference<T> type, final String jsonString) {
Expand Down Expand Up @@ -321,9 +321,9 @@ private <R extends KoubachiResource> R findResource(String id, List<R> resources
* <p>
* If {@code propertyValue} is {@code null}, {@link UnDefType#NULL} will be
* returned.
*
*
* @param propertyValue
*
*
* @return the new {@link State} in accordance to {@code dataType}. Will
* never be {@code null}.
*/
Expand Down Expand Up @@ -351,6 +351,14 @@ private State createState(Object propertyValue) {
}
}

protected void addBindingProvider(KoubachiBindingProvider bindingProvider) {
super.addBindingProvider(bindingProvider);
}

protected void removeBindingProvider(KoubachiBindingProvider bindingProvider) {
super.removeBindingProvider(bindingProvider);
}

@Override
public void updated(Dictionary<String, ?> config) throws ConfigurationException {
if (config != null) {
Expand Down

0 comments on commit e519aeb

Please sign in to comment.