]> git.basschouten.com Git - openhab-addons.git/commitdiff
[digitalstrom] code refactoring (#14402)
authorlsiepel <leosiepel@gmail.com>
Sat, 18 Feb 2023 17:15:27 +0000 (18:15 +0100)
committerGitHub <noreply@github.com>
Sat, 18 Feb 2023 17:15:27 +0000 (18:15 +0100)
Signed-off-by: lsiepel <leosiepel@gmail.com>
55 files changed:
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DeviceDiscoveryService.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DiscoveryServiceManager.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/SceneDiscoveryService.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/ZoneTemperatureControlDiscoveryService.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/handler/ZoneTemperatureControlHandler.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/climate/TemperatureControlSensorTransmitter.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/event/EventHandler.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/event/constants/EventNames.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/event/constants/EventResponseEnum.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/event/types/Event.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/event/types/EventItem.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/event/types/EventItemImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/event/types/JSONEventImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/listener/SystemStateChangeListener.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/listener/TemperatureControlStatusListener.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/manager/impl/ConnectionManagerImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/manager/impl/DeviceStatusManagerImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/manager/impl/StructureManagerImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/manager/impl/TemperatureControlManager.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/DsAPI.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/constants/JSONApiResponseKeysEnum.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/impl/DsAPIImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/impl/HttpTransportImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/simpledsrequestbuilder/SimpleRequestBuilder.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/simpledsrequestbuilder/constants/ClassKeys.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/simpledsrequestbuilder/constants/ExeptionConstants.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/simpledsrequestbuilder/constants/FunctionKeys.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/simpledsrequestbuilder/constants/InterfaceKeys.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/serverconnection/simpledsrequestbuilder/constants/ParameterKeys.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/Apartment.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/DetailedGroupInfo.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/Group.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/Zone.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/AbstractGeneralDeviceInformations.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/Circuit.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/Device.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/GeneralDeviceInformation.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/DeviceConfig.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/DeviceSceneSpec.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/constants/DeviceBinarayInputEnum.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/constants/DeviceParameterClassEnum.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/constants/MeteringTypeEnum.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/constants/MeteringUnitsEnum.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/impl/DSID.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/impl/DSUID.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/impl/DeviceBinaryInput.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/impl/DeviceSensorValue.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/deviceparameters/impl/JSONDeviceConfigImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/devices/impl/CircuitImpl.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/scene/SceneDiscovery.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/structure/scene/constants/SceneEnum.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/util/DSJsonParser.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/providers/BaseDsI18n.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/providers/DsChannelTypeProvider.java
bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/providers/DsDeviceThingTypeProvider.java

index f5aa0686093291d745aedc66ccff4d1eaa91b5a1..762da5f004a4b90058d344ec1556d67d60fae98e 100644 (file)
@@ -26,12 +26,10 @@ import org.openhab.binding.digitalstrom.internal.handler.BridgeHandler;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.Circuit;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.Device;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.GeneralDeviceInformation;
-import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.OutputModeEnum;
 import org.openhab.binding.digitalstrom.internal.providers.DsDeviceThingTypeProvider;
 import org.openhab.core.config.discovery.AbstractDiscoveryService;
 import org.openhab.core.config.discovery.DiscoveryResult;
 import org.openhab.core.config.discovery.DiscoveryResultBuilder;
-import org.openhab.core.thing.Thing;
 import org.openhab.core.thing.ThingTypeUID;
 import org.openhab.core.thing.ThingUID;
 import org.slf4j.Logger;
index ca26c8d7ce520a24f4ac3424e1ad9cdc8c149e44..84f81eda20a8a44af54b2af0869feabb02d943e5 100644 (file)
@@ -37,7 +37,6 @@ import org.openhab.binding.digitalstrom.internal.providers.DsDeviceThingTypeProv
 import org.openhab.core.config.discovery.AbstractDiscoveryService;
 import org.openhab.core.config.discovery.DiscoveryService;
 import org.openhab.core.thing.ThingTypeUID;
-import org.openhab.core.thing.type.ThingType;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.slf4j.Logger;
index 9db813c01e68f3df2b668d240f4998dfeaed4f08..d275567a0856e34e6d7f7d9496b3493ec19e4959 100644 (file)
@@ -24,7 +24,6 @@ import java.util.HashSet;
 import java.util.Map;
 
 import org.openhab.binding.digitalstrom.internal.handler.BridgeHandler;
-import org.openhab.binding.digitalstrom.internal.handler.SceneHandler;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.ApplicationGroup;
 import org.openhab.binding.digitalstrom.internal.lib.structure.scene.InternalScene;
 import org.openhab.binding.digitalstrom.internal.lib.structure.scene.constants.SceneEnum;
index ef725c8ed5be38340a174f0f32dac5642fb55618..7b57652b7cefca23d3920a593d8f3e5e6dd4dcab 100644 (file)
@@ -22,7 +22,6 @@ import java.util.Map;
 
 import org.openhab.binding.digitalstrom.internal.DigitalSTROMBindingConstants;
 import org.openhab.binding.digitalstrom.internal.handler.BridgeHandler;
-import org.openhab.binding.digitalstrom.internal.handler.ZoneTemperatureControlHandler;
 import org.openhab.binding.digitalstrom.internal.lib.climate.jsonresponsecontainer.impl.TemperatureControlStatus;
 import org.openhab.core.config.discovery.AbstractDiscoveryService;
 import org.openhab.core.config.discovery.DiscoveryResult;
@@ -38,8 +37,8 @@ import org.slf4j.LoggerFactory;
  * {@link #ZoneTemperatureControlDiscoveryService(BridgeHandler, ThingTypeUID)} as {@link ThingTypeUID}. The supported
  * {@link ThingTypeUID} can be found at {@link ZoneTemperatureControlHandler#SUPPORTED_THING_TYPES}
  *
- * @author Michael Ochel
- * @author Matthias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class ZoneTemperatureControlDiscoveryService extends AbstractDiscoveryService {
 
index d390f9645781114c221392cae4461de54ebc13a2..3fbdf4310ff3dded15ab1230da90fcdcaae36aca 100644 (file)
@@ -28,7 +28,6 @@ import org.openhab.binding.digitalstrom.internal.lib.climate.constants.ControlSt
 import org.openhab.binding.digitalstrom.internal.lib.climate.jsonresponsecontainer.impl.TemperatureControlStatus;
 import org.openhab.binding.digitalstrom.internal.lib.listener.TemperatureControlStatusListener;
 import org.openhab.binding.digitalstrom.internal.lib.manager.StructureManager;
-import org.openhab.binding.digitalstrom.internal.lib.manager.impl.TemperatureControlManager;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.ApplicationGroup;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.OutputChannelEnum;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.OutputModeEnum;
index 0d9c32951f7db38c864bdffbd0db13988910703c..98440b4eb6a9ac94693b25cf43b908997a73b1cd 100644 (file)
@@ -16,8 +16,8 @@ package org.openhab.binding.digitalstrom.internal.lib.climate;
  * The {@link TemperatureControlSensorTransmitter} can be implement by subclasses to implement a
  * transmitter which can be used to push the target temperature or control value to a digitalSTROM zone.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public interface TemperatureControlSensorTransmitter {
 
index f2d466579d745cc914913446f086c4ffc26d5e79..0005e50a047dc37751300064ccd1d428d63c6c56 100644 (file)
@@ -28,8 +28,8 @@ import org.openhab.binding.digitalstrom.internal.lib.event.types.EventItem;
  * <br>
  * To handle the {@link EventItem} the method {@link #handleEvent(EventItem)} has to be implemented.
  *
- * @author Michael Ochel
- * @author Matthias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public interface EventHandler {
 
index 1a3a09b9d6f81d2882a8d5657f342f0ee22d92b0..f99cf3f99cdbf3c3724d323a795d3086d48dbc96 100644 (file)
@@ -15,8 +15,8 @@ package org.openhab.binding.digitalstrom.internal.lib.event.constants;
 /**
  * The {@link EventNames} contains all needed event names to subscribe at the digitalSTROM server.
  *
- * @author Michael Ochel
- * @author Matthias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class EventNames {
 
index d0fad1779eec9158524008ba48f180980789a99e..fe63f792f4fb2a1f48905a9c27a7a1d3bda0e6bc 100644 (file)
@@ -18,8 +18,8 @@ import java.util.Map;
 /**
  * The {@link EventResponseEnum} contains digitalSTROM-Event properties of the events at {@link EventNames}.
  *
- * @author Michael Ochel
- * @author Mathias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Mathias Siegele - Initial contribution
  */
 public enum EventResponseEnum {
 
index e642d583333b47e00b23254118c7ffca56547ecf..ee76ef7612b24c6694045a21ef78b0454d866ca1 100644 (file)
@@ -17,7 +17,7 @@ import java.util.List;
 /**
  * The {@link Event} represents a digitalSTROM-Event.
  *
- * @author Alexander Betker
+ * @author Alexander Betker - Initial contribution
  */
 public interface Event {
 
index 57a2fbf3467b0672d6c2d1a3ee0990b7673286ef..dc2c685cb995bcdea21cd42805d0219f36d087e2 100644 (file)
@@ -19,7 +19,7 @@ import org.openhab.binding.digitalstrom.internal.lib.event.constants.EventRespon
 /**
  * The {@link EventItem} represents an event item of a digitalSTROM-Event.
  *
- * @author Alexander Betker
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add getSource()
  * @author Matthias Siegele - add getSource()
  */
index 1331d11fa132856e8c7495cf577edeaf5dcbb460..8606c26bf97df16bcdb9d0a2fe2866601fc7dc48 100644 (file)
@@ -26,8 +26,8 @@ import com.google.gson.JsonObject;
 /**
  * The {@link EventItemImpl} is the implementation of the {@link EventItem}.
  *
- * @author Michael Ochel
- * @author Mathias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Mathias Siegele - Initial contribution
  */
 public class EventItemImpl implements EventItem {
 
index 6cf3273d2a5ffaea020673298d7297b03e9979f4..e2cc1ec54b86addba84cd06fab4a95db682de0f4 100644 (file)
@@ -21,7 +21,7 @@ import com.google.gson.JsonObject;
 /**
  * The {@link JSONEventImpl} is the implementation of the {@link Event}.
  *
- * @author Alexander Betker
+ * @author Alexander Betker - Initial contribution
  */
 public class JSONEventImpl implements Event {
 
index 6e2effd5c21df101f05a0c2dc8353ef63817a71b..9a686ce4f736a7d6e5ca145891f412c070240159 100644 (file)
@@ -16,8 +16,8 @@ package org.openhab.binding.digitalstrom.internal.lib.listener;
  * The {@link SystemStateChangeListener} can be implemented to get informed by digitalSTROM system state changes. It
  * has to be registered by supported classes, e.g. the {@link TemperatureControlManager} or self implemented classes.
  *
- * @author Michael Ochel
- * @author Matthias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public interface SystemStateChangeListener {
 
index f0d346196d25f95021e0f3894edf006071eff10e..6bc19c01e765251ca583465573456260bfff21ba 100644 (file)
@@ -20,8 +20,8 @@ import org.openhab.binding.digitalstrom.internal.lib.climate.jsonresponsecontain
  * <br>
  * It also can be implemented as discovery, than the id have to be {@link #DISCOVERY}.
  *
- * @author Michael Ochel
- * @author Matthias Siegele
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  *
  */
 public interface TemperatureControlStatusListener {
index 487247778e3b8f96ce9d22666d7b2e5bb40a6f21..45438b0f5b2c16d7b6f010b2ec20a54e14b2d124 100644 (file)
@@ -39,7 +39,7 @@ public class ConnectionManagerImpl implements ConnectionManager {
      * Query to get all enabled application tokens. Can be executed with {@link DsAPI#query(String, String)} or
      * {@link DsAPI#query2(String, String)}.
      */
-    public final String QUERY_GET_ENABLED_APPLICATION_TOKENS = "/system/security/applicationTokens/enabled/*(*)";
+    public static final String QUERY_GET_ENABLED_APPLICATION_TOKENS = "/system/security/applicationTokens/enabled/*(*)";
     private final Logger logger = LoggerFactory.getLogger(ConnectionManagerImpl.class);
 
     private Config config;
index 2b4eba153361d1c856504af3b1e3966f90a57b08..35f742d8dc2111752804ebe6b2e85140a2301d2a 100644 (file)
@@ -230,8 +230,8 @@ public class DeviceStatusManagerImpl implements DeviceStatusManager {
     /**
      * Check and updates the {@link Device} structure, configurations and status.
      *
-     * @author Michael Ochel - initial contributer
-     * @author Matthias Siegele - initial contributer
+     * @author Michael Ochel - Initial contribution
+     * @author Matthias Siegele - Initial contribution
      */
     private class PollingRunnable implements Runnable {
         private boolean devicesLoaded = false;
index c39df15e6dcaa48e50b1b2f1ab88e9b88c22a5d6..7faab1044981a7c7c93b584c2285c80f1f55906a 100644 (file)
@@ -21,7 +21,6 @@ import java.util.Set;
 
 import org.openhab.binding.digitalstrom.internal.lib.manager.ConnectionManager;
 import org.openhab.binding.digitalstrom.internal.lib.manager.StructureManager;
-import org.openhab.binding.digitalstrom.internal.lib.serverconnection.DsAPI;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.AbstractGeneralDeviceInformations;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.Circuit;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.Device;
index b81f89feb1a39c37daa2b15a5cdfc32723b85c51..5ead15d8ee46a81b4529aa343afc2394b4521c78 100644 (file)
@@ -55,12 +55,12 @@ import org.slf4j.LoggerFactory;
  * {@link #GET_HEATING_WATER_SYSTEM_STATE_PATH} to get the current heating water system state through
  * {@link DsAPI#propertyTreeGetString(String, String)}.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class TemperatureControlManager implements EventHandler, TemperatureControlSensorTransmitter {
 
-    private final List<String> SUPPORTED_EVENTS = Arrays.asList(EventNames.HEATING_CONTROL_OPERATION_MODE);
+    private static final List<String> SUPPORTED_EVENTS = Arrays.asList(EventNames.HEATING_CONTROL_OPERATION_MODE);
 
     private final Logger logger = LoggerFactory.getLogger(TemperatureControlManager.class);
 
@@ -294,7 +294,6 @@ public class TemperatureControlManager implements EventHandler, TemperatureContr
                         Integer zoneID = Integer
                                 .parseInt(eventItem.getSource().getOrDefault(EventResponseEnum.ZONEID, ""));
                         if (zoneTemperationControlListenerMap.get(zoneID) != null) {
-
                             Float newValue = Float.parseFloat(
                                     eventItem.getProperties().getOrDefault(EventResponseEnum.SENSOR_VALUE_FLOAT, ""));
                             if (!isEcho(zoneID, SensorEnum.ROOM_TEMPERATURE_CONTROL_VARIABLE, newValue)) {
index dfa7fb81ceb0f6334209f1032acc7a56a60b2a53..7538b9862221119e5f36f80d79d200593e872372 100644 (file)
@@ -15,8 +15,6 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection;
 import java.util.List;
 import java.util.Map;
 
-import org.openhab.binding.digitalstrom.internal.lib.climate.constants.ControlModes;
-import org.openhab.binding.digitalstrom.internal.lib.climate.constants.OperationModes;
 import org.openhab.binding.digitalstrom.internal.lib.climate.jsonresponsecontainer.BaseSensorValues;
 import org.openhab.binding.digitalstrom.internal.lib.climate.jsonresponsecontainer.impl.AssignedSensors;
 import org.openhab.binding.digitalstrom.internal.lib.climate.jsonresponsecontainer.impl.SensorValues;
@@ -45,7 +43,7 @@ import com.google.gson.JsonObject;
  * digitalSTROM-API based on dSS-Version higher then 1.14.5.
  * digitalSTROM documentation can be found at http://developer.digitalstrom.org/Architecture/v1.1/dss-json.pdf
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  *
  * @author Michael Ochel - add missing java-doc, update digitalSTROM-JSON-API as far as possible to the pdf version from
  *         June 19, 2014 and add checkConnection method and ALL_METERS constant
index e21bb3dc091a8a0c6bf14a8264e06ce56dcbb71d..dc5e7277751fb0aa560e6abee3ffb21188cb60cc 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.constants
 /**
  * The {@link JSONApiResponseKeysEnum} contains digitalSTROM-JSON response keys.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel completely changed and updated only methods remained
  * @author Matthias Siegele completely changed and updated only methods remained
  */
index 8c6698f6ad0bdb71e0cf17b4905b28d063af53e1..9bac1066652deff63f7cf2e39dbbead919179823 100644 (file)
@@ -69,8 +69,8 @@ import com.google.gson.JsonObject;
 /**
  * The {@link DsAPIImpl} is the implementation of the {@link DsAPI}.
  *
- * @author Alexander Betker - initial contributer
- * @author Alex Maier - initial contributer
+ * @author Alexander Betker - Initial contribution
+ * @author Alex Maier - Initial contribution
  * @author Michael Ochel - implements new methods, API updates and change SimpleJSON to GSON, add helper methods and
  *         requests building with constants to {@link SimpleRequestBuilder}
  * @author Matthias Siegele - implements new methods, API updates and change SimpleJSON to GSON, add helper methods and
@@ -281,12 +281,12 @@ public class DsAPIImpl implements DsAPI {
 
     @Override
     public DeviceConfig getDeviceConfig(String token, DSID dSID, String dSUID, String name,
-            DeviceParameterClassEnum class_, Integer index) {
-        if (checkRequiredDevice(dSID, dSUID, name) && class_ != null
+            DeviceParameterClassEnum classEnum, Integer index) {
+        if (checkRequiredDevice(dSID, dSUID, name) && classEnum != null
                 && SimpleRequestBuilder.objectToString(index) != null) {
             String response = transport.execute(SimpleRequestBuilder.buildNewJsonRequest(ClassKeys.DEVICE)
                     .addFunction(FunctionKeys.GET_CONFIG).addDefaultDeviceParameter(token, dSID, dSUID, name)
-                    .addParameter(ParameterKeys.CLASS, class_.getClassIndex().toString())
+                    .addParameter(ParameterKeys.CLASS, classEnum.getClassIndex().toString())
                     .addParameter(ParameterKeys.INDEX, SimpleRequestBuilder.objectToString(index))
                     .buildRequestString());
 
index 20b836fea1f829470b673d48ec952355bc8cceac..1c63bb82b813064dbf0e616edd137b7eb87de1d5 100644 (file)
@@ -43,7 +43,6 @@ import javax.net.ssl.SSLSocketFactory;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 
-import org.apache.commons.lang3.StringUtils;
 import org.openhab.binding.digitalstrom.internal.lib.config.Config;
 import org.openhab.binding.digitalstrom.internal.lib.manager.ConnectionManager;
 import org.openhab.binding.digitalstrom.internal.lib.serverconnection.HttpTransport;
@@ -334,7 +333,8 @@ public class HttpTransportImpl implements HttpTransport {
     }
 
     private boolean checkNeededSessionToken(String request) {
-        String functionName = StringUtils.substringAfterLast(StringUtils.substringBefore(request, "?"), "/");
+        String requestFirstPart = request.substring(0, request.indexOf("?"));
+        String functionName = requestFirstPart.substring(requestFirstPart.lastIndexOf("/") + 1);
         return !DsAPIImpl.METHODS_MUST_NOT_BE_LOGGED_IN.contains(functionName);
     }
 
@@ -347,9 +347,10 @@ public class HttpTransportImpl implements HttpTransport {
                 correctedRequest = correctedRequest + "?" + ParameterKeys.TOKEN + "=" + sessionToken;
             }
         } else {
-            correctedRequest = StringUtils.replaceOnce(correctedRequest, StringUtils.substringBefore(
-                    StringUtils.substringAfter(correctedRequest, ParameterKeys.TOKEN + "="), "&"), sessionToken);
-
+            String strippedRequest = correctedRequest
+                    .substring(correctedRequest.indexOf(ParameterKeys.TOKEN + "=") + ParameterKeys.TOKEN.length() + 1);
+            strippedRequest = strippedRequest.substring(0, strippedRequest.lastIndexOf("&"));
+            correctedRequest = correctedRequest.replaceFirst(strippedRequest, sessionToken);
         }
         return correctedRequest;
     }
index 01cbb07fc723402d6f8a7f2e3039c3c5df97e96a..9eb712e1ac6a55c70cb6408e82ce93817534561f 100644 (file)
@@ -36,8 +36,8 @@ import org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepar
  * <span style="padding-left:14em">{@link #buildRequestString()};<br>
  * </span></i>
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class SimpleRequestBuilder {
 
index c13bb39cc6d24efde8ebfaf8d2811baa19cb1f28..4f95574b98883c80f4447ab248ebcb2791a6090b 100644 (file)
@@ -15,8 +15,8 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.simpledsr
 /**
  * The {@link ClassKeys} contains digitalSTROM-JSON class keys.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class ClassKeys {
 
index 4aec9715666bccb2fbcb7d283d24690f3efcb4ab..16267ac6290d630d3fb2185a44e0fb2fab7757a9 100644 (file)
@@ -15,8 +15,8 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.simpledsr
 /**
  * The {@link ExeptionConstants} contains the {@link SimpleRequestBuilder} exception strings.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class ExeptionConstants {
     public static final String NO_CLASS_ADDED = "No class added! Please add a class first!";
index f517152c0e8608bbcba485047c54943b4656735b..baf75588e38ba5e963a032834bea638e51506b89 100644 (file)
@@ -15,8 +15,8 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.simpledsr
 /**
  * The {@link FunctionKeys} contains digitalSTROM-JSON function keys.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class FunctionKeys {
 
index d70d9906b6debb099925eb59a0757a07743a4c46..5205f0867b7e494fedd997421fc8d55150d11a5f 100644 (file)
@@ -15,8 +15,8 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.simpledsr
 /**
  * The {@link InterfaceKeys} contains digitalSTROM-JSON interface keys.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class InterfaceKeys {
     public static final String JSON = "json";
index ffd49e8c02a3ef073e5e14b1377e00f6b30fe866..64998e7472a6893313cf4a5dd43e8108b6e425d9 100644 (file)
@@ -15,8 +15,8 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.simpledsr
 /**
  * The {@link ParameterKeys} contains digitalSTROM-JSON parameter keys.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class ParameterKeys {
     public static final String TOKEN = "token";
index 2dd83e359d12c71cc0962b57d3403b8768e79cb6..036427f99927f47f3d579455d6d12ef009a912a2 100644 (file)
@@ -17,7 +17,7 @@ import java.util.Map;
 /**
  * The {@link Apartment} represents a digitalSTROM-Apartment.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add java-doc
  * @author Matthias Siegele - add java-doc
  */
index 39b427ebe736ecb586b781fcda2053b95316b1dd..01501266046a4e8f851188477c69cf89ac8f0a4f 100644 (file)
@@ -18,7 +18,7 @@ import java.util.List;
  * The {@link DetailedGroupInfo} represents a digitalSTROM-Group with a list of all dSUID's of the included
  * digitalSTROM-Devices.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add java-doc
  * @author Matthias Siegele - add java-doc
  */
index b66bb8efc43489e9f2052b9176c9da53b23a9918..9675a55860c52c47a63fb83563f92ba785bb8b62 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.digitalstrom.internal.lib.structure;
 /**
  * The {@link Group} represents a digitalSTROM-Group.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add java-doc
  * @author Matthias Siegele - add java-doc
  */
index 3dd09a455f18e7f42bc762f14d4ee2cbd0812582..bb90c5ae505024736537748c76daa9e4ae77d310 100644 (file)
@@ -19,7 +19,7 @@ import org.openhab.binding.digitalstrom.internal.lib.structure.devices.Device;
 /**
  * The {@link Zone} represents a digitalSTROM-Zone.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add java-doc
  * @author Matthias Siegele - add java-doc
  */
index cc94cceceb30a9d99a5ba274c70bd5dd4d6900af..5e7c222173b78b1c5ca8d7911f126383f13c8a36 100644 (file)
@@ -24,8 +24,8 @@ import com.google.gson.JsonObject;
  * can be implement by subclasses which contains the same device informations like dSID and/or mechanismen like the
  * {@link DeviceStatusListener}.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public abstract class AbstractGeneralDeviceInformations implements GeneralDeviceInformation {
 
index 5408660a74055e9b398930959470250cb811d6ea..eae7516a1e52b9774eca9624c9a471ab254af8c0 100644 (file)
@@ -24,8 +24,8 @@ import org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepar
  * {@link DeviceStatusListener} can be registered. For that and to get the general device informations like the dSID the
  * {@link Circuit} implements the {@link GeneralDeviceInformations} interface.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public interface Circuit extends GeneralDeviceInformation {
 
index fd064b6be77d3a81705c4eb5b575e36816ad5c29..6ecd3c0502fef3a157de3b6b3e0f9eae7f6b5a84 100644 (file)
@@ -16,9 +16,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.openhab.binding.digitalstrom.internal.lib.config.Config;
-import org.openhab.binding.digitalstrom.internal.lib.event.constants.EventNames;
 import org.openhab.binding.digitalstrom.internal.lib.event.types.EventItem;
-import org.openhab.binding.digitalstrom.internal.lib.sensorjobexecutor.sensorjob.impl.DeviceConsumptionSensorJob;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.DeviceSceneSpec;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.DeviceStateUpdate;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.ApplicationGroup;
index 32f5eef27cdb3c4a5bcbd2f49354f354d671ae9a..68e8dbe1e8232b1af4815ddb76bb881587482d82 100644 (file)
@@ -20,8 +20,8 @@ import org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepar
  * identical for all device types. It also contains the methods to implement the mechanism of the
  * {@link DeviceStatusListener}.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public interface GeneralDeviceInformation {
 
index 742d4da528078ee7730f13ac66ef1978839a0bed..a98a26f5b396d139af0a46deb289f4a335c1b7c5 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepa
 /**
  * The {@link DeviceConfig} saves device configurations.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add missing java-doc
  * @author Matthias Siegele - add missing java-doc
  */
index 4591bac5fafd43e0fb0e39e19794358ffce1effa..3566f4944ad4f4a1d74c1e70d8383dfb6399c2f2 100644 (file)
@@ -17,7 +17,7 @@ import org.openhab.binding.digitalstrom.internal.lib.structure.scene.constants.S
 /**
  * The {@link DeviceSceneSpec} saves a digitalSTROM-Device scene mode.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add missing java-doc
  * @author Matthias Siegele - add missing java-doc
  */
index b77eb7d60be4263fd651f1cf585a14f8e06ee179..e1d24cde99842764dda7f642df089a61bc91cb3d 100644 (file)
@@ -15,8 +15,8 @@ package org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepa
 /**
  * This enum contains all binary inputs with they id. <br>
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public enum DeviceBinarayInputEnum {
 
index aa6751551d04fb1589a00eb64b1e0cdb4a01e306..f98f5ebc260a067a5ba5f52a51e89f833819f791 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepa
 /**
  * The {@link DeviceParameterClassEnum} lists all digitalSTROM-device parameter classes.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @version digitalSTROM-API 1.14.5
  */
 public enum DeviceParameterClassEnum {
index a26f97d3cf55753c8a176a8608d1f8dd347229bf..46edadca569f39116f573025204a750b001e2c33 100644 (file)
@@ -18,7 +18,7 @@ import java.util.List;
 /**
  * The {@link MeteringTypeEnum} lists all available digitalSTROM metering types.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - add MeteringUnitEnum list
  * @author Matthias Siegele - add MeteringUnitEnum list
  */
index 636c2878860eafee2ca202145459e9f5bf1365eb..db6abf847f53f74b8b2e18c44225cd1ab6c2d4e1 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepa
 /**
  * The {@link MeteringUnitsEnum} lists all available digitalSTROM metering units.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - remove W, because it does not exist any more
  * @author Matthias Siegele - remove W, because it does not exist any more
  */
index 84984f0f55c7830ab9f6eee4532cd8e2fbcc30c9..afb279f521d28c8044aa2c0766b00728b2991fe4 100644 (file)
@@ -15,15 +15,15 @@ package org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepa
 /**
  * The {@link DSID} represents the digitalSTROM-Device identifier.
  *
- * @author Alexander Betker - initial contributor
+ * @author Alexander Betker - Initial contribution
  * @author Alexander Friese - simplified constructor
  */
 public class DSID {
 
     private final String dsid;
-    private final String DEFAULT_DSID = "3504175fe000000000000001";
-    private final String PRE = "3504175fe0000000";
-    private final String ALL = "ALL";
+    private static final String DEFAULT_DSID = "3504175fe000000000000001";
+    private static final String PRE = "3504175fe0000000";
+    private static final String ALL = "ALL";
 
     /**
      * Creates a new {@link DSID}.
@@ -35,7 +35,7 @@ public class DSID {
         if (trimmedDsid.length() == 24) {
             this.dsid = trimmedDsid;
         } else if (trimmedDsid.length() == 8) {
-            this.dsid = this.PRE + trimmedDsid;
+            this.dsid = PRE + trimmedDsid;
         } else if (trimmedDsid.toUpperCase().equals(ALL)) {
             this.dsid = ALL;
         } else {
index 64503a8918bcfa2576de24e9ca508900436fc4ee..856cf4dc877e8ddf61ca418161b259724eff615c 100644 (file)
@@ -15,12 +15,12 @@ package org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepa
 /**
  * The {@link DSUID} represents the digitalSTROM-Device unique identifier.
  *
- * @author Alexander Friese - initial contributor
+ * @author Alexander Friese - Initial contribution
  */
 public class DSUID {
 
     private final String dsuid;
-    private final String DEFAULT_DSUID = "3504175fe0000000000000000000000001";
+    private static final String DEFAULT_DSUID = "3504175fe0000000000000000000000001";
 
     /**
      * Creates a new {@link DSUID}.
index b6ab3369c089045e015684814e414486e4ddad13..7c61b2b5e68c6c44d4ab354cec0f700a8a14329c 100644 (file)
@@ -20,8 +20,8 @@ import com.google.gson.JsonObject;
  * The {@link DeviceBinaryInput} contains all information of a device binary input, e.g. binary input type id (see
  * {@link DeviceBinarayInputEnum}, state and so on.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  *
  */
 public class DeviceBinaryInput {
index af2464dc130f592596dc328d52e76505dbaaec9c..1cd6f03159bdec23bf4570fb5eb3e37d7021f90a 100644 (file)
@@ -34,8 +34,8 @@ import com.google.gson.JsonObject;
  * and
  * timestamp of the last sensor update.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class DeviceSensorValue {
 
index be8c0df58ed35e14dc6beda21c4b7c1773e3ad3b..da0e1a20b5b34eccecc95fead1cd5f78519b272f 100644 (file)
@@ -20,13 +20,13 @@ import com.google.gson.JsonObject;
 /**
  * The {@link JSONDeviceConfigImpl} is the implementation of the {@link DeviceConfig}.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @author Michael Ochel - change from SimpleJSON to GSON
  * @author Matthias Siegele - change from SimpleJSON to GSON
  */
 public class JSONDeviceConfigImpl implements DeviceConfig {
 
-    private int class_ = -1;
+    private int clazz = -1;
     private int index = -1;
     private int value = -1;
 
@@ -37,7 +37,7 @@ public class JSONDeviceConfigImpl implements DeviceConfig {
      */
     public JSONDeviceConfigImpl(JsonObject object) {
         if (object.get(JSONApiResponseKeysEnum.CLASS.getKey()) != null) {
-            class_ = object.get(JSONApiResponseKeysEnum.CLASS.getKey()).getAsInt();
+            clazz = object.get(JSONApiResponseKeysEnum.CLASS.getKey()).getAsInt();
         }
         if (object.get(JSONApiResponseKeysEnum.INDEX.getKey()) != null) {
             index = object.get(JSONApiResponseKeysEnum.INDEX.getKey()).getAsInt();
@@ -49,7 +49,7 @@ public class JSONDeviceConfigImpl implements DeviceConfig {
 
     @Override
     public int getConfigurationClass() {
-        return class_;
+        return clazz;
     }
 
     @Override
@@ -64,6 +64,6 @@ public class JSONDeviceConfigImpl implements DeviceConfig {
 
     @Override
     public String toString() {
-        return "class: " + this.class_ + ", " + "index: " + this.index + ", " + "value: " + this.value;
+        return "class: " + this.clazz + ", " + "index: " + this.index + ", " + "value: " + this.value;
     }
 }
index f367e8e9c2750816c357eebe51c8f7076a800eda..7d4e17b5c581bf1813aa9b7004317945624e53bf 100644 (file)
@@ -29,8 +29,8 @@ import com.google.gson.JsonObject;
 /**
  * The {@link CircuitImpl} is the implementation of the {@link Circuit} and represent a digitalSTROM circuit.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public class CircuitImpl extends AbstractGeneralDeviceInformations implements Circuit {
 
index e81ecacbb4fed95993db73208618cfaab84b7e1b..856d1b5f51a2a398152a525af2631ae196fbc431 100644 (file)
@@ -263,7 +263,6 @@ public class SceneDiscovery {
                                             groupIdInter = null;
                                         }
                                         if (groupID != null) {
-
                                             if (ApplicationGroup.Color.YELLOW
                                                     .equals(ApplicationGroup.getGroup(groupID).getColor())) {
                                                 discoverScene(SceneEnum.AUTO_OFF.getSceneNumber(), groupID);
index f7bac42c18c277443584bf07b0e17cc3359d6b7b..db3475fac4e4f97ac3f82232e8e295c10b2678af 100644 (file)
@@ -18,7 +18,7 @@ import java.util.Map;
 /**
  * The {@link SceneEnum} lists all available scenes of digitalSTROM.
  *
- * @author Alexander Betker - initial contributer
+ * @author Alexander Betker - Initial contribution
  * @version digitalSTROM-API 1.14.5
  *
  * @author Michael Ochel - add new scenes and missing java-doc
index cfc04ad9521ba9b46c2d2b93768264c5d78225d3..0cd5bef636eb1e8a020908ddeb60b6c2cd183cc3 100644 (file)
@@ -19,7 +19,6 @@ import java.util.Map.Entry;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.openhab.binding.digitalstrom.internal.lib.serverconnection.constants.JSONApiResponseKeysEnum;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.OutputChannelEnum;
-import org.openhab.binding.digitalstrom.internal.lib.structure.devices.impl.DeviceImpl;
 
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
index 9f9bc33fcaac2ea7c9d59736a424c14b0bc405b2..590ca6d606f91ac46d4e9fe608231a1984c9c8ba 100644 (file)
@@ -26,8 +26,8 @@ import org.osgi.service.component.ComponentContext;
  * digitalSTROM-Bindings. So this class can be implement e.g. by provider implementations like the
  * {@link org.openhab.core.thing.type.ChannelTypeProvider}.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 public abstract class BaseDsI18n {
 
index 1d48f537c83f57b2dcdf1793d4592c4bd0e72662..a38f7e6ec190b272763ae39f9106505daa6936af 100644 (file)
@@ -33,7 +33,6 @@ import org.openhab.binding.digitalstrom.internal.lib.structure.devices.devicepar
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.OutputModeEnum;
 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.SensorEnum;
 import org.openhab.core.i18n.TranslationProvider;
-import org.openhab.core.thing.type.ChannelGroupTypeUID;
 import org.openhab.core.thing.type.ChannelType;
 import org.openhab.core.thing.type.ChannelTypeBuilder;
 import org.openhab.core.thing.type.ChannelTypeProvider;
@@ -336,7 +335,7 @@ public class DsChannelTypeProvider extends BaseDsI18n implements ChannelTypeProv
         // sensor-events and cached values are
         // shown in °C so we will use this unit for temperature sensors
         String unitShortCut = sensorType.getUnitShortcut();
-        if (unitShortCut.equals("%")) {
+        if ("%".equals(unitShortCut)) {
             unitShortCut = "%%";
         }
         if (sensorType.toString().contains("TEMPERATURE")) {
index 8547a537679d294483bea47076bdaaff37822c4e..aef01b50e2218bb0708e1f53c8ad7b3f3a758a4d 100644 (file)
@@ -48,8 +48,8 @@ import org.slf4j.LoggerFactory;
  * {@link SupportedThingTypes} enum has to be adjusted, if new device types of digitalSTROM should be supported.
  * Provided the new digitalSTROM devices uses the same mechanism like now.
  *
- * @author Michael Ochel - initial contributer
- * @author Matthias Siegele - initial contributer
+ * @author Michael Ochel - Initial contribution
+ * @author Matthias Siegele - Initial contribution
  */
 @Component(service = ThingTypeProvider.class)
 public class DsDeviceThingTypeProvider extends BaseDsI18n implements ThingTypeProvider {
@@ -59,8 +59,8 @@ public class DsDeviceThingTypeProvider extends BaseDsI18n implements ThingTypePr
      * used as thing type id, the first field will set the responsible handler and the last enum field will set the
      * supporting of the power sensor refresh configurations (config-description with refresh priority setting or not).
      *
-     * @author Michael Ochel - initial contributer
-     * @author Matthias Siegele - initial contributer
+     * @author Michael Ochel - Initial contribution
+     * @author Matthias Siegele - Initial contribution
      */
     public static enum SupportedThingTypes {
         // ThingType, responsible ThingHanlder, Device config-description with power-sensors
@@ -82,8 +82,8 @@ public class DsDeviceThingTypeProvider extends BaseDsI18n implements ThingTypePr
 
     private final Logger logger = LoggerFactory.getLogger(DsDeviceThingTypeProvider.class);
 
-    private final String DEVICE_WITH_POWER_SENSORS = "thing-type:digitalstrom:deviceWithPowerSensors";
-    private final String DEVICE_WITHOUT_POWER_SENSORS = "thing-type:digitalstrom:deviceWithoutPowerSensors";
+    private static final String DEVICE_WITH_POWER_SENSORS = "thing-type:digitalstrom:deviceWithPowerSensors";
+    private static final String DEVICE_WITHOUT_POWER_SENSORS = "thing-type:digitalstrom:deviceWithoutPowerSensors";
 
     @Activate
     @Override