try {
new SetTimeCommand(tob(zonedDateTime.getHour()), tob(zonedDateTime.getMinute()),
tob(zonedDateTime.getSecond()), tob(zonedDateTime.getDayOfWeek().getValue()))
- .execute(floureonDevice);
+ .execute(floureonDevice);
} catch (Exception e) {
logger.warn("Error while setting time of {} to {}: {}", thing.getUID(), command, e.getMessage());
}
String mode = thermostatMode != null ? thermostatMode.name() : ThermostatMode.UNKNOWN.name();
switch (channelUID.getId()) {
case CHANNEL_THERMOSTAT_LOCKED -> updateSwitchChannel(channelUID, newConfig.locked);
- case CHANNEL_HEATSETPOINT -> updateQuantityTypeChannel(channelUID, newConfig.heatsetpoint, CELSIUS,
- 1.0 / 100);
- case CHANNEL_TEMPERATURE_OFFSET -> updateQuantityTypeChannel(channelUID, newConfig.offset, CELSIUS,
- 1.0 / 100);
+ case CHANNEL_HEATSETPOINT ->
+ updateQuantityTypeChannel(channelUID, newConfig.heatsetpoint, CELSIUS, 1.0 / 100);
+ case CHANNEL_TEMPERATURE_OFFSET ->
+ updateQuantityTypeChannel(channelUID, newConfig.offset, CELSIUS, 1.0 / 100);
case CHANNEL_THERMOSTAT_MODE -> updateState(channelUID, new StringType(mode));
case CHANNEL_EXTERNAL_WINDOW_OPEN -> {
Boolean open = newConfig.externalwindowopen;
case CHANNEL_VIBRATION -> updateSwitchChannel(channelUID, newState.vibration);
case CHANNEL_CARBONMONOXIDE -> updateSwitchChannel(channelUID, newState.carbonmonoxide);
case CHANNEL_AIRQUALITY -> updateStringChannel(channelUID, newState.airquality);
- case CHANNEL_AIRQUALITYPPB -> updateQuantityTypeChannel(channelUID, newState.airqualityppb,
- PARTS_PER_BILLION);
+ case CHANNEL_AIRQUALITYPPB ->
+ updateQuantityTypeChannel(channelUID, newState.airqualityppb, PARTS_PER_BILLION);
case CHANNEL_MOISTURE -> updateQuantityTypeChannel(channelUID, newState.moisture, PERCENT);
case CHANNEL_BUTTON -> updateDecimalTypeChannel(channelUID, newState.buttonevent);
case CHANNEL_BUTTONEVENT -> {
if (discoveryServices.get(DsDeviceThingTypeProvider.SupportedThingTypes.circuit.toString()) != null) {
((DeviceDiscoveryService) discoveryServices
.get(DsDeviceThingTypeProvider.SupportedThingTypes.circuit.toString()))
- .onDeviceAdded(device);
+ .onDeviceAdded(device);
}
}
} catch (RuntimeException ex) {
if (discoveryServices.get(DigitalSTROMBindingConstants.THING_TYPE_ZONE_TEMERATURE_CONTROL.toString()) != null) {
((ZoneTemperatureControlDiscoveryService) discoveryServices
.get(DigitalSTROMBindingConstants.THING_TYPE_ZONE_TEMERATURE_CONTROL.toString()))
- .configChanged(tempControlStatus);
+ .configChanged(tempControlStatus);
}
}
thingTypeBuilder.withChannelDefinitions(Arrays.asList(new ChannelDefinitionBuilder(
DsChannelTypeProvider.SHADE,
new ChannelTypeUID(DigitalSTROMBindingConstants.BINDING_ID, DsChannelTypeProvider.SHADE))
- .build()));
+ .build()));
}
if (SupportedThingTypes.circuit.equals(supportedThingType)) {
List<ChannelDefinition> channelDefinitions = new ArrayList<>(3);
channelDefinitions.add(new ChannelDefinitionBuilder(
DsChannelTypeProvider.getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false),
new ChannelTypeUID(DigitalSTROMBindingConstants.BINDING_ID, DsChannelTypeProvider
- .getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false))).build());
+ .getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false)))
+ .build());
}
thingTypeBuilder.withChannelDefinitions(channelDefinitions);
}
logger.debug("Sync scenes");
ElroConnectsMessage elroMessage = new ElroConnectsMessage(msgIdIncrement(), connectorId, ctrlKey,
ELRO_SYNC_SCENES, legacyFirmware).withSceneGroup(0).withSceneContent(SYNC_COMMAND)
- .withAnswerContent(SYNC_COMMAND);
+ .withAnswerContent(SYNC_COMMAND);
sendElroMessage(elroMessage, true);
}
if (cursorArgumentIndex <= 0) {
return new StringsCompleter(thingRegistry.getAll().stream()
.filter(t -> FreeboxBindingConstants.FREEBOX_BRIDGE_TYPE_SERVER.equals(t.getThingTypeUID()))
- .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
- cursorArgumentIndex, cursorPosition, candidates);
+ .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
+ .complete(args, cursorArgumentIndex, cursorPosition, candidates);
} else if (cursorArgumentIndex == 1) {
Thing thing = getThing(args[0]);
if (thing != null && FreeboxBindingConstants.FREEBOX_BRIDGE_TYPE_SERVER.equals(thing.getThingTypeUID())) {
return new StringsCompleter(thingRegistry.getAll().stream()
.filter(t -> HueBindingConstants.THING_TYPE_BRIDGE.equals(t.getThingTypeUID())
|| HueBindingConstants.THING_TYPE_GROUP.equals(t.getThingTypeUID()))
- .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
- cursorArgumentIndex, cursorPosition, candidates);
+ .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
+ .complete(args, cursorArgumentIndex, cursorPosition, candidates);
} else if (cursorArgumentIndex == 1) {
Thing thing = getThing(args[0]);
if (thing != null && HueBindingConstants.THING_TYPE_BRIDGE.equals(thing.getThingTypeUID())) {
}
frequency = ((BigDecimal) Objects.requireNonNullElse(
channel.getConfiguration().get(KNXBindingConstants.REPEAT_FREQUENCY), BigDecimal.ZERO))
- .intValue();
+ .intValue();
} else {
// disable dimming by binding
frequency = 0;
*
* <pre>
* {@code
- * shapeAdapter.registerSubtype(Rectangle.class, "Rectangle");
- * shapeAdapter.registerSubtype(Circle.class, "Circle");
- * shapeAdapter.registerSubtype(Diamond.class, "Diamond");
+ * shapeAdapter.registerSubtype(Rectangle.class, "Rectangle");
+ * shapeAdapter.registerSubtype(Circle.class, "Circle");
+ * shapeAdapter.registerSubtype(Diamond.class, "Diamond");
* }
* </pre>
*
if (cursorArgumentIndex <= 0) {
return new StringsCompleter(thingRegistry.getAll().stream()
.filter(t -> LGWebOSBindingConstants.THING_TYPE_WEBOSTV.equals(t.getThingTypeUID()))
- .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
- cursorArgumentIndex, cursorPosition, candidates);
+ .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
+ .complete(args, cursorArgumentIndex, cursorPosition, candidates);
} else if (cursorArgumentIndex == 1) {
Thing thing = getThing(args[0]);
if (thing != null && LGWebOSBindingConstants.THING_TYPE_WEBOSTV.equals(thing.getThingTypeUID())) {
if (cursorArgumentIndex <= 0) {
return new StringsCompleter(thingRegistry.getAll().stream()
.filter(t -> LinkyBindingConstants.THING_TYPE_LINKY.equals(t.getThingTypeUID()))
- .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
- cursorArgumentIndex, cursorPosition, candidates);
+ .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
+ .complete(args, cursorArgumentIndex, cursorPosition, candidates);
} else if (cursorArgumentIndex == 1) {
Thing thing = getThing(args[0]);
if (thing != null && LinkyBindingConstants.THING_TYPE_LINKY.equals(thing.getThingTypeUID())) {
channelConfiguration.stateTriggered };
buildChannel(STATE_CHANNEL_ID, new TextValue(stateEnum), channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
- .build();
+ .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
+ .build();
String commandTopic = channelConfiguration.commandTopic;
if (commandTopic != null) {
buildChannel(SWITCH_DISARM_CHANNEL_ID, new TextValue(new String[] { channelConfiguration.payloadDisarm }),
channelConfiguration.getName(), componentConfiguration.getUpdateListener())
- .commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos())
- .build();
+ .commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos()).build();
buildChannel(SWITCH_ARM_HOME_CHANNEL_ID,
new TextValue(new String[] { channelConfiguration.payloadArmHome }), channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos())
- .build();
+ .commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos()).build();
buildChannel(SWITCH_ARM_AWAY_CHANNEL_ID,
new TextValue(new String[] { channelConfiguration.payloadArmAway }), channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos())
- .build();
+ .commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos()).build();
}
}
}
Gson gson, TransformationServiceProvider transformationServiceProvider) throws ConfigurationException {
ComponentConfiguration componentConfiguration = new ComponentConfiguration(thingUID, haID,
channelConfigurationJSON, gson, updateListener, tracker, scheduler)
- .transformationProvider(transformationServiceProvider);
+ .transformationProvider(transformationServiceProvider);
switch (haID.component) {
case "alarm_control_panel":
return new AlarmControlPanel(componentConfiguration);
buildChannel(SWITCH_CHANNEL_ID, value, channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
- .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos())
- .build();
+ .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
+ .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos())
+ .build();
}
}
if (channelConfiguration.brightnessStateTopic != null || channelConfiguration.brightnessCommandTopic != null) {
localBrightnessChannel = brightnessChannel = buildChannel(BRIGHTNESS_CHANNEL_ID, brightnessValue,
"Brightness", this)
- .stateTopic(channelConfiguration.brightnessStateTopic,
- channelConfiguration.brightnessValueTemplate)
- .commandTopic(channelConfiguration.brightnessCommandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos())
- .withFormat("%.0f").commandFilter(this::handleBrightnessCommand).build(false);
+ .stateTopic(channelConfiguration.brightnessStateTopic, channelConfiguration.brightnessValueTemplate)
+ .commandTopic(channelConfiguration.brightnessCommandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos())
+ .withFormat("%.0f").commandFilter(this::handleBrightnessCommand).build(false);
}
if (channelConfiguration.whiteCommandTopic != null) {
hasColorChannel = true;
hiddenChannels.add(rgbChannel = buildChannel(RGB_CHANNEL_ID, new ColorValue(ColorMode.RGB, null, null, 100),
"RGB state", this)
- .stateTopic(channelConfiguration.rgbStateTopic, channelConfiguration.rgbValueTemplate)
- .commandTopic(channelConfiguration.rgbCommandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos())
- .build(false));
+ .stateTopic(channelConfiguration.rgbStateTopic, channelConfiguration.rgbValueTemplate)
+ .commandTopic(channelConfiguration.rgbCommandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos())
+ .build(false));
}
if (channelConfiguration.rgbwStateTopic != null || channelConfiguration.rgbwCommandTopic != null) {
hiddenChannels.add(
xyChannel = buildChannel(XY_CHANNEL_ID, new ColorValue(ColorMode.XYY, null, null, 100), "XY State",
this).stateTopic(channelConfiguration.xyStateTopic, channelConfiguration.xyValueTemplate)
- .commandTopic(channelConfiguration.xyCommandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos())
- .build(false));
+ .commandTopic(channelConfiguration.xyCommandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos())
+ .build(false));
}
if (channelConfiguration.hsStateTopic != null || channelConfiguration.hsCommandTopic != null) {
buildChannel(channelConfiguration.type, value, channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .stateTopic(channelConfiguration.topic, channelConfiguration.getValueTemplate()).trigger(true)
- .build();
+ .stateTopic(channelConfiguration.topic, channelConfiguration.getValueTemplate()).trigger(true).build();
}
}
OnOffValue value = new OnOffValue(channelConfiguration.payloadOn, channelConfiguration.payloadOff);
buildChannel(SWITCH_CHANNEL_ID, value, channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
- .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos(), channelConfiguration.commandTemplate)
- .build();
+ .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
+ .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos(), channelConfiguration.commandTemplate)
+ .build();
}
}
buildChannel(SWITCH_CHANNEL_ID,
new OnOffValue(channelConfiguration.payloadLock, channelConfiguration.payloadUnlock),
channelConfiguration.getName(), componentConfiguration.getUpdateListener())
- .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
- .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos())
- .build();
+ .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
+ .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos())
+ .build();
}
}
buildChannel(NUMBER_CHANNEL_ID, value, channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
- .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos(), channelConfiguration.commandTemplate)
- .build();
+ .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
+ .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos(), channelConfiguration.commandTemplate)
+ .build();
}
}
buildChannel(SELECT_CHANNEL_ID, value, channelConfiguration.getName(),
componentConfiguration.getUpdateListener())
- .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
- .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
- channelConfiguration.getQos(), channelConfiguration.commandTemplate)
- .build();
+ .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
+ .commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
+ channelConfiguration.getQos(), channelConfiguration.commandTemplate)
+ .build();
}
}
buildChannel(SENSOR_CHANNEL_ID, value, channelConfiguration.getName(),
getListener(componentConfiguration, value))
- .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
- .trigger(trigger).build();
+ .stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
+ .trigger(trigger).build();
}
private ChannelStateUpdateListener getListener(ComponentFactory.ComponentConfiguration componentConfiguration,
properties.put(PROPERTY_DS2438,
ds2438configuration.getAssociatedSensorIds(OwSensorType.MS_TV).get(0).getFullPath());
}
- default -> throw new OwException(
- "sensorType " + sensorType.toString() + " not supported by this thing handler");
+ default ->
+ throw new OwException("sensorType " + sensorType.toString() + " not supported by this thing handler");
}
updateProperties(properties);
private final ObjectMapper outputMapper = new ObjectMapper(
new MappingJsonFactory().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, false))
- .setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL);
+ .setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL);
private @Nullable Socket socket;
private @Nullable PrintStream printStream;
return new StringsCompleter(thingRegistry.getAll().stream()
.filter(t -> PowermaxBindingConstants.BRIDGE_TYPE_SERIAL.equals(t.getThingTypeUID())
|| PowermaxBindingConstants.BRIDGE_TYPE_IP.equals(t.getThingTypeUID()))
- .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
- cursorArgumentIndex, cursorPosition, candidates);
+ .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
+ .complete(args, cursorArgumentIndex, cursorPosition, candidates);
} else if (cursorArgumentIndex == 1) {
Thing thing = getThing(args[0]);
if (thing != null && (PowermaxBindingConstants.BRIDGE_TYPE_SERIAL.equals(thing.getThingTypeUID())
try {
verify(changeListener, after(
period.toMillis() + 2 * period.toMillis() * ConnectorBase.NUMBER_OF_RETRIES + period.toMillis() / 2)
- .times(1)).errorOccurred(any());
+ .times(1)).errorOccurred(any());
verify(connector, times(ConnectorBase.NUMBER_OF_RETRIES)).retryHook(ArgumentMatchers.anyInt());
} finally {
disposable.dispose();
if (cursorArgumentIndex <= 0) {
return new StringsCompleter(thingRegistry.getAll().stream()
.filter(t -> SomfyTahomaBindingConstants.THING_TYPE_BRIDGE.equals(t.getThingTypeUID()))
- .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
- cursorArgumentIndex, cursorPosition, candidates);
+ .map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
+ .complete(args, cursorArgumentIndex, cursorPosition, candidates);
} else if (cursorArgumentIndex == 1) {
Thing thing = getThing(args[0]);
if (thing != null && SomfyTahomaBindingConstants.THING_TYPE_BRIDGE.equals(thing.getThingTypeUID())) {
// create notification product that clones the new command positions
product = new VeluxProduct(VeluxProductName.UNKNOWN, new ProductBridgeIndex(reqIndexArray01),
ProductState.EXECUTING.value, setMainParameter, setMainParameter, reqFunctionalParameters, COMMAND)
- .overrideDataSource(DataSource.BINDING);
+ .overrideDataSource(DataSource.BINDING);
return true;
}
: getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE,
BigDecimal.valueOf(HomekitCharacteristicFactory
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
- .doubleValue());
+ .doubleValue());
}
@Override
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE,
BigDecimal.valueOf(HomekitCharacteristicFactory
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
- .doubleValue());
+ .doubleValue());
}
@Override
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MAX_VALUE,
BigDecimal.valueOf(HomekitCharacteristicFactory
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MAX_VALUE)))
- .doubleValue());
+ .doubleValue());
}
@Override
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE,
BigDecimal.valueOf(HomekitCharacteristicFactory
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
- .doubleValue());
+ .doubleValue());
}
@Override
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MAX_VALUE,
BigDecimal.valueOf(HomekitCharacteristicFactory
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MAX_VALUE)))
- .doubleValue());
+ .doubleValue());
}
@Override
HomekitTaggedItem.MIN_VALUE,
BigDecimal.valueOf(HomekitCharacteristicFactory
.convertFromCelsius(TargetTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
- .doubleValue());
+ .doubleValue());
}
@Override
HomekitTaggedItem.MAX_VALUE,
BigDecimal.valueOf(HomekitCharacteristicFactory
.convertFromCelsius(TargetTemperatureCharacteristic.DEFAULT_MAX_VALUE)))
- .doubleValue());
+ .doubleValue());
}
@Override
public static StaticTableSchema<DynamoDBBigDecimalItem> TABLE_SCHEMA_LEGACY = getBaseSchemaBuilder(
DynamoDBBigDecimalItem.class, true).newItemSupplier(DynamoDBBigDecimalItem::new)
- .addAttribute(NULLABLE_BIGDECIMAL, a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
- .getter(DynamoDBBigDecimalItem::getState).setter(DynamoDBBigDecimalItem::setState))
- .build();
+ .addAttribute(NULLABLE_BIGDECIMAL, a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
+ .getter(DynamoDBBigDecimalItem::getState).setter(DynamoDBBigDecimalItem::setState))
+ .build();
public static StaticTableSchema<DynamoDBBigDecimalItem> TABLE_SCHEMA_NEW = getBaseSchemaBuilder(
DynamoDBBigDecimalItem.class, false)
- .newItemSupplier(DynamoDBBigDecimalItem::new)
- .addAttribute(NULLABLE_BIGDECIMAL,
- a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_NUMBER).getter(DynamoDBBigDecimalItem::getState)
- .setter(DynamoDBBigDecimalItem::setState))
- .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY)
- .getter(AbstractDynamoDBItem::getExpiryDate).setter(AbstractDynamoDBItem::setExpiry))
- .build();
+ .newItemSupplier(DynamoDBBigDecimalItem::new)
+ .addAttribute(NULLABLE_BIGDECIMAL,
+ a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_NUMBER).getter(DynamoDBBigDecimalItem::getState)
+ .setter(DynamoDBBigDecimalItem::setState))
+ .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY).getter(AbstractDynamoDBItem::getExpiryDate)
+ .setter(AbstractDynamoDBItem::setExpiry))
+ .build();
/**
* We get the following error if the BigDecimal has too many digits
private static Class<@Nullable String> NULLABLE_STRING = (Class<@Nullable String>) String.class;
public static final StaticTableSchema<DynamoDBStringItem> TABLE_SCHEMA_LEGACY = getBaseSchemaBuilder(
- DynamoDBStringItem.class, true)
- .newItemSupplier(
- DynamoDBStringItem::new)
- .addAttribute(NULLABLE_STRING, a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
- .getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState))
- .build();
+ DynamoDBStringItem.class, true).newItemSupplier(DynamoDBStringItem::new)
+ .addAttribute(NULLABLE_STRING, a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
+ .getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState))
+ .build();
public static final StaticTableSchema<DynamoDBStringItem> TABLE_SCHEMA_NEW = getBaseSchemaBuilder(
DynamoDBStringItem.class, false)
- .newItemSupplier(DynamoDBStringItem::new)
- .addAttribute(NULLABLE_STRING,
- a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_STRING)
- .getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState))
- .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY)
- .getter(AbstractDynamoDBItem::getExpiryDate).setter(AbstractDynamoDBItem::setExpiry))
- .build();
+ .newItemSupplier(DynamoDBStringItem::new)
+ .addAttribute(NULLABLE_STRING,
+ a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_STRING).getter(DynamoDBStringItem::getState)
+ .setter(DynamoDBStringItem::setState))
+ .addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY).getter(AbstractDynamoDBItem::getExpiryDate)
+ .setter(AbstractDynamoDBItem::setExpiry))
+ .build();
public DynamoDBStringItem() {
this("", null, ZonedDateTime.now(), null);
* <pre>
* {@code
* JsonObject json = new Bin2Json("byte a; byte b; ubyte c;").convert("03FAFF");
- * json.toString() = {"a":3,"b":-6,"c":255}
+ * json.toString() = {"a":3,"b":-6,"c":255}}
* </pre>
*
* @author Pauli Anttila - Initial contribution
OAuthFactory oAuthFactory = mock(OAuthFactory.class);
when(oAuthFactory
.getOAuthClientService(MieleCloudBindingIntegrationTestConstants.BRIDGE_THING_UID.getAsString()))
- .thenReturn(oAuthClientService);
+ .thenReturn(oAuthClientService);
OpenHabOAuthTokenRefresher tokenRefresher = getService(OAuthTokenRefresher.class,
OpenHabOAuthTokenRefresher.class);
<netty.version>4.1.72.Final</netty.version>
<okhttp.version>3.14.9</okhttp.version>
<sat.version>0.13.0</sat.version>
- <spotless.version>2.28.0</spotless.version>
- <spotless.eclipse.version>4.21.0</spotless.eclipse.version>
+ <spotless.version>2.35.0</spotless.version>
+ <spotless.eclipse.version>4.26</spotless.eclipse.version>
+ <spotless.eclipse.wtp.version>4.21.0</spotless.eclipse.wtp.version>
<bnd.importpackage/>
<bnd.exportpackage/>
<files>
<file>openhab_wst_xml_files.prefs</file>
</files>
- <version>${spotless.eclipse.version}</version>
+ <version>${spotless.eclipse.wtp.version}</version>
</eclipseWtp>
<trimTrailingWhitespace/>
<endWithNewline/>
<files>
<file>openhab_wst_feature_file.prefs</file>
</files>
- <version>${spotless.eclipse.version}</version>
+ <version>${spotless.eclipse.wtp.version}</version>
</eclipseWtp>
<trimTrailingWhitespace/>
<endWithNewline/>
<files>
<file>openhab_wst_pom_file.prefs</file>
</files>
- <version>${spotless.eclipse.version}</version>
+ <version>${spotless.eclipse.wtp.version}</version>
</eclipseWtp>
<trimTrailingWhitespace/>
<endWithNewline/>