Rework ThingActions (#8755)
* Remove duplication by making use of default Java generated exceptions * Make ThingActions labels/descriptions more consistent Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -71,11 +71,7 @@ public class SatelEventLogActions implements ThingActions {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String, Object> readEvent(@Nullable ThingActions actions, @Nullable Number index) {
|
||||
if (actions instanceof SatelEventLogActions) {
|
||||
return ((SatelEventLogActions) actions).readEvent(index);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Actions is not an instance of SatelEventLogActions");
|
||||
}
|
||||
public static Map<String, Object> readEvent(ThingActions actions, @Nullable Number index) {
|
||||
return ((SatelEventLogActions) actions).readEvent(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ config-status.hostEmpty = Host name or IP of ETHM-1 must be provided.
|
||||
config-status.portEmpty = Serial port of INT-RS must be provided.
|
||||
|
||||
# actions
|
||||
actionReadEventLabel = Read event
|
||||
actionReadEventLabel = read an event
|
||||
actionReadEventDesc = Reads a single record from the event log.
|
||||
actionInputIndexLabel = Event index
|
||||
actionInputIndexDesc = Index of the event to read
|
||||
|
||||
Reference in New Issue
Block a user