Skip to content

Commit

Permalink
Link to Java 21 documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur committed Dec 21, 2024
1 parent e91820c commit 459ce8d
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.exec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Please note that if the transformation failed or returned `null`, the original d
Thing exec:command:uniquename [command="/command/to/execute here", interval=15, timeout=5, autorun=false]
```

The `command` itself can be enhanced using the well known syntax of the [Java formatter class syntax](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Formatter.html#syntax).
The `command` itself can be enhanced using the well known syntax of the [Java formatter class syntax](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html#syntax).
The following parameters are automatically added:

- the current date (as java.util.Date, example: `%1$tY-%1$tm-%1$td`)
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ All values that are not `upValue`, `downValue`, `stopValue`, `moveValue` are int

## URL Formatting

After concatenation of the `baseURL` and the `commandExtension` or the `stateExtension` (if provided) the URL is formatted using the [java.util.Formatter](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Formatter.html).
After concatenation of the `baseURL` and the `commandExtension` or the `stateExtension` (if provided) the URL is formatted using the [java.util.Formatter](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html).
The URL is used as format string and two parameters are added:

- the current date (referenced as `%1$`)
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.logreader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The `reader` Thing has the following configuration parameters:
| `customPatterns` | String | no | | Search patterns separated by \| character for custom events. |
| `customBlacklistingPatterns` | String | no | | Search patterns for blacklisting unwanted custom events separated by \| character. |

Search patterns follows [Java regular expression syntax](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html).
Search patterns follows [Java regular expression syntax](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/regex/Pattern.html).
Be aware that search patterns are case sensitive.

## Channels
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.mqtt.generic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ Please prefer formatting as described in the next section whenever possible.

This feature is quite powerful in transforming an item state before it is published to the MQTT broker.
It has the syntax: `%[flags][width]conversion`.
Find the full documentation on the [Java](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Formatter.html) web page.
Find the full documentation on the [Java](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html) web page.

The default is "%s" which means: Output the item state as string.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected byte[] getEncoded(PinType type, X509Certificate cert) throws Certifica

/**
* A signature name depends on the security provider but usually follows
* https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html#signature-algorithms.
* https://docs.oracle.com/en/java/javase/21/docs/specs/security/standard-names.html#signature-algorithms.
* E.g.: "SHA256withRSA". We need "SHA" and "256" to initialize a {@link PinMessageDigest}.
*/
PinMessageDigest getMessageDigestForSigAlg(String sigAlg) throws CertificateException {
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.mqtt/xtend_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mqtt:broker:myAuthentificatedBroker [ host="192.168.0.43", secure=false, usernam
In a fourth connection, the public key pinning is enabled again.
This time, a public key hash is provided to pin the connection to a specific server.
It follows the form "hashname:hashvalue". Valid _hashnames_ are SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 and all others listed
in [Java MessageDigest Algorithms](https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html#messagedigest-algorithms).
in [Java MessageDigest Algorithms](https://docs.oracle.com/en/java/javase/21/docs/specs/security/standard-names.html#messagedigest-algorithms).

`mqttConnections.things`:

Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.ntp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The ntp binding has two channels:
- `dateTime` which provides the data in a dateTime type
- `string` which provides the data in a string type. The string channel can be configured with the formatting of the date & time. This also allows proper representation of timezones other than the java machine default one.

See the [Java documentation](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Formatter.html) for the detailed information on the formatting
See the [Java documentation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html) for the detailed information on the formatting

## Full Example

Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.telegram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ These actions will send a message to all chat ids configured for this bot.
| Action | Description |
|----------------------------|--------------|
| sendTelegram(String message) | Sends a message. |
| sendTelegram(String format, Object... args) | Sends a formatted message (See <https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Formatter.html> for more information).
| sendTelegram(String format, Object... args) | Sends a formatted message (See <https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html> for more information).
| sendTelegramQuery(String message, String replyId, String... buttons) | Sends a question to the user that can be answered via the defined buttons. The replyId can be freely choosen and is sent back with the answer. Then, the id is required to identify what question has been answered (e.g. in case of multiple open questions). The final result looks like this: ![Telegram Inline Keyboard](doc/queryExample.png) |
| sendTelegramAnswer(String replyId, String message) | Sends a message after the user has answered a question. You should _always_ call this method after you received an answer. It will remove buttons from the specific question and will also stop the progress bar displayed at the client side. If no message is necessary, just pass `null` here. |
| deleteTelegramQuery(String replyId) | Deletes a question in the chat. The replyId must be the same as used for the corresponding sendTelegramQuery() action. |
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.io.metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The InfluxDB exporter service will start as soon as the _influxMetricsEnabled_ c

The Java Management Extensions (JMX) exporter service will start as soon as the _jmxMetricsEnabled_ configuration parameter is set to true.

You can monitor the JMX metrics using a tool like [JConsole](https://docs.oracle.com/en/java/javase/17/management/using-jconsole.html) or [VisualVM](https://visualvm.github.io/) (after installing the VisualVM-MBeans plugin).
You can monitor the JMX metrics using a tool like [JConsole](https://docs.oracle.com/en/java/javase/21/management/using-jconsole.html) or [VisualVM](https://visualvm.github.io/) (after installing the VisualVM-MBeans plugin).
When the JMX exporter is enabled, the metrics will be available under the "metrics" MBean.
JConsole and VisualVM will only be able to connect using JMX when openHAB is started in debug mode (use `start_debug.sh` or `start_debug.bat`).

Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.transform.basicprofiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Switch invertedSwitch { channel="xxx" [profile="basic-profiles:invert"] }
## Round Profile

The Round Profile scales the State to a specific number of decimal places based on the power of ten.
Optionally the [Rounding mode](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/RoundingMode.html) can be set.
Optionally the [Rounding mode](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/math/RoundingMode.html) can be set.
Source Channels should accept Item Type `Number`.

### Round Profile Configuration
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.transform.map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Transforms the input by mapping it to another string.
The mapping is performed based on "key=value" pairs.
When the input matches a `key` in the mapping table, the corresponding `value` is given as the output of the transformation.

The format of the mapping table is documented [here](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html#load(java.io.Reader)).
The format of the mapping table is documented [here](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Properties.html#load(java.io.Reader)).

A default value can be provided if no matching entry is found by using "=value" syntax.
Defining this default value using `_source_` would then return the non transformed input string.
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.transform.regex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A full regex is in the form `s/<regex>/<substitution>/g` whereat the delimiter `
The regular expression in the format `s/<regex>/result/g`, replaces all occurrences of `<regex>` in the source string with `result`.
The regular expression in the format `s/<regex>/result/` (without `g`), replaces the first occurrence of `<regex>` in the source string with `result`.

If the regular expression contains a [capture group](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html#cg) defined by `()`, it returns the captured string.
If the regular expression contains a [capture group](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/regex/Pattern.html#cg) defined by `()`, it returns the captured string.
Multiple capture groups can be used to retrieve multiple strings and can be combined as a result string defined in the `substitution`.

The transformation can be set to be restricted to only match if the input string begins with a character by prepending `^` to the beginning of a pattern or to only match if the input string ends with a specified character by appending `$` at the end.
Expand Down

0 comments on commit 459ce8d

Please sign in to comment.