diff --git a/.ci_cd/README.md b/.ci_cd/README.md index d94ec0a79f..9396d630ed 100644 --- a/.ci_cd/README.md +++ b/.ci_cd/README.md @@ -11,7 +11,7 @@ docker image tag updates. The file layout is: ```json { - // Configure behaviour on push + // Configure behavior on push "push": { // Name of branch to react to (exact match) "develop": { @@ -32,7 +32,7 @@ docker image tag updates. The file layout is: } } }, - // Configure behaviour on release + // Configure behavior on release "release": { // Comma separated list of tags to push to openremote/manager docker hub image $version is replaced with release version // This can only be used on the OpenRemote Core repo (openremote/core) @@ -81,24 +81,24 @@ The naming convention should be as follows: # `host_init` Directory -Contains scripts/files required to initialise the host ready for running the stack (e.g. download map tiles etc.); if +Contains scripts/files required to initialize the host ready for running the stack (e.g. download map tiles etc.); if the repo is a custom project then any files in the same path of the custom repo will be overlaid on top of the -standard openremote repo files (thus allowing custom project override of any behaviour). The workflow looks for one of +standard openremote repo files (thus allowing custom project override of any behavior). The workflow looks for one of the following bash scripts (in priority order): -- `host_init/init_${ENVIRONMENT}.sh` - Bash script for environment specific host initialisation +- `host_init/init_${ENVIRONMENT}.sh` - Bash script for environment specific host initialization - `host_init/init.sh` - Bash script that can be used by any environment as a fallback if no environment specific script exists -If an initialisation script is found then the entire `host_init` directory will be copied to the host and the script -will be executed; by copying the entire directory additional files can be included and called from the initialisation +If an initialization script is found then the entire `host_init` directory will be copied to the host and the script +will be executed; by copying the entire directory additional files can be included and called from the initialization script as required. # `aws` Directory Contains AWS scripts and resources for CI/CD within AWS. If the repo is a custom project then any files in the same path of the custom repo will be overlaid on top of the standard openremote repo files (thus allowing custom project override -of any behaviour). +of any behavior). # Variables diff --git a/.ci_cd/aws/cloudformation-create-ec2.yml b/.ci_cd/aws/cloudformation-create-ec2.yml index ecb3955b47..f68b8ae0f5 100644 --- a/.ci_cd/aws/cloudformation-create-ec2.yml +++ b/.ci_cd/aws/cloudformation-create-ec2.yml @@ -603,7 +603,7 @@ Resources: # ------------------------------------------------------------------------------------------------------ # - # Script for synchronising files in /deployment.local/backup with S3 bucket with same name as this host + # Script for synchronizing files in /deployment.local/backup with S3 bucket with same name as this host # # ------------------------------------------------------------------------------------------------------ diff --git a/.ci_cd/aws/provision_account.sh b/.ci_cd/aws/provision_account.sh index 6b8939c10b..cfa5f8102c 100644 --- a/.ci_cd/aws/provision_account.sh +++ b/.ci_cd/aws/provision_account.sh @@ -3,7 +3,7 @@ # Provisions a member account of the specified name under the specified OU using Control Tower Account Factory via # Service Catalog; callee must have required permissions to call the service catalog and must also be in the Control # Tower home account. -# The customisations for control tower will perform some standard customisations of the provisioned account as defined +# The customizations for control tower will perform some standard customizations of the provisioned account as defined # in the custom-control-tower-configuration CodeCommit repo. Also does the following: # # * Add /SSH-Key/developers store parameter to the new account's list of SSH public keys (this is used when provisioning @@ -121,21 +121,21 @@ fi echo "Storing account ID for future reference" aws ssm put-parameter --name "/Account-Ids/$AWS_ACCOUNT_NAME" --value "$AWS_ACCOUNT_ID" --type String &>/dev/null -# Wait for control tower customisations to complete +# Wait for control tower customizations to complete STATUS=$(aws codepipeline list-pipeline-executions --pipeline-name Custom-Control-Tower-CodePipeline --query "pipelineExecutionSummaries[0].status" --output text) count=0 while [ "$STATUS" == 'InProgress' ] && [ $count -lt 30 ]; do - echo "Code pipeline for control tower customisations status is $STATUS .. Sleeping 30 seconds" + echo "Code pipeline for control tower customizations status is $STATUS .. Sleeping 30 seconds" sleep 30 STATUS=$(aws codepipeline list-pipeline-executions --pipeline-name Custom-Control-Tower-CodePipeline --query "pipelineExecutionSummaries[0].status" --output text) count=$((count+1)) done if [ "$STATUS" != 'Succeeded' ]; then - echo "Control tower customisation pipeline has failed cannot continue until this is resolved" + echo "Control tower customization pipeline has failed cannot continue until this is resolved" exit 1 else - echo "Control tower customisation pipeline has succeeded" + echo "Control tower customization pipeline has succeeded" fi # Update aws github-da profile with this account diff --git a/.ci_cd/deploy.sh b/.ci_cd/deploy.sh index 3eedb4fead..1d700a5f72 100644 --- a/.ci_cd/deploy.sh +++ b/.ci_cd/deploy.sh @@ -3,7 +3,7 @@ # !!!!!!!!! MUST BE RUN FROM THE REPO ROOT DIR !!!!!!!!! # # Script that handles packaging deployment files and executing stack down/up via SCP/SSH; between stack down/up the -# host init script is executed (see .ci_cd/host_init/init.sh) this initialises the host and configures any standard +# host init script is executed (see .ci_cd/host_init/init.sh) this initializes the host and configures any standard # deployment maintenance tasks (daily restart, daily backups, etc.). # # If AWS CLI authentication variables are configured then this script can use the AWS CLI to perform AWS specific diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index f643f3409a..a9f6555fe3 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -7,7 +7,7 @@ # - Deploying to hosts on push/release and/or manual trigger and/or when certain openremote/manager docker tags are updated # # By default this workflow will just run tests on push/release; distribution (pushing of openremote/manager docker image) -# and deployment behaviour is configured via the .ci_cd/ci_cd.json file (see .ci_cd/README.md for more details). +# and deployment behavior is configured via the .ci_cd/ci_cd.json file (see .ci_cd/README.md for more details). # # DEPLOYMENTS # @@ -451,7 +451,7 @@ jobs: pushSnapshot = os.getenv('INPUT_PUSH_SNAPSHOT') if pushSnapshot == 'true' and repoOwner != 'openremote': - os.system("echo 'Only Openremote organisation can push to ECR'") + os.system("echo 'Only Openremote organization can push to ECR'") sys.exit(1) else: os.system(f"echo 'pushSnapshot={pushSnapshot}' >> $GITHUB_OUTPUT") diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 403361c2b6..7c66186c99 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -3,7 +3,7 @@ # # The repo must contain a 'deployment/Dockerfile' and a 'deployment/build.gradle' with an installDist task that prepares # the deployment image in the 'deployment/build' directory; if this condition is not met the deployment will fail. -# Deployments are only done for repos owned by the openremote organisation. +# Deployments are only done for repos owned by the openremote organization. # # Each deployment consists of an environment and an openremote/manager docker tag, taken from: # diff --git a/.github/workflows/provision-account.yml b/.github/workflows/provision-account.yml index bb1021e4ac..105364e627 100644 --- a/.github/workflows/provision-account.yml +++ b/.github/workflows/provision-account.yml @@ -1,6 +1,6 @@ # --------------------------------------------------------------------------------------------------------------------- # This workflow handles creation of AWS member accounts by calling (.ci_cd/aws/provision_account.sh) -# You need to be a member of the CI/CD github team to use this action as it will incur costs for the organisation. +# You need to be a member of the CI/CD github team to use this action as it will incur costs for the organization. # --------------------------------------------------------------------------------------------------------------------- name: Provision Account @@ -27,7 +27,7 @@ on: type: boolean required: false OU: - description: "Organisational unit to use for account" + description: "Organizational unit to use for account" type: string default: Custom diff --git a/AGENTS.md b/AGENTS.md index 6ac738d51f..dcce605ed2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ In sandboxed environments, add `--offline` (requires dependencies to already be ### Writing tests -All backend tests are Groovy Spock specifications. Unit tests live in the project that holds the code, under `/src/test/groovy`. Use an integration test in the `test` project only when the behaviour needs a running manager. Tests for anything under `ui/` follow `ui/AGENTS.md`. +All backend tests are Groovy Spock specifications. Unit tests live in the project that holds the code, under `/src/test/groovy`. Use an integration test in the `test` project only when the behavior needs a running manager. Tests for anything under `ui/` follow `ui/AGENTS.md`. Since Spock 2.0, unrolling is the default, don't add un-necessary @Unroll annotations. @@ -44,7 +44,7 @@ Annotate every endpoint with the resource role of its domain, e.g. `read:alarms` ### Access control -Access control belongs in the resource implementation, not in the service. Extend `ManagerWebResource` and use its checks rather than reaching for the identity provider: `throwIfNotRealmActiveAndAccessible` and `throwIfRestrictedUser` reject with a 403, and `isRealmActiveAndAccessible` and `isRestrictedUser` are there for conditions that need more than a rejection. Resolve the entity first and return 404 when it is missing, then require access to its realm, and apply restricted user rules in the same place. Service methods take already authorised input and state that in their javadoc with "Callers are responsible for enforcing realm authorization." Alarms and notifications are the reference for this shape; equivalent endpoints across the two must enforce the same way. Flows that never pass through a resource, such as notifications published to the message broker, authorise inside the service instead. +Access control belongs in the resource implementation, not in the service. Extend `ManagerWebResource` and use its checks rather than reaching for the identity provider: `throwIfNotRealmActiveAndAccessible` and `throwIfRestrictedUser` reject with a 403, and `isRealmActiveAndAccessible` and `isRestrictedUser` are there for conditions that need more than a rejection. Resolve the entity first and return 404 when it is missing, then require access to its realm, and apply restricted user rules in the same place. Service methods take already authorized input and state that in their javadoc with "Callers are responsible for enforcing realm authorization." Alarms and notifications are the reference for this shape; equivalent endpoints across the two must enforce the same way. Flows that never pass through a resource, such as notifications published to the message broker, authorize inside the service instead. ## Spelling diff --git a/README.md b/README.md index 1f06f5faf6..d92db04346 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [Source](https://github.com/openremote/core) **·** [Documentation](https://docs.openremote.io) **·** [Forum](https://forum.openremote.io) **·** [Issues](https://github.com/openremote/core/issues) **·** [Docker Images](https://hub.docker.com/u/openremote/) **·** [OpenRemote Inc.](https://openremote.io) -Welcome to OpenRemote; an intuitive user-friendly 100% open source IoT platform. You can build a complete IoT device management solution including: device management and auto provisioning, customisation of asset types, automation via when-then, flow, javascript and groovy rules, data analytics, connectivity via several protocol agents and manager APIs (e.g. MQTT broker, HTTP/REST, WS), Multi-tenancy (realms), Users and roles management, Edge gateway, Front-end UI web components and consoles, and an Insights dashboard builder. +Welcome to OpenRemote; an intuitive user-friendly 100% open source IoT platform. You can build a complete IoT device management solution including: device management and auto provisioning, customization of asset types, automation via when-then, flow, javascript and groovy rules, data analytics, connectivity via several protocol agents and manager APIs (e.g. MQTT broker, HTTP/REST, WS), Multi-tenancy (realms), Users and roles management, Edge gateway, Front-end UI web components and consoles, and an Insights dashboard builder. As the code base is 100% open source, applications are limitless. Here's an architecture overview: diff --git a/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/BluetoothMeshProxyStateMachine.java b/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/BluetoothMeshProxyStateMachine.java index daeed77161..554ecbda7c 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/BluetoothMeshProxyStateMachine.java +++ b/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/BluetoothMeshProxyStateMachine.java @@ -348,7 +348,7 @@ void cancelConnection() { executeOnMainThread( () -> { LOG.info( - "Cancelling peripheral connection: [Name=" + "Canceling peripheral connection: [Name=" + getPeripheral().getName() + ", Address=" + getPeripheral().getAddress() diff --git a/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/transport/LowerTransportLayer.java b/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/transport/LowerTransportLayer.java index 95eccfb778..45615e37e7 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/transport/LowerTransportLayer.java +++ b/agent/src/main/java/org/openremote/agent/protocol/bluetooth/mesh/transport/LowerTransportLayer.java @@ -751,7 +751,7 @@ final synchronized ControlMessage parseSegmentedControlLowerTransportPDU(final b incompleteTimerTask = null; LOG.info( - "Cancelling Scheduled block ack and incomplete timer, sending an immediate block ack"); + "Canceling Scheduled block ack and incomplete timer, sending an immediate block ack"); sendBlockAck(seqZero, ttl, blockAckSrc, blockAckDst, segN); // mBlockAckSent = false; } @@ -881,7 +881,7 @@ private void sendBlockAck( final int seqZero, final int ttl, final int src, final int dst, final int segN) { final int blockAck = mSegmentedAccessBlockAck; if (BlockAcknowledgementMessage.hasAllSegmentsBeenReceived(blockAck, segN)) { - LOG.info("All segments received cancelling incomplete timer"); + LOG.info("All segments received canceling incomplete timer"); cancelIncompleteTimer(); } diff --git a/agent/src/main/java/org/openremote/agent/protocol/http/HTTPProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/http/HTTPProtocol.java index 2dcbe91971..ccb2f7c4e3 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/http/HTTPProtocol.java +++ b/agent/src/main/java/org/openremote/agent/protocol/http/HTTPProtocol.java @@ -571,7 +571,7 @@ protected ScheduledFuture schedulePollingRequest( LOG.log( Level.WARNING, prefixLogMessage( - "Exception thrown whilst processing polling response [" + "Exception thrown while processing polling response [" + (e.getCause() != null ? e.getCause().getMessage() : e.getMessage()) @@ -583,7 +583,7 @@ protected ScheduledFuture schedulePollingRequest( LOG.log( Level.WARNING, prefixLogMessage( - "Exception thrown whilst processing polling response [" + "Exception thrown while processing polling response [" + (e.getCause() != null ? e.getCause().getMessage() : e.getMessage()) + "]: " + clientRequest.requestTarget.getUriBuilder().build().toString())); @@ -616,7 +616,7 @@ protected void executePollingRequest( LOG.log( Level.WARNING, prefixLogMessage( - "Exception thrown whilst doing polling request [" + "Exception thrown while doing polling request [" + (e.getCause() != null ? e.getCause().getMessage() : e.getMessage()) + "]: " + clientRequest.requestTarget.getUriBuilder().build().toString())); @@ -651,7 +651,7 @@ protected void executeAttributeWriteRequest( try (Response response = clientRequest.invoke(valueStr)) { responseConsumer.accept(response); } catch (Exception e) { - LOG.log(Level.SEVERE, "Exception thrown whilst doing attribute write request", e); + LOG.log(Level.SEVERE, "Exception thrown while doing attribute write request", e); } } @@ -680,7 +680,7 @@ protected void onPollingResponse( value = response.readEntity(String.class); } } catch (Exception e) { - LOG.log(Level.WARNING, "Error occurred whilst trying to read response body", e); + LOG.log(Level.WARNING, "Error occurred while trying to read response body", e); response.close(); } } else { diff --git a/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIOServer.java b/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIOServer.java index bf454f6a91..41ba17932b 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIOServer.java +++ b/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIOServer.java @@ -121,7 +121,7 @@ public void operationComplete(ChannelFuture future) { } if (future.isSuccess()) { - LOG.log(Level.INFO, "Connection initialising: " + getSocketAddressString()); + LOG.log(Level.INFO, "Connection initializing: " + getSocketAddressString()); reconnectTask = null; reconnectDelayMilliseconds = INITIAL_RECONNECT_DELAY_MILLIS; } else if (future.cause() != null) { @@ -147,7 +147,7 @@ public void operationComplete(ChannelFuture future) { }); } catch (Exception e) { - LOG.log(Level.SEVERE, "An error occurred whilst starting the server so shutting down", e); + LOG.log(Level.SEVERE, "An error occurred while starting the server so shutting down", e); stop(); } } @@ -301,10 +301,10 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception { } /** - * Initialise the specified client channel (will be called when a new client connection is made) + * Initialize the specified client channel (will be called when a new client connection is made) */ protected void initClientChannel(U channel) { - LOG.fine("Client initialising: " + getClientDescriptor(channel)); + LOG.fine("Client initializing: " + getClientDescriptor(channel)); // Add handler to track when a channel becomes active and to handle exceptions channel @@ -366,7 +366,7 @@ protected void handleMessageReceived(U channel, T message) { protected void onClientDisconnected(U client) { LOG.fine("Client disconnected: " + getClientDescriptor(client)); - // Channel group manages removal of stale channels but whilst we're here + // Channel group manages removal of stale channels but while we're here allChannels.remove(client); sendClientConnectionStatus(client, ConnectionStatus.DISCONNECTED); } diff --git a/agent/src/main/java/org/openremote/agent/protocol/knx/KNXConnection.java b/agent/src/main/java/org/openremote/agent/protocol/knx/KNXConnection.java index b8a0ae8778..f626db74d6 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/knx/KNXConnection.java +++ b/agent/src/main/java/org/openremote/agent/protocol/knx/KNXConnection.java @@ -129,7 +129,7 @@ public synchronized void connect() { onConnectionStatusChanged(ConnectionStatus.CONNECTED); // Get the values of all registered group addresses - LOG.finest("Initialising group address values"); + LOG.finest("Initializing group address values"); synchronized (groupAddressConsumerMap) { groupAddressConsumerMap.forEach( (groupAddress, datapointConsumerList) -> { diff --git a/agent/src/main/java/org/openremote/agent/protocol/knx/KNXProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/knx/KNXProtocol.java index 8663429c42..8c42471021 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/knx/KNXProtocol.java +++ b/agent/src/main/java/org/openremote/agent/protocol/knx/KNXProtocol.java @@ -284,7 +284,7 @@ public Future startAssetImport(byte[] fileData, Consumer String xsd = IOUtils.toString(inputStream, StandardCharsets.UTF_8); xsd = xsd.trim() - .replaceFirst("^([\\W]+)<", "<"); // Get weird behaviour sometimes without this + .replaceFirst("^([\\W]+)<", "<"); // Get weird behavior sometimes without this Transformer transformer = createSecureTransformerFactory() .newTransformer(new StreamSource(new StringReader(xsd))); @@ -296,7 +296,7 @@ public Future startAssetImport(byte[] fileData, Consumer String xml = IOUtils.toString(zin, StandardCharsets.UTF_8); xml = xml.trim() - .replaceFirst("^([\\W]+)<", "<"); // Get weird behaviour sometimes without this + .replaceFirst("^([\\W]+)<", "<"); // Get weird behavior sometimes without this StringWriter writer = new StringWriter(); StringReader reader = new StringReader(xml); transformer.transform(new StreamSource(reader), new StreamResult(writer)); diff --git a/agent/src/main/java/org/openremote/agent/protocol/lorawan/GrpcRetryingRunner.java b/agent/src/main/java/org/openremote/agent/protocol/lorawan/GrpcRetryingRunner.java index 4e53798fa9..209b678bb4 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/lorawan/GrpcRetryingRunner.java +++ b/agent/src/main/java/org/openremote/agent/protocol/lorawan/GrpcRetryingRunner.java @@ -168,7 +168,7 @@ public void start( task.accept(channel); execution.recordResult(null); } catch (InterruptedException ex) { - throw new CancellationException("[" + taskName + "] cancelled"); + throw new CancellationException("[" + taskName + "] canceled"); } finally { shutdownChannel(channel); currentChannel = null; @@ -306,7 +306,7 @@ public void startStream( task.accept(channel); } catch (InterruptedException exception) { throw new CancellationException( - "[" + taskName + "] cancelled for: " + getClientUri()); + "[" + taskName + "] canceled for: " + getClientUri()); } finally { shutdownChannel(channel); currentChannel = null; diff --git a/agent/src/main/java/org/openremote/agent/protocol/mail/MailClient.java b/agent/src/main/java/org/openremote/agent/protocol/mail/MailClient.java index 7b8106b717..fda082f306 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/mail/MailClient.java +++ b/agent/src/main/java/org/openremote/agent/protocol/mail/MailClient.java @@ -125,8 +125,8 @@ protected boolean doConnect() { // LOG.log(System.Logger.Level.TRACE, "Got " + messages.length + " // messages"); // - // if (!initialised) { - // initialised = true; + // if (!initialized) { + // initialized = true; // // Filter out earlier messages on first pass // Arrays.stream(messages) // .filter(message -> { @@ -318,7 +318,7 @@ protected void checkForMessages() { } catch (MessagingException e) { LOG.log( System.Logger.Level.INFO, - "An exception occurred whilst processing a message: " + "An exception occurred while processing a message: " + messageToString(message), e); } @@ -332,12 +332,12 @@ protected void checkForMessages() { } } catch (MessagingException e) { LOG.log( - System.Logger.Level.WARNING, "An error occurred whilst trying to read mail", e); + System.Logger.Level.WARNING, "An error occurred while trying to read mail", e); } }); updateConnectionStatus(ConnectionStatus.WAITING); } catch (Exception e) { - LOG.log(System.Logger.Level.WARNING, "An error occurred whilst processing mail messages", e); + LOG.log(System.Logger.Level.WARNING, "An error occurred while processing mail messages", e); updateConnectionStatus(ConnectionStatus.ERROR); } } diff --git a/agent/src/main/java/org/openremote/agent/protocol/mqtt/AbstractMQTT_IOClient.java b/agent/src/main/java/org/openremote/agent/protocol/mqtt/AbstractMQTT_IOClient.java index 03d1a6a702..135523a423 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/mqtt/AbstractMQTT_IOClient.java +++ b/agent/src/main/java/org/openremote/agent/protocol/mqtt/AbstractMQTT_IOClient.java @@ -613,7 +613,7 @@ protected Future doConnect() { } else if (throwable != null) { if (getConnectionStatus() != ConnectionStatus.DISCONNECTED) { if (throwable instanceof CancellationException) { - LOG.info("Connection cancelled uri=" + getClientUri()); + LOG.info("Connection canceled uri=" + getClientUri()); } else { LOG.info( "Connection failed uri=" diff --git a/agent/src/main/java/org/openremote/agent/protocol/serial/JSerialCommChannelConfig.java b/agent/src/main/java/org/openremote/agent/protocol/serial/JSerialCommChannelConfig.java index 8921955c63..53c2d032f1 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/serial/JSerialCommChannelConfig.java +++ b/agent/src/main/java/org/openremote/agent/protocol/serial/JSerialCommChannelConfig.java @@ -105,7 +105,7 @@ public static Paritybit valueOf(int value) { /** * Sets the number of stop bits to include at the end of every character to aid the serial device - * in synchronising with the data. + * in synchronizing with the data. * * @param stopbits The number of stop bits to use */ @@ -146,7 +146,7 @@ public static Paritybit valueOf(int value) { Paritybit getParitybit(); /** - * @return The number of milliseconds to wait between opening the serial port and initialising. + * @return The number of milliseconds to wait between opening the serial port and initializing. */ int getWaitTimeMillis(); diff --git a/agent/src/main/java/org/openremote/agent/protocol/simulator/SimulatorProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/simulator/SimulatorProtocol.java index 5a0589b933..df43ffc1aa 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/simulator/SimulatorProtocol.java +++ b/agent/src/main/java/org/openremote/agent/protocol/simulator/SimulatorProtocol.java @@ -225,7 +225,7 @@ protected ScheduledFuture scheduleReplay( .orElse(simulatorReplayDatapoints[0]); if (nextDatapoint == null) { - LOG.warning("Next datapoint not found so replay cancelled: " + attributeRef); + LOG.warning("Next datapoint not found so replay canceled: " + attributeRef); return null; } diff --git a/agent/src/main/java/org/openremote/agent/protocol/tradfri/TradfriProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/tradfri/TradfriProtocol.java index 3ec2f03676..006c43beb7 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/tradfri/TradfriProtocol.java +++ b/agent/src/main/java/org/openremote/agent/protocol/tradfri/TradfriProtocol.java @@ -164,7 +164,7 @@ protected void doLinkedAttributeWrite( } protected void synchroniseAssets(Device[] devices) { - LOG.fine("Synchronising assets with gateway devices: " + this); + LOG.fine("Synchronizing assets with gateway devices: " + this); boolean isFirstRun = tradfriDevices == null; if (isFirstRun) { diff --git a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/Light.java b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/Light.java index ef1bd032dc..ad1bd237ca 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/Light.java +++ b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/Light.java @@ -95,9 +95,9 @@ public Integer getBrightness() { } /** - * Get the colour of the light in hexadecimals + * Get the color of the light in hexadecimals * - * @return The colour of the light in hexadecimals + * @return The color of the light in hexadecimals */ public String getColourHex() { return properties.getColourHex(); @@ -122,36 +122,36 @@ public Integer getSaturation() { } /** - * Get the X value of the colour of the light + * Get the X value of the color of the light * - * @return The X value of the colour of the light + * @return The X value of the color of the light */ public Integer getColourX() { return properties.getColourX(); } /** - * Get the Y value of the colour of the light + * Get the Y value of the color of the light * - * @return The Y value of the colour of the light + * @return The Y value of the color of the light */ public Integer getColourY() { return properties.getColourY(); } /** - * Get the XY values of the colour of the light + * Get the XY values of the color of the light * - * @return The XY values of the colour of the light + * @return The XY values of the color of the light */ public ColourXY getColourXY() { return new ColourXY(properties.getColourX(), properties.getColourY()); } /** - * Get the RGB values of the colour of the light + * Get the RGB values of the color of the light * - * @return The RGB values of the colour of the light + * @return The RGB values of the color of the light */ public ColourRGB getColourRGB() { return ColourRGB.fromHS( @@ -160,9 +160,9 @@ public ColourRGB getColourRGB() { } /** - * Get the colour temperature of the light + * Get the color temperature of the light * - * @return The colour temperature of the light + * @return The color temperature of the light */ public Integer getColourTemperature() { return properties.getColourTemperature(); @@ -187,9 +187,9 @@ public void updateBrightness(Integer brightness) { } /** - * Update the colour of the light in the update queue to a predefined hexadecimal colour + * Update the color of the light in the update queue to a predefined hexadecimal color * - * @param colourHex The new colour for the light + * @param colourHex The new color for the light */ public void updateColourHex(String colourHex) { newProperties.setColourHex(colourHex); @@ -227,10 +227,10 @@ public void updateSaturation(Integer saturation) { } /** - * Update the colour of the light in the update queue + * Update the color of the light in the update queue * - * @param colourX The X value of the new colour for the light - * @param colourY The Y value of the new colour for the light + * @param colourX The X value of the new color for the light + * @param colourY The Y value of the new color for the light */ public void updateColourXY(Integer colourX, Integer colourY) { newProperties.setColourX(colourX); @@ -242,9 +242,9 @@ public void updateColourXY(Integer colourX, Integer colourY) { } /** - * Update the colour of the light in the update queue + * Update the color of the light in the update queue * - * @param colourXY The new colour for the light + * @param colourXY The new color for the light */ public void updateColour(ColourXY colourXY) { newProperties.setColourX(colourXY.getX()); @@ -256,29 +256,29 @@ public void updateColour(ColourXY colourXY) { } /** - * Update the colour of the light in the update queue + * Update the color of the light in the update queue * - * @param colourRGB The new colour for the light + * @param colourRGB The new color for the light */ public void updateColour(ColourRGB colourRGB) { updateColour(ColourXY.fromRGB(colourRGB)); } /** - * Update the colour of the light in the update queue + * Update the color of the light in the update queue * - * @param colourRed The red value of the new colour for the light - * @param colourGreen The green value of the new colour for the light - * @param colourBlue The blue value of the new colour for the light + * @param colourRed The red value of the new color for the light + * @param colourGreen The green value of the new color for the light + * @param colourBlue The blue value of the new color for the light */ public void updateColourRGB(int colourRed, int colourGreen, int colourBlue) { updateColour(new ColourRGB(colourRed, colourGreen, colourBlue)); } /** - * Update the colour temperature of the light in the update queue + * Update the color temperature of the light in the update queue * - * @param colourTemperature The new colour temperature for the light + * @param colourTemperature The new color temperature for the light */ public void updateColourTemperature(Integer colourTemperature) { newProperties.setColourTemperature(colourTemperature); @@ -347,11 +347,11 @@ public boolean setBrightness(Integer brightness) { } /** - * Set the colour of the light to a predefined hexadecimal colour + * Set the color of the light to a predefined hexadecimal color * - * @param colourHex The new colour for the light + * @param colourHex The new color for the light * @param transitionTime The transition time for updating the light - * @return True if successfully updated the colour of the light, false if not + * @return True if successfully updated the color of the light, false if not */ public boolean setColourHex(String colourHex, Integer transitionTime) { LightProperties newProperties = new LightProperties(); @@ -361,10 +361,10 @@ public boolean setColourHex(String colourHex, Integer transitionTime) { } /** - * Set the colour of the light to a predefined hexadecimal colour + * Set the color of the light to a predefined hexadecimal color * - * @param colourHex The new colour for the light - * @return True if successfully updated the colour of the light, false if not + * @param colourHex The new color for the light + * @return True if successfully updated the color of the light, false if not */ public boolean setColourHex(String colourHex) { return setColourHex(colourHex, null); @@ -419,12 +419,12 @@ public boolean setSaturation(Integer saturation) { } /** - * Set the colour of the light + * Set the color of the light * - * @param colourX The X value of the new colour for the light - * @param colourY The Y value of the new colour for the light + * @param colourX The X value of the new color for the light + * @param colourY The Y value of the new color for the light * @param transitionTime The transition time for updating the light - * @return True if successfully updated the colour of the light, false if not + * @return True if successfully updated the color of the light, false if not */ public boolean setColourXY(Integer colourX, Integer colourY, Integer transitionTime) { LightProperties newProperties = new LightProperties(); @@ -435,66 +435,66 @@ public boolean setColourXY(Integer colourX, Integer colourY, Integer transitionT } /** - * Set the colour of the light + * Set the color of the light * - * @param colourX The X value of the new colour for the light - * @param colourY The Y value of the new colour for the light - * @return True if successfully updated the colour of the light, false if not + * @param colourX The X value of the new color for the light + * @param colourY The Y value of the new color for the light + * @return True if successfully updated the color of the light, false if not */ public boolean setColourXY(Integer colourX, Integer colourY) { return setColourXY(colourX, colourY, null); } /** - * Set the colour of the light + * Set the color of the light * - * @param colourXY The new colour for the light + * @param colourXY The new color for the light * @param transitionTime The transition time for updating the light - * @return True if successfully updated the colour of the light, false if not + * @return True if successfully updated the color of the light, false if not */ public boolean setColour(ColourXY colourXY, Integer transitionTime) { return setColourXY(colourXY.getX(), colourXY.getY(), transitionTime); } /** - * Set the colour of the light + * Set the color of the light * - * @param colourXY The new colour for the light - * @return True if successfully updated the colour of the light, false if not + * @param colourXY The new color for the light + * @return True if successfully updated the color of the light, false if not */ public boolean setColour(ColourXY colourXY) { return setColour(colourXY, null); } /** - * Set the colour of the light + * Set the color of the light * - * @param colourRGB The new colour for the light + * @param colourRGB The new color for the light * @param transitionTime The transition time for updating the light - * @return True if successfully updated the colour of the light, false if not + * @return True if successfully updated the color of the light, false if not */ public boolean setColour(ColourRGB colourRGB, Integer transitionTime) { return setColour(ColourXY.fromRGB(colourRGB), transitionTime); } /** - * Set the colour of the light + * Set the color of the light * - * @param colourRGB The new colour for the light - * @return True if successfully updated the colour of the light, false if not + * @param colourRGB The new color for the light + * @return True if successfully updated the color of the light, false if not */ public boolean setColour(ColourRGB colourRGB) { return setColour(colourRGB, null); } /** - * Set the colour of the light + * Set the color of the light * - * @param colourRed The red value of the new colour for the light - * @param colourGreen The green value of the new colour for the light - * @param colourBlue The blue value of the new colour for the light + * @param colourRed The red value of the new color for the light + * @param colourGreen The green value of the new color for the light + * @param colourBlue The blue value of the new color for the light * @param transitionTime The transition time for updating the light - * @return True if successfully updated the colour of the light, false if not + * @return True if successfully updated the color of the light, false if not */ public boolean setColourRGB( int colourRed, int colourGreen, int colourBlue, Integer transitionTime) { @@ -502,23 +502,23 @@ public boolean setColourRGB( } /** - * Set the colour of the light + * Set the color of the light * - * @param colourRed The red value of the new colour for the light - * @param colourGreen The green value of the new colour for the light - * @param colourBlue The blue value of the new colour for the light - * @return True if successfully updated the colour of the light, false if not + * @param colourRed The red value of the new color for the light + * @param colourGreen The green value of the new color for the light + * @param colourBlue The blue value of the new color for the light + * @return True if successfully updated the color of the light, false if not */ public boolean setColourRGB(int colourRed, int colourGreen, int colourBlue) { return setColour(new ColourRGB(colourRed, colourGreen, colourBlue)); } /** - * Set the colour temperature of the light + * Set the color temperature of the light * - * @param colourTemperature The new colour temperature for the light + * @param colourTemperature The new color temperature for the light * @param transitionTime The transition time for updating the light - * @return True if successfully updated the colour temperature of the light, false if not + * @return True if successfully updated the color temperature of the light, false if not */ public boolean setColourTemperature(Integer colourTemperature, Integer transitionTime) { LightProperties newProperties = new LightProperties(); @@ -528,10 +528,10 @@ public boolean setColourTemperature(Integer colourTemperature, Integer transitio } /** - * Set the colour temperature of the light + * Set the color temperature of the light * - * @param colourTemperature The new colour temperature for the light - * @return True if successfully updated the colour temperature of the light, false if not + * @param colourTemperature The new color temperature for the light + * @return True if successfully updated the color temperature of the light, false if not */ public boolean setColourTemperature(Integer colourTemperature) { return setColourTemperature(colourTemperature, null); diff --git a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/LightProperties.java b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/LightProperties.java index ec57373773..ef62f30241 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/LightProperties.java +++ b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/LightProperties.java @@ -36,7 +36,7 @@ public class LightProperties extends DeviceProperties { @JsonProperty(ApiCode.BRIGHTNESS) private Integer brightness; - /** The colour of the light in hexadecimals */ + /** The color of the light in hexadecimals */ @JsonProperty(ApiCode.COLOUR_HEX) private String colourHex; @@ -48,15 +48,15 @@ public class LightProperties extends DeviceProperties { @JsonProperty(ApiCode.SATURATION) private Integer saturation; - /** The X value of the colour of the light */ + /** The X value of the color of the light */ @JsonProperty(ApiCode.COLOUR_X) private Integer colourX; - /** The Y value of the colour of the light */ + /** The Y value of the color of the light */ @JsonProperty(ApiCode.COLOUR_Y) private Integer colourY; - /** The colour temperature of the light */ + /** The color temperature of the light */ @JsonProperty(ApiCode.COLOUR_TEMPERATURE) private Integer colourTemperature; @@ -86,9 +86,9 @@ public Integer getBrightness() { } /** - * Get the colour of the light in hexadecimals + * Get the color of the light in hexadecimals * - * @return The colour of the light in hexadecimals + * @return The color of the light in hexadecimals */ public String getColourHex() { return this.colourHex; @@ -113,27 +113,27 @@ public Integer getSaturation() { } /** - * Get the X value of the colour of the light + * Get the X value of the color of the light * - * @return The X value of the colour of the light + * @return The X value of the color of the light */ public Integer getColourX() { return this.colourX; } /** - * Get the Y value of the colour of the light + * Get the Y value of the color of the light * - * @return The Y value of the colour of the light + * @return The Y value of the color of the light */ public Integer getColourY() { return this.colourY; } /** - * Get the colour temperature of the light + * Get the color temperature of the light * - * @return The colour temperature of the light + * @return The color temperature of the light */ public Integer getColourTemperature() { return this.colourTemperature; @@ -169,11 +169,11 @@ public void setBrightness(Integer brightness) { } /** - * Set the colour of the light to a predefined hexadecimal colour within the LightProperties class + * Set the color of the light to a predefined hexadecimal color within the LightProperties class *
* Note: This does not change the actual light * - * @param colourHex The new colour for the light + * @param colourHex The new color for the light */ public void setColourHex(String colourHex) { this.colourHex = colourHex; @@ -200,30 +200,30 @@ public void setSaturation(Integer saturation) { } /** - * Set the X value of the colour of the light within the LightProperties class
+ * Set the X value of the color of the light within the LightProperties class
* Note: This does not change the actual light * - * @param colourX The X value of the new colour for the light + * @param colourX The X value of the new color for the light */ public void setColourX(Integer colourX) { this.colourX = colourX; } /** - * Set the Y value of the colour of the light within the LightProperties class
+ * Set the Y value of the color of the light within the LightProperties class
* Note: This does not change the actual light * - * @param colourY The Y value of the new colour for the light + * @param colourY The Y value of the new color for the light */ public void setColourY(Integer colourY) { this.colourY = colourY; } /** - * Set the colour temperature of the light within the LightProperties class
+ * Set the color temperature of the light within the LightProperties class
* Note: This does not change the actual light * - * @param colourTemperature The new colour temperature for the light + * @param colourTemperature The new color temperature for the light */ public void setColourTemperature(Integer colourTemperature) { this.colourTemperature = colourTemperature; diff --git a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourEvent.java b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourEvent.java index 8c4ccc14d1..8480f45495 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourEvent.java +++ b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourEvent.java @@ -23,7 +23,7 @@ import org.openremote.agent.protocol.tradfri.util.ColourXY; import org.openremote.model.value.impl.ColourRGB; -/** The class that represents a light colour changed event that occurred to an IKEA TRÅDFRI light */ +/** The class that represents a light color changed event that occurred to an IKEA TRÅDFRI light */ public class LightChangeColourEvent extends LightChangeEvent { /** @@ -75,63 +75,63 @@ public int getNewSaturation() { } /** - * Get the old X value of the colour of the light (from before the event occurred) + * Get the old X value of the color of the light (from before the event occurred) * - * @return The old X value of the colour of the light + * @return The old X value of the color of the light */ public int getOldColourX() { return getOldProperties().getColourX(); } /** - * Get the new X value of the colour of the light (from after the event occurred) + * Get the new X value of the color of the light (from after the event occurred) * - * @return The new X value of the colour of the light + * @return The new X value of the color of the light */ public int getNewColourX() { return getNewProperties().getColourX(); } /** - * Get the old Y value of the colour of the light (from before the event occurred) + * Get the old Y value of the color of the light (from before the event occurred) * - * @return The old Y value of the colour of the light + * @return The old Y value of the color of the light */ public int getOldColourY() { return getOldProperties().getColourY(); } /** - * Get the new Y value of the colour of the light (from after the event occurred) + * Get the new Y value of the color of the light (from after the event occurred) * - * @return The new Y value of the colour of the light + * @return The new Y value of the color of the light */ public int getNewColourY() { return getNewProperties().getColourY(); } /** - * Get the old XY colour of the light (from before the event occurred) + * Get the old XY color of the light (from before the event occurred) * - * @return The old XY colour of the light + * @return The old XY color of the light */ public ColourXY getOldColourXY() { return new ColourXY(getOldProperties().getColourX(), getOldProperties().getColourY()); } /** - * Get the new XY colour of the light (from after the event occurred) + * Get the new XY color of the light (from after the event occurred) * - * @return The new XY colour of the light + * @return The new XY color of the light */ public ColourXY getNewColourXY() { return new ColourXY(getNewProperties().getColourX(), getNewProperties().getColourY()); } /** - * Get the old RGB colour of the light (from before the event occurred) + * Get the old RGB color of the light (from before the event occurred) * - * @return The old RGB colour of the light + * @return The old RGB color of the light */ public ColourRGB getOldColourRGB() { return ColourRGB.fromHS( @@ -140,9 +140,9 @@ public ColourRGB getOldColourRGB() { } /** - * Get the new RGB colour of the light (from after the event occurred) + * Get the new RGB color of the light (from after the event occurred) * - * @return The new RGB colour of the light + * @return The new RGB color of the light */ public ColourRGB getNewColourRGB() { return ColourRGB.fromHS( diff --git a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourTemperatureEvent.java b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourTemperatureEvent.java index 90279aeeca..a75b1a9f3d 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourTemperatureEvent.java +++ b/agent/src/main/java/org/openremote/agent/protocol/tradfri/device/event/LightChangeColourTemperatureEvent.java @@ -22,7 +22,7 @@ import org.openremote.agent.protocol.tradfri.device.LightProperties; /** - * The class that represents a light colour temperature changed event that occurred to an IKEA + * The class that represents a light color temperature changed event that occurred to an IKEA * TRÅDFRI light */ public class LightChangeColourTemperatureEvent extends LightChangeEvent { @@ -40,18 +40,18 @@ public LightChangeColourTemperatureEvent( } /** - * Get the old colour temperature of the light (from before the event occurred) + * Get the old color temperature of the light (from before the event occurred) * - * @return The old colour temperature of the light + * @return The old color temperature of the light */ public int getOldColourTemperature() { return getOldProperties().getColourTemperature(); } /** - * Get the new colour temperature of the light (from after the event occurred) + * Get the new color temperature of the light (from after the event occurred) * - * @return The new colour temperature of the light + * @return The new color temperature of the light */ public int getNewColourTemperature() { return getNewProperties().getColourTemperature(); diff --git a/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ApiCode.java b/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ApiCode.java index b3d5a93e08..bc76393de5 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ApiCode.java +++ b/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ApiCode.java @@ -138,7 +138,7 @@ private ApiCode() {} // Lights /** - * The IKEA TRÅDFRI API code for a hexadecimal colour property
+ * The IKEA TRÅDFRI API code for a hexadecimal color property
* Value: {@value} */ public static final String COLOUR_HEX = "5706"; @@ -156,19 +156,19 @@ private ApiCode() {} public static final String SATURATION = "5708"; /** - * The IKEA TRÅDFRI API code for a X value of a colour property
+ * The IKEA TRÅDFRI API code for a X value of a color property
* Value: {@value} */ public static final String COLOUR_X = "5709"; /** - * The IKEA TRÅDFRI API code for a Y value of a colour property
+ * The IKEA TRÅDFRI API code for a Y value of a color property
* Value: {@value} */ public static final String COLOUR_Y = "5710"; /** - * The IKEA TRÅDFRI API code for a colour temperature property
+ * The IKEA TRÅDFRI API code for a color temperature property
* Value: {@value} */ public static final String COLOUR_TEMPERATURE = "5711"; diff --git a/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ColourXY.java b/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ColourXY.java index 7180a477ba..54f4791a15 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ColourXY.java +++ b/agent/src/main/java/org/openremote/agent/protocol/tradfri/util/ColourXY.java @@ -20,20 +20,20 @@ import org.openremote.model.value.impl.ColourRGB; -/** The class that contains XY values that make up a colour */ +/** The class that contains XY values that make up a color */ public class ColourXY { - /** The X value of the colour */ + /** The X value of the color */ private Integer X; - /** The Y value of the colour */ + /** The Y value of the color */ private Integer Y; /** * Construct the ColourXY class * - * @param X The X value of the colour - * @param Y The Y value of the colour + * @param X The X value of the color + * @param Y The Y value of the color */ public ColourXY(Integer X, Integer Y) { this.X = X; @@ -44,36 +44,36 @@ public ColourXY(Integer X, Integer Y) { public ColourXY() {} /** - * Get the X value of the colour + * Get the X value of the color * - * @return The X value of the colour + * @return The X value of the color */ public Integer getX() { return this.X; } /** - * Get the Y value of the colour + * Get the Y value of the color * - * @return The Y value of the colour + * @return The Y value of the color */ public Integer getY() { return this.Y; } /** - * Set the X value of the colour + * Set the X value of the color * - * @param X The new X value of the colour + * @param X The new X value of the color */ public void setX(Integer X) { this.X = X; } /** - * Set the Y value of the colour + * Set the Y value of the color * - * @param Y The new Y value of the colour + * @param Y The new Y value of the color */ public void setY(Integer Y) { this.Y = Y; diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusNetwork.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusNetwork.java index ef921eb075..4f496ca8d0 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusNetwork.java +++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusNetwork.java @@ -147,7 +147,7 @@ protected void onConnectionStatusChanged(ConnectionStatus status) { messageQueue.clear(); } - // Initialise the devices + // Initialize the devices for (VelbusDevice device : devices) { if (device != null) { device.initialise(); diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusPacket.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusPacket.java index 84294569bc..4e3c9b875c 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusPacket.java +++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/VelbusPacket.java @@ -205,14 +205,14 @@ public VelbusPacket(byte[] content) { } /// - /// Initialises a new instance of the Packet class. + /// Initializes a new instance of the Packet class. /// public VelbusPacket() { this(0x00); } /* - * Initialises a new instance of the Packet class using the + * Initializes a new instance of the Packet class using the * specified address. */ public VelbusPacket(int address) { @@ -235,7 +235,7 @@ public VelbusPacket(int address, int command, PacketPriority priority, byte... d } /* - * Initialises a new instance of the Packet class using the + * Initializes a new instance of the Packet class using the * specified address, priority, data size and rtr state. */ public VelbusPacket(int address, PacketPriority priority, int dataSize, boolean rtr) { diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.java index bbeed98ac1..c1a72535cb 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.java +++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.java @@ -148,7 +148,7 @@ public List getStatusRequestPackets(VelbusDevice device) { if (device.getDeviceType() == VelbusDeviceType.VMB4AN) { - // Initialise the text char arrays for sensors + // Initialize the text char arrays for sensors device.setProperty("SENSOR1_TEXT", EMPTY_SENSOR_TEXT); device.setProperty("SENSOR2_TEXT", EMPTY_SENSOR_TEXT); device.setProperty("SENSOR3_TEXT", EMPTY_SENSOR_TEXT); diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.java index 3413cc8fdc..452ceed371 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.java +++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.java @@ -175,7 +175,7 @@ public List getPropertyDescriptors(VelbusDeviceType deviceTy @Override public List getStatusRequestPackets(VelbusDevice device) { - // Initialise basic state as disabled addresses don't broadcast this info + // Initialize basic state as disabled addresses don't broadcast this info for (int i = 1; i <= getMaxChannelNumber(device.getDeviceType()); i++) { device.setProperty("CH" + i, ChannelState.RELEASED); device.setProperty("CH" + i + "_ENABLED", false); diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/OLEDProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/OLEDProcessor.java index ace0954de5..9dbec34196 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/OLEDProcessor.java +++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/OLEDProcessor.java @@ -127,7 +127,7 @@ public boolean processReceivedPacket(VelbusDevice device, VelbusPacket packet) { switch (packetCommand) { case MODULE_STATUS: - // TODO: try and extract memo text from the device at initialisation + // TODO: try and extract memo text from the device at initialization device.setProperty("MEMO_TEXT", ""); packet.setHandled(true); diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/VelbusDevice.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/VelbusDevice.java index 146ccfabb0..816d48f303 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/VelbusDevice.java +++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/VelbusDevice.java @@ -102,7 +102,7 @@ public void reset() { Arrays.fill(subAddresses, 0); } - /** Attempt initialisation of this device */ + /** Attempt initialization of this device */ public void initialise() { synchronized (this) { if (isInitialised()) { @@ -110,17 +110,17 @@ public void initialise() { } if (initialisationTask != null) { - LOG.finest("Initialisation already in progress"); + LOG.finest("Initialization already in progress"); return; } if (initialisationFailed) { initialisationAttempts = 0; initialisationFailed = false; - LOG.finest("Re-attempting device initialisation"); + LOG.finest("Re-attempting device initialization"); } - LOG.info("Initialisation starting: " + getBaseAddress()); + LOG.info("Initialization starting: " + getBaseAddress()); initialisationTask = velbusNetwork .getExecutorService() @@ -136,7 +136,7 @@ private void doInitialisation() { synchronized (this) { if (initialisationAttempts >= MAX_INITIALISATION_ATTEMPTS) { LOG.fine( - "Initialisation failed - Device has reached maximum initialisation attempts: " + "Initialization failed - Device has reached maximum initialization attempts: " + getBaseAddress()); initialisationFailed = true; cancelInitialisationTask(false); @@ -145,7 +145,7 @@ private void doInitialisation() { initialisationAttempts++; - // Send/Resend the packets needed to initialise the device + // Send/Resend the packets needed to initialize the device velbusNetwork.sendPackets(createModuleTypePacket(baseAddress)); } } @@ -159,8 +159,8 @@ public boolean isInitialisedAndValid() { } /** - * Indicates that the device is now initialised and if so it updates the flag and performs post - * initialisation tasks + * Indicates that the device is now initialized and if so it updates the flag and performs post + * initialization tasks */ private void onInitialised() { synchronized (this) { @@ -169,7 +169,7 @@ private void onInitialised() { } cancelInitialisationTask(true); - LOG.info("Device initialised: " + getBaseAddress()); + LOG.info("Device initialized: " + getBaseAddress()); this.initialised = true; } @@ -225,7 +225,7 @@ public void removeAllPropertyValueConsumers() { public void writeProperty(String property, Object value) { if (!isInitialisedAndValid()) { - LOG.finest("Ignoring property write as device is not initialised and/or it is invalid"); + LOG.finest("Ignoring property write as device is not initialized and/or it is invalid"); return; } @@ -260,7 +260,7 @@ public void processReceivedPacket(VelbusPacket velbusPacket) { + ")"); break; case MODULE_TYPE: - // This is the basic initialisation response packet for all devices + // This is the basic initialization response packet for all devices int typeCode = velbusPacket.getTypeCode(); setDeviceType(VelbusDeviceType.fromCode(typeCode)); diff --git a/agent/src/main/java/org/openremote/agent/protocol/websocket/WebsocketAgentProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/websocket/WebsocketAgentProtocol.java index f39c24d5d6..8d2084b7f6 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/websocket/WebsocketAgentProtocol.java +++ b/agent/src/main/java/org/openremote/agent/protocol/websocket/WebsocketAgentProtocol.java @@ -228,7 +228,7 @@ protected void doUnlinkAttribute( protected void onConnected() { // Look for any subscriptions that need to be processed if (protocolConnectedTasks != null) { - // Execute after a delay to ensure connection is properly initialised + // Execute after a delay to ensure connection is properly initialized scheduledExecutorService.schedule( () -> protocolConnectedTasks.forEach(Runnable::run), CONNECTED_SEND_DELAY_MILLIS, @@ -236,7 +236,7 @@ protected void onConnected() { } if (attributeConnectedTasks != null) { - // Execute after a delay to ensure connection is properly initialised + // Execute after a delay to ensure connection is properly initialized scheduledExecutorService.schedule( () -> attributeConnectedTasks.forEach((ref, task) -> task.run()), CONNECTED_SEND_DELAY_MILLIS, diff --git a/agent/src/main/java/org/openremote/agent/protocol/zwave/ZWaveNetwork.java b/agent/src/main/java/org/openremote/agent/protocol/zwave/ZWaveNetwork.java index 0d7069d5a1..a7d2b59169 100644 --- a/agent/src/main/java/org/openremote/agent/protocol/zwave/ZWaveNetwork.java +++ b/agent/src/main/java/org/openremote/agent/protocol/zwave/ZWaveNetwork.java @@ -96,7 +96,7 @@ public synchronized void disconnect() { controller.disconnect(); } catch (ConnectionException e) { ZWaveProtocol.LOG.log( - Level.WARNING, "Exception thrown whilst disconnecting the controller", e); + Level.WARNING, "Exception thrown while disconnecting the controller", e); } finally { disposeClient(); ioClient = null; diff --git a/agent/src/main/proto/chirpstack/api/fuota.proto b/agent/src/main/proto/chirpstack/api/fuota.proto index fe56eb2cbb..931fbe0d93 100644 --- a/agent/src/main/proto/chirpstack/api/fuota.proto +++ b/agent/src/main/proto/chirpstack/api/fuota.proto @@ -48,7 +48,7 @@ service FuotaService { // Add the given Gateway IDs to the FUOTA deployment. // By default, ChirpStack will automatically select the minimum amount of // gateways needed to cover all devices within the multicast-group. Setting - // the gateways manually overrides this behaviour. + // the gateways manually overrides this behavior. rpc AddGateways(AddGatewaysToFuotaDeploymentRequest) returns (google.protobuf.Empty) {} // List the gateways added to the FUOTA deployment. diff --git a/container/src/main/java/org/openremote/container/Container.java b/container/src/main/java/org/openremote/container/Container.java index 1570b07ce4..68d7c0d34d 100644 --- a/container/src/main/java/org/openremote/container/Container.java +++ b/container/src/main/java/org/openremote/container/Container.java @@ -185,7 +185,7 @@ public synchronized void start() throws Exception { service.init(Container.this); } - // Initialise the asset model + // Initialize the asset model ValueUtil.initialise(this); if (isDevMode()) { @@ -221,22 +221,22 @@ private void stop(boolean force) { service.stop(this); } catch (Exception e) { LOG.log( - INFO, "Exception thrown whilst stopping service: " + service.getClass().getName(), e); + INFO, "Exception thrown while stopping service: " + service.getClass().getName(), e); } } try { - LOG.log(INFO, "Cancelling scheduled tasks"); + LOG.log(INFO, "Canceling scheduled tasks"); SCHEDULED_EXECUTOR.shutdown(); } catch (Exception e) { - LOG.log(WARNING, "Exception thrown whilst trying to stop scheduled tasks", e); + LOG.log(WARNING, "Exception thrown while trying to stop scheduled tasks", e); } try { LOG.log(INFO, "Stopping executor"); EXECUTOR.shutdown(); } catch (Exception e) { - LOG.log(WARNING, "Exception thrown whilst trying to stop executor", e); + LOG.log(WARNING, "Exception thrown while trying to stop executor", e); } if (meterRegistry != null) { diff --git a/container/src/main/java/org/openremote/container/persistence/PersistenceEventInterceptor.java b/container/src/main/java/org/openremote/container/persistence/PersistenceEventInterceptor.java index ee4a505581..d88d77a31a 100644 --- a/container/src/main/java/org/openremote/container/persistence/PersistenceEventInterceptor.java +++ b/container/src/main/java/org/openremote/container/persistence/PersistenceEventInterceptor.java @@ -63,7 +63,7 @@ public boolean onFlushDirty( Type[] types) throws CallbackException { if (isAssetDeletePendingUpdate(entity, currentState, previousState, propertyNames)) { - // Assets are soft deleted but we still want a delete event to maintain existing behaviour + // Assets are soft deleted but we still want a delete event to maintain existing behavior persistenceEvents.add( new PersistenceEvent<>(PersistenceEvent.Cause.DELETE, entity, null, currentState)); } else { diff --git a/container/src/main/java/org/openremote/container/util/MailUtil.java b/container/src/main/java/org/openremote/container/util/MailUtil.java index 239e67b24e..ea5ba85e2e 100644 --- a/container/src/main/java/org/openremote/container/util/MailUtil.java +++ b/container/src/main/java/org/openremote/container/util/MailUtil.java @@ -86,7 +86,7 @@ protected static MessageContent getMessageContent( if (p.isMimeType("multipart/*")) { - // This mimetype means user agent should pick the most favourable message part + // This mimetype means user agent should pick the most favorable message part // use preferHTML option to determine which part the return if any boolean isAlternative = p.isMimeType("multipart/alternative"); diff --git a/container/src/main/java/org/openremote/container/web/CORSConfig.java b/container/src/main/java/org/openremote/container/web/CORSConfig.java index 3ba9a6a757..7fe0c6299b 100644 --- a/container/src/main/java/org/openremote/container/web/CORSConfig.java +++ b/container/src/main/java/org/openremote/container/web/CORSConfig.java @@ -27,7 +27,7 @@ import org.openremote.model.util.Config; import org.openremote.model.util.TextUtil; -/** A simple configuration container for configuring CORS behaviour */ +/** A simple configuration container for configuring CORS behavior */ public class CORSConfig { public static final int DEFAULT_CORS_MAX_AGE = 600; public static final String DEFAULT_CORS_ALLOW_ALL = "*"; diff --git a/deployment/Dockerfile b/deployment/Dockerfile index bbfe332cf3..7b11d75014 100644 --- a/deployment/Dockerfile +++ b/deployment/Dockerfile @@ -1,5 +1,5 @@ # ---------------------------------------------------------------------------------------- -# Docker image for populating deployment-data volume with project specific customisations +# Docker image for populating deployment-data volume with project specific customizations # ---------------------------------------------------------------------------------------- FROM alpine:latest diff --git a/deployment/README.md b/deployment/README.md index c397d13a9d..e642628922 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -1,4 +1,4 @@ -## Demo customisation of the OpenRemote Manager +## Demo customization of the OpenRemote Manager -This directory contains customisations that are applied to our own Demo environments; for an explanation of the different customisation options see the [Manager endpoints and file paths](https://docs.openremote.io/docs/architecture/manager-endpoints-and-file-paths/) documentation +This directory contains customizations that are applied to our own Demo environments; for an explanation of the different customization options see the [Manager endpoints and file paths](https://docs.openremote.io/docs/architecture/manager-endpoints-and-file-paths/) documentation and also refer to the [Custom Project Template](https://github.com/openremote/custom-project). diff --git a/kubernetes/README.md b/kubernetes/README.md index d8f418c269..3fed2d387e 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -349,7 +349,7 @@ to the usual stack lifecycle permissions. Kubernetes RBAC cannot restrict `create` by resource name; an administrator can pre-create the empty registry with label `app.kubernetes.io/managed-by: or-stack` and `data: {}` so operators need only -`get` and `update` on this named ConfigMap. The scripts refuse an unlabelled or +`get` and `update` on this named ConfigMap. The scripts refuse an unlabeled or malformed registry. Only trusted deployment operators and automation should have write access to this registry, because modifying it can bypass hostname ownership checks. diff --git a/kubernetes/manager/values.yaml b/kubernetes/manager/values.yaml index ba76fea46d..b84087d5a5 100644 --- a/kubernetes/manager/values.yaml +++ b/kubernetes/manager/values.yaml @@ -238,7 +238,7 @@ or: # !! WARNING: This will wipe your database !! # Force a full clean and setup on startup irrespective of whether there is existing data - # Default behaviour is false unless OR_DEV_MODE = true or openremote database doesn't already exist + # Default behavior is false unless OR_DEV_MODE = true or openremote database doesn't already exist setupRunOnRestart: false # Location of built in web content. @@ -255,7 +255,7 @@ or: mapTilesPath: /deployment/map/mapdata.mbtiles # Override the map settings such as center location and zoom when opening the - # manager's map, as well as other style details and colours. + # manager's map, as well as other style details and colors. mapSettingsPath: /deployment/map/mapsettings.json # The identity provider implementation to use for managing user identities, roles, and diff --git a/kubernetes/test/hostname-reservations-test b/kubernetes/test/hostname-reservations-test index f59f5aab43..edbcf67ecc 100644 --- a/kubernetes/test/hostname-reservations-test +++ b/kubernetes/test/hostname-reservations-test @@ -173,7 +173,7 @@ class HostnameReservationsTest(unittest.TestCase): def test_disabling_external_dns_retains_cleanup_obligation(self): args = ("prepare", "--name", "stack-a", "--target", "local", "--hostname", "a.example.com") self.success(self.command(*args, "--dns", "external-dns")) - # The stub has no reserved-hostname annotation, modelling an interrupted + # The stub has no reserved-hostname annotation, modeling an interrupted # apply after the registry write but before the annotation was recorded. self.failure(self.apply(host="other.example.com", target="local"), "hostname changes") self.success(self.command(*args, "--dns", "none")) diff --git a/manager/src/main/java/org/openremote/manager/agent/AgentService.java b/manager/src/main/java/org/openremote/manager/agent/AgentService.java index 263aea45ed..8f863d039f 100644 --- a/manager/src/main/java/org/openremote/manager/agent/AgentService.java +++ b/manager/src/main/java/org/openremote/manager/agent/AgentService.java @@ -203,7 +203,7 @@ public void unsubscribeChildAssetChange( private static final Logger LOG = Logger.getLogger(AgentService.class.getName()); public static final int PRIORITY = MessageBrokerService.PRIORITY - + 100; // Start quite late to ensure asset model etc. are initialised + + 100; // Start quite late to ensure asset model etc. are initialized protected AssetProcessingService assetProcessingService; protected AssetStorageService assetStorageService; protected ClientEventService clientEventService; @@ -516,7 +516,7 @@ protected void undeployAgent(String agentId) { try { protocol.stop(container); } catch (Exception e) { - LOG.log(Level.SEVERE, "Protocol instance threw an exception whilst being stopped", e); + LOG.log(Level.SEVERE, "Protocol instance threw an exception while being stopped", e); } // Remove child asset subscriptions for this agent @@ -657,7 +657,7 @@ protected boolean onAttributeEventIntercepted(EntityManager em, AttributeEvent e } throw new AssetProcessingException( failure, - "An exception occurred whilst the protocol was trying to process the attribute write request: agentLink=" + "An exception occurred while the protocol was trying to process the attribute write request: agentLink=" + agentLink + ", msg=" + msg); @@ -671,7 +671,7 @@ protected boolean onAttributeEventIntercepted(EntityManager em, AttributeEvent e * Called when an {@link AttributeEvent} for an {@link Agent} is broadcast on the client event bus * (i.e. the attribute has been updated in the DB). * - *

We use this to try and react to agent changes in a generic way by re-initialising the agent + *

We use this to try and react to agent changes in a generic way by re-initializing the agent * to simplify each agent implementation. */ // TODO: Queue up agent attribute events and do a single agent replacement @@ -736,7 +736,7 @@ protected void onAgentAttributeEvent(AttributeEvent event) { return attributes .filter( attribute -> - // Exclude attributes without agent link or with agent link to not recognised agents + // Exclude attributes without agent link or with agent link to not recognized agents // (could be gateway agents) attribute .getMetaValue(AGENT_LINK) @@ -880,7 +880,7 @@ public Future doProtocolInstanceDiscovery( Future discoveryFuture = instanceDiscovery.startInstanceDiscovery(onDiscovered); discoveryFuture.get(); } catch (InterruptedException e) { - LOG.fine("Protocol instance discovery was cancelled"); + LOG.fine("Protocol instance discovery was canceled"); } catch (Exception e) { LOG.log( Level.WARNING, @@ -928,7 +928,7 @@ public Future doProtocolAssetDiscovery( Future discoveryFuture = assetDiscovery.startAssetDiscovery(onDiscovered); discoveryFuture.get(); } catch (InterruptedException e) { - LOG.fine("Protocol asset discovery was cancelled"); + LOG.fine("Protocol asset discovery was canceled"); } catch (Exception e) { LOG.log(Level.WARNING, "Failed to do protocol asset discovery: Agent = " + agent, e); } finally { @@ -974,7 +974,7 @@ public Future doProtocolAssetImport( Future discoveryFuture = assetImport.startAssetImport(fileData, onDiscovered); discoveryFuture.get(); } catch (InterruptedException e) { - LOG.fine("Protocol asset import was cancelled"); + LOG.fine("Protocol asset import was canceled"); } catch (Exception e) { LOG.log(Level.WARNING, "Failed to do protocol asset import: Agent = " + agent, e); } finally { diff --git a/manager/src/main/java/org/openremote/manager/asset/AssetProcessingService.java b/manager/src/main/java/org/openremote/manager/asset/AssetProcessingService.java index 089ca47276..0b55ce0290 100644 --- a/manager/src/main/java/org/openremote/manager/asset/AssetProcessingService.java +++ b/manager/src/main/java/org/openremote/manager/asset/AssetProcessingService.java @@ -327,7 +327,7 @@ public void stop(Container container) throws Exception {} @Override public void configure() throws Exception { - // All user authorisation checks MUST have been carried out before events reach this queue + // All user authorization checks MUST have been carried out before events reach this queue from(ATTRIBUTE_EVENT_PROCESSOR) .routeId("AttributeEvent-Processor") .routeConfigurationId(ATTRIBUTE_EVENT_ROUTE_CONFIG_ID) @@ -421,7 +421,7 @@ protected boolean processAttributeEvent(AttributeEvent event) throws AssetProces Event result = persistenceService.doReturningTransaction( em -> { - // TODO: Retrieve optimised DTO rather than whole asset + // TODO: Retrieve optimized DTO rather than whole asset Asset asset = assetStorageService.find(em, event.getId(), true); if (asset == null) { diff --git a/manager/src/main/java/org/openremote/manager/asset/AssetResourceImpl.java b/manager/src/main/java/org/openremote/manager/asset/AssetResourceImpl.java index 316f9baf1b..c9c89810f8 100644 --- a/manager/src/main/java/org/openremote/manager/asset/AssetResourceImpl.java +++ b/manager/src/main/java/org/openremote/manager/asset/AssetResourceImpl.java @@ -485,7 +485,7 @@ public AttributeWriteResult writeAttributeValue( AttributeEvent event = new AttributeEvent(assetId, attributeName, value, timestamp); - // Check authorisation + // Check authorization if (!clientEventService.authorizeEventWrite(getRequestRealmName(), getAuthContext(), event)) { throw new ForbiddenException("Cannot write specified attribute: " + event); } diff --git a/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java b/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java index 8da18d4b57..0cd629b34a 100644 --- a/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java +++ b/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java @@ -792,7 +792,7 @@ public > T merge( boolean overrideVersionTemp = overrideVersion; if (existingAsset.isDeletePending()) { - LOG.info("Cancelling pending asset deletion: assetId=" + assetId); + LOG.info("Canceling pending asset deletion: assetId=" + assetId); existingAsset.setDeletePending(false); failedAssetDeleteIds.remove(assetId); em.flush(); @@ -2182,7 +2182,7 @@ protected boolean updateAttributeValue(EntityManager em, AttributeEvent event) + timestamp + "}"); - // TODO: Use jsonb type directly to optimise over wire data (couldn't get this to work even + // TODO: Use jsonb type directly to optimize over wire data (couldn't get this to work even // after seeing // https://stackoverflow.com/questions/53847917/postgresql-throws-column-is-of-type-jsonb-but-expression-is-of-type-bytea-with) Query query = diff --git a/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.java b/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.java index d077d7e188..e1d166cd9b 100644 --- a/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.java +++ b/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.java @@ -189,7 +189,7 @@ public static ConsoleAsset initConsoleAsset(ConsoleRegistration consoleRegistrat return new ConsoleAsset(consoleRegistration.getName()); } - /** This is synchronised to ensure only a single parent is created. */ + /** This is synchronized to ensure only a single parent is created. */ public synchronized String getConsoleParentAssetId(String realm) { String id = realmConsoleParentMap.get(realm); diff --git a/manager/src/main/java/org/openremote/manager/datapoint/ApplyPredictedDataPointsService.java b/manager/src/main/java/org/openremote/manager/datapoint/ApplyPredictedDataPointsService.java index 657bbd0fd6..3483618dd4 100644 --- a/manager/src/main/java/org/openremote/manager/datapoint/ApplyPredictedDataPointsService.java +++ b/manager/src/main/java/org/openremote/manager/datapoint/ApplyPredictedDataPointsService.java @@ -153,7 +153,7 @@ protected void processDueEntries() { * processing. */ protected void scheduleNext() { - // Cancelling and scheduling must be atomic with reading the queue head, otherwise a concurrent + // Canceling and scheduling must be atomic with reading the queue head, otherwise a concurrent // caller can // cancel a live schedule and leave a queued entry without one synchronized (scheduleLock) { diff --git a/manager/src/main/java/org/openremote/manager/event/ClientEventService.java b/manager/src/main/java/org/openremote/manager/event/ClientEventService.java index 00c4144335..db380fbb86 100644 --- a/manager/src/main/java/org/openremote/manager/event/ClientEventService.java +++ b/manager/src/main/java/org/openremote/manager/event/ClientEventService.java @@ -117,7 +117,7 @@ protected static class SessionDispatchState { public static final int PRIORITY = ManagerWebService.PRIORITY - 200; protected static final int MAX_QUEUE_SIZE = 100; protected static final String WEBSOCKET_URI = - "undertow://ws://0.0.0.0/websocket/events?fireWebSocketChannelEvents=true&sendTimeout=15000"; // Host is not used as existing undertow instance is utilised + "undertow://ws://0.0.0.0/websocket/events?fireWebSocketChannelEvents=true&sendTimeout=15000"; // Host is not used as existing undertow instance is utilized protected static final System.Logger LOG = System.getLogger(ClientEventService.class.getName()); protected static final String PUBLISH_QUEUE = "direct://ClientPublishQueue"; @@ -574,7 +574,7 @@ void procesInboundEvent(Exchange exchange) { LOG.log( TRACE, () -> - "Cancelling subscription for session '" + "Canceling subscription for session '" + sessionKey + "': " + cancelEventSubscription); @@ -680,7 +680,7 @@ protected void sendToSubscribers(T event) { } /** - * Authorisation must be done before adding the subscription and is the responsibility of + * Authorization must be done before adding the subscription and is the responsibility of * subscription creators. */ public void addSubscription( @@ -724,7 +724,7 @@ public void addEventAuthorizer(EventAuthorizer authorizer) { } /** - * This handles basic authorisation checks for clients that want to subscribe to events in the + * This handles basic authorization checks for clients that want to subscribe to events in the * system */ public boolean authorizeEventSubscription( @@ -737,7 +737,7 @@ public boolean authorizeEventSubscription( if (authContext != null) { LOG.log( DEBUG, - "Client not authorised to subscribe: subscription=" + "Client not authorized to subscribe: subscription=" + subscription + ", requestRealm=" + realm @@ -748,7 +748,7 @@ public boolean authorizeEventSubscription( } else { LOG.log( DEBUG, - "Client not authorised to subscribe: subscription=" + "Client not authorized to subscribe: subscription=" + subscription + ", requestRealm=" + realm @@ -760,7 +760,7 @@ public boolean authorizeEventSubscription( } /** - * This handles basic authorisation checks for clients that want to write an event to the system; + * This handles basic authorization checks for clients that want to write an event to the system; * this gets hit a lot so should be as performant as possible */ // TODO: Implement auth cache in OR that covers HTTP, WS and MQTT (ActiveMQ Authorization cache @@ -776,7 +776,7 @@ public boolean authorizeEventWrite( LOG.log( DEBUG, () -> - "Client not authorised to send event: type=" + "Client not authorized to send event: type=" + event.getEventType() + ", requestRealm=" + realm @@ -788,7 +788,7 @@ public boolean authorizeEventWrite( LOG.log( DEBUG, () -> - "Client not authorised to send event: type=" + "Client not authorized to send event: type=" + event.getEventType() + ", requestRealm=" + realm diff --git a/manager/src/main/java/org/openremote/manager/event/UndertowHost.java b/manager/src/main/java/org/openremote/manager/event/UndertowHost.java index 556ed6d8ab..de64fe2aa3 100644 --- a/manager/src/main/java/org/openremote/manager/event/UndertowHost.java +++ b/manager/src/main/java/org/openremote/manager/event/UndertowHost.java @@ -31,7 +31,7 @@ import org.openremote.model.Container; /** - * Customised to use existing undertow instance so websocket doesn't have to be on a separate web + * Customized to use existing undertow instance so websocket doesn't have to be on a separate web * server instance */ // TODO: Move realm into request URI if possible and remove Realm query parameter support diff --git a/manager/src/main/java/org/openremote/manager/gateway/GatewayClientConnector.java b/manager/src/main/java/org/openremote/manager/gateway/GatewayClientConnector.java index 594af46551..9368cbf8ec 100644 --- a/manager/src/main/java/org/openremote/manager/gateway/GatewayClientConnector.java +++ b/manager/src/main/java/org/openremote/manager/gateway/GatewayClientConnector.java @@ -75,9 +75,9 @@ * is returned with {@code tunnelingSupported:true|false}. Each tunnel start request contains * the public SSH hostname and port to use (which don't actually change from one request to * the next) - *

  • 1.0.0 - Refactor to improve connection synchronisation and also to support active tunnel - * synchronisation. A {@link GatewayInitStartEvent} is sent with a list of active tunnels, - * gateway API version and tunnel public hostname and port; the client can then synchronise + *
  • 1.0.0 - Refactor to improve connection synchronization and also to support active tunnel + * synchronization. A {@link GatewayInitStartEvent} is sent with a list of active tunnels, + * gateway API version and tunnel public hostname and port; the client can then synchronize * the SSH sessions (for reconnections) and should also send a {@link AssetsEvent} with all * the edge gatewway assets (without attributes) and this replaces the initial {@link * ReadAssetsEvent} that previous versions would send. {@link @@ -146,7 +146,7 @@ public void close() throws Exception { } catch (Exception e) { LOG.log( Level.WARNING, - "An exception occurred whilst trying to disconnect the gateway IO client", + "An exception occurred while trying to disconnect the gateway IO client", e); } finally { client = null; @@ -251,7 +251,7 @@ protected void onClientConnectionStatusChanged(ConnectionStatus connectionStatus if (connectionStatus == ConnectionStatus.CONNECTED) { LOG.info( - "Gateway client initialisation complete API version is '" + "Gateway client initialization complete API version is '" + gatewayAPIVersion + "': " + connection); @@ -313,7 +313,7 @@ protected void onCentralManagerMessage(String message) { case GatewayInitDoneEvent initDoneEvent -> { initFuture.complete(null); } - // The central manager sends N number of these to synchronise gateway descendant assets on the + // The central manager sends N number of these to synchronize gateway descendant assets on the // central manager case ReadAssetsEvent readAssets -> { if (gatewayAPIVersion == null) { @@ -335,14 +335,14 @@ protected void onCentralManagerMessage(String message) { responseEvent.setMessageID(event.getMessageID()); sendCentralManagerMessage(responseEvent); } - // This event is only sent once asset synchronisation has completed but before init done + // This event is only sent once asset synchronization has completed but before init done case GatewayCapabilitiesRequestEvent capabilitiesRequestEvent -> { if (gatewayAPIVersion == null) { // This is a legacy version of the openremote on the central instance so we won't get a // GatewayInitialisedEvent // so we mark this client as connected now LOG.info( - "Central manager running an older version so assuming connection is initialised"); + "Central manager running an older version so assuming connection is initialized"); initFuture.complete(null); } @@ -431,7 +431,7 @@ protected void onCentralManagerMessage(String message) { } /** - * Synchronise the current active tunnel sessions async with what the central instance thinks are + * Synchronize the current active tunnel sessions async with what the central instance thinks are * open. */ protected void doTunnelSync(GatewayTunnelInfo[] activeTunnels) { @@ -441,9 +441,9 @@ protected void doTunnelSync(GatewayTunnelInfo[] activeTunnels) { Container.EXECUTOR.submit( () -> { - LOG.info("Synchronising gateway tunnel sessions with central instance: " + connection); + LOG.info("Synchronizing gateway tunnel sessions with central instance: " + connection); - // Synchronise the SSH sessions with what the central instance thinks are open + // Synchronize the SSH sessions with what the central instance thinks are open // Filter out any tunnels expiring in the next 5 seconds List tunnels = Arrays.stream(activeTunnels) @@ -705,7 +705,7 @@ protected void cancelAutoCloseTunnel(GatewayTunnelSession session) { ScheduledFuture task = tunnelAutoCloseTasks.remove(session); if (task != null) { task.cancel(false); - LOG.fine("Cancelled auto-close task for tunnel: " + session); + LOG.fine("Canceled auto-close task for tunnel: " + session); } } diff --git a/manager/src/main/java/org/openremote/manager/gateway/GatewayConnector.java b/manager/src/main/java/org/openremote/manager/gateway/GatewayConnector.java index 9bd9cd5b38..c1c5395631 100644 --- a/manager/src/main/java/org/openremote/manager/gateway/GatewayConnector.java +++ b/manager/src/main/java/org/openremote/manager/gateway/GatewayConnector.java @@ -148,7 +148,7 @@ protected void sendMessageToGateway(Object message) { } } - /** Connection for this gateway has started so initiate synchronisation of assets */ + /** Connection for this gateway has started so initiate synchronization of assets */ protected void connected( String sessionId, Consumer gatewayMessageConsumer, Runnable requestDisconnect) { @@ -180,7 +180,7 @@ protected void connected( startSync(); } - /** Connection to the edge gateway instance has been disconnected so stop any synchronisation */ + /** Connection to the edge gateway instance has been disconnected so stop any synchronization */ protected void disconnected(String sessionId) { synchronized (this.sessionId) { if (!sessionId.equals(this.sessionId.get())) { @@ -277,7 +277,7 @@ protected void getCapabilities() { } } // Let the gateway know init is complete - LOG.info("Gateway fully initialised: " + getGatewayIdString()); + LOG.info("Gateway fully initialized: " + getGatewayIdString()); sendMessageToGateway(new GatewayInitDoneEvent()); tunnellingSupported = response != null && response.isTunnelingSupported(); @@ -470,23 +470,23 @@ protected synchronized void onGatewayEvent(SharedEvent e) { } /** - * Explicitly check event type and authorise accordingly don't blindly accept events from gateway + * Explicitly check event type and authorize accordingly don't blindly accept events from gateway * clients as they may be malicious - every event type added to {@link #eventConsumerMap} should * be handled */ protected SharedEvent authoriseGatewayEvent(SharedEvent event) { - // Gateway capabilities response events are always authorised + // Gateway capabilities response events are always authorized if (event instanceof GatewayCapabilitiesResponseEvent) { return event; } - // Gateway tunnel start/stop response events are always authorised + // Gateway tunnel start/stop response events are always authorized if (event instanceof GatewayTunnelStartResponseEvent || event instanceof GatewayTunnelStopResponseEvent) { return event; } - // Only some attribute and asset events are authorised + // Only some attribute and asset events are authorized if (event instanceof AssetInfo assetInfo) { // Map the gateway Asset ID to the central instance @@ -517,7 +517,7 @@ protected SharedEvent authoriseGatewayEvent(SharedEvent event) { return null; } - /** Get list of gateway assets (get basic details and then batch load them to minimise load) */ + /** Get list of gateway assets (get basic details and then batch load them to minimize load) */ protected synchronized void startSync() { if (syncAborted()) { return; @@ -600,7 +600,7 @@ protected void requestAssets() { expectedSyncResponseName = ASSET_READ_EVENT_NAME_BATCH + syncIndex; LOG.fine( - "Synchronising assets " + "Synchronizing assets " + (syncIndex + 1) + "-" + (syncIndex + requestAssetIds.length) diff --git a/manager/src/main/java/org/openremote/manager/gateway/GatewayService.java b/manager/src/main/java/org/openremote/manager/gateway/GatewayService.java index 421cff9e25..fe391fd8c3 100644 --- a/manager/src/main/java/org/openremote/manager/gateway/GatewayService.java +++ b/manager/src/main/java/org/openremote/manager/gateway/GatewayService.java @@ -75,7 +75,7 @@ * Manages {@link org.openremote.model.asset.impl.GatewayAsset}s in the local instance by creating * Keycloak clients for them and handles the connection logic of gateways; it is the gateways * responsibility to connect to this instance, it is then up to this instance to authenticate the - * gateway and to initiate synchronisation of gateway assets. + * gateway and to initiate synchronization of gateway assets. * *

    Also adds an {@link AttributeEventInterceptor} to consume any {@link AttributeEvent} destined * for a {@link GatewayAsset} descendant {@link Asset} and routes them to the underlying gateway for @@ -659,12 +659,12 @@ public GatewayTunnelInfo startTunnel(GatewayTunnelInfo tunnelInfo) } catch (ExecutionException e) { if (e.getCause() instanceof TimeoutException) { String msg = - "Failed to start tunnel: A timeout occurred whilst waiting for the tunnel to be started: id=" + "Failed to start tunnel: A timeout occurred while waiting for the tunnel to be started: id=" + gatewayId; LOG.log(Level.WARNING, msg); } else { String msg = - "Failed to start tunnel: An error occurred whilst waiting for the tunnel to be started: id=" + "Failed to start tunnel: An error occurred while waiting for the tunnel to be started: id=" + gatewayId + ", error=" + e.getCause().getMessage(); @@ -724,13 +724,13 @@ public void stopTunnel(GatewayTunnelInfo tunnelInfo) stopFuture.get(20, TimeUnit.SECONDS); } catch (ExecutionException e) { String msg = - "Failed to stop tunnel: An error occurred whilst waiting for the tunnel to be stopped: id=" + "Failed to stop tunnel: An error occurred while waiting for the tunnel to be stopped: id=" + tunnelInfo.getGatewayId(); LOG.log(Level.WARNING, msg, e.getCause()); throw new RuntimeException(msg, e.getCause()); } catch (InterruptedException | TimeoutException e) { String msg = - "Failed to stop tunnel: An error occurred whilst waiting for the tunnel to be stopped: id=" + "Failed to stop tunnel: An error occurred while waiting for the tunnel to be stopped: id=" + tunnelInfo.getGatewayId(); LOG.warning(msg); throw new RuntimeException(msg); @@ -746,7 +746,7 @@ public boolean isLocallyRegisteredGateway(String assetId) { /** Check if the specified asset ID or parent ID is a known gateway or descendant of a gateway. */ public String getLocallyRegisteredGatewayId(String assetId, String parentId) { - // ConcurrentHashMap rejects null keys so preserve HashMap behaviour of mapping to null + // ConcurrentHashMap rejects null keys so preserve HashMap behavior of mapping to null String gatewayId = assetId != null ? assetIdGatewayIdMap.get(assetId) : null; if (gatewayId != null) { @@ -772,7 +772,7 @@ protected void processGatewayConnected(String realm, String gatewayClientId, Str if (connector == null) { LOG.warning( - "Gateway connected but not recognised which shouldn't happen: GatewayID=" + gatewayId); + "Gateway connected but not recognized which shouldn't happen: GatewayID=" + gatewayId); clientEventService.sendToWebsocketSession( sessionId, new GatewayDisconnectEvent(GatewayDisconnectEvent.Reason.UNRECOGNISED)); clientEventService.closeWebsocketSession(sessionId); diff --git a/manager/src/main/java/org/openremote/manager/map/MapService.java b/manager/src/main/java/org/openremote/manager/map/MapService.java index 4a8b0aac49..6a472b70d5 100644 --- a/manager/src/main/java/org/openremote/manager/map/MapService.java +++ b/manager/src/main/java/org/openremote/manager/map/MapService.java @@ -339,7 +339,7 @@ public Path setData(boolean skipCustom) { } } } catch (IOException | ClassNotFoundException | SQLException e) { - LOG.log(Level.WARNING, "An error occurred whilst trying to load custom map tiles file", e); + LOG.log(Level.WARNING, "An error occurred while trying to load custom map tiles file", e); } } @@ -366,7 +366,7 @@ public Path setData(boolean skipCustom) { } } } catch (ClassNotFoundException | SQLException e) { - LOG.log(Level.WARNING, "An error occurred whilst trying to load map tiles file", e); + LOG.log(Level.WARNING, "An error occurred while trying to load map tiles file", e); } } diff --git a/manager/src/main/java/org/openremote/manager/mqtt/ActiveMQORSecurityManager.java b/manager/src/main/java/org/openremote/manager/mqtt/ActiveMQORSecurityManager.java index 5eee2ca688..89f286798b 100644 --- a/manager/src/main/java/org/openremote/manager/mqtt/ActiveMQORSecurityManager.java +++ b/manager/src/main/java/org/openremote/manager/mqtt/ActiveMQORSecurityManager.java @@ -206,7 +206,7 @@ protected boolean verifyRights(Subject subject, String address, boolean isWrite) return false; } - // See if a custom handler wants to handle authorisation for this topic pub/sub + // See if a custom handler wants to handle authorization for this topic pub/sub for (MQTTHandler handler : brokerService.getCustomHandlers()) { if (handler.handlesTopic(topic)) { LOG.finest( @@ -229,7 +229,7 @@ protected boolean verifyRights(Subject subject, String address, boolean isWrite) LOG.finest( "Handler '" + handler.getName() - + "' has authorised " + + "' has authorized " + (isWrite ? "pub" : "sub") + ": topic=" + topic @@ -239,7 +239,7 @@ protected boolean verifyRights(Subject subject, String address, boolean isWrite) LOG.finest( "Handler '" + handler.getName() - + "' has not authorised " + + "' has not authorized " + (isWrite ? "pub" : "sub") + ": topic=" + topic diff --git a/manager/src/main/java/org/openremote/manager/mqtt/ConnectionMonitorHandler.java b/manager/src/main/java/org/openremote/manager/mqtt/ConnectionMonitorHandler.java index dabf016997..97ac5ae7d0 100644 --- a/manager/src/main/java/org/openremote/manager/mqtt/ConnectionMonitorHandler.java +++ b/manager/src/main/java/org/openremote/manager/mqtt/ConnectionMonitorHandler.java @@ -155,7 +155,7 @@ public void start(Container container) throws Exception { // Don't block start executorService.submit( () -> { - // Get all assets that have attributes with user connected meta and initialise them + // Get all assets that have attributes with user connected meta and initialize them List> assets = assetStorageService.findAll( new AssetQuery() diff --git a/manager/src/main/java/org/openremote/manager/mqtt/DefaultMQTTHandler.java b/manager/src/main/java/org/openremote/manager/mqtt/DefaultMQTTHandler.java index b377eb25ad..db80a4ec2c 100644 --- a/manager/src/main/java/org/openremote/manager/mqtt/DefaultMQTTHandler.java +++ b/manager/src/main/java/org/openremote/manager/mqtt/DefaultMQTTHandler.java @@ -71,7 +71,7 @@ public class DefaultMQTTHandler extends MQTTHandler { private static final Logger LOG = SyslogCategory.getLogger(API, DefaultMQTTHandler.class); protected final Map>> sessionSubscriptionConsumers = new ConcurrentHashMap<>(); - // An authorisation cache for publishing + // An authorization cache for publishing // TODO: Switch to caffeine library once ActiveMQ has migrated protected final Cache> authorizationCache = CacheBuilder.newBuilder() @@ -288,7 +288,7 @@ public boolean canSubscribe(RemotingConnection connection, AuthContext authConte return true; } - // We make heavy use of authorisation caching as clients can hit this a lot and it is currently + // We make heavy use of authorization caching as clients can hit this a lot and it is currently // quite slow with DB calls @Override public boolean canPublish(RemotingConnection connection, AuthContext authContext, Topic topic) { @@ -335,7 +335,7 @@ public boolean canPublish(RemotingConnection connection, AuthContext authContext if (!clientEventService.authorizeEventWrite( topicRealm(topic), authContext, buildAttributeEvent(topic.getTokens(), null, null))) { LOG.fine( - "Publish was not authorised for this user and topic: topic=" + "Publish was not authorized for this user and topic: topic=" + topic + ", subject=" + authContext); diff --git a/manager/src/main/java/org/openremote/manager/mqtt/MQTTBrokerService.java b/manager/src/main/java/org/openremote/manager/mqtt/MQTTBrokerService.java index 45a2c2cca1..10a918a149 100644 --- a/manager/src/main/java/org/openremote/manager/mqtt/MQTTBrokerService.java +++ b/manager/src/main/java/org/openremote/manager/mqtt/MQTTBrokerService.java @@ -260,7 +260,7 @@ public MeterRegistry getRegistry() { // TODO: Make auto provisioning clients disconnect and reconnect with credentials or pass // through X.509 certificates for auth - // Cannot use authentication or authorisation cache as auto provisioning MQTT clients will + // Cannot use authentication or authorization cache as auto provisioning MQTT clients will // authenticate as anonymous and this is then baked into the created ServerSession and cannot be // modified // so all anonymous sessions will use the same username/password for key lookups in the caches - @@ -284,7 +284,7 @@ public MeterRegistry getRegistry() { } catch (Exception e) { LOG.log( WARNING, - "MQTT custom handler threw an exception whilst initialising: handler=" + "MQTT custom handler threw an exception while initializing: handler=" + handler.getName(), e); throw e; @@ -365,7 +365,7 @@ public void start(Container container) throws Exception { } catch (Exception e) { LOG.log( WARNING, - "MQTT custom handler threw an exception whilst starting: handler=" + handler.getName(), + "MQTT custom handler threw an exception while starting: handler=" + handler.getName(), e); throw e; } @@ -439,7 +439,7 @@ public void stop(Container container) throws Exception { } catch (Exception e) { LOG.log( WARNING, - "MQTT custom handler threw an exception whilst stopping: handler=" + "MQTT custom handler threw an exception while stopping: handler=" + handler.getName(), e); } diff --git a/manager/src/main/java/org/openremote/manager/mqtt/MQTTHandler.java b/manager/src/main/java/org/openremote/manager/mqtt/MQTTHandler.java index 33702615a6..f27c3a6257 100644 --- a/manager/src/main/java/org/openremote/manager/mqtt/MQTTHandler.java +++ b/manager/src/main/java/org/openremote/manager/mqtt/MQTTHandler.java @@ -75,7 +75,7 @@ public abstract class MQTTHandler { /** * Gets the priority of this handler which is used to determine the call order; handlers with a - * lower priority are initialised and started first. + * lower priority are initialized and started first. */ public int getPriority() { return 0; @@ -86,7 +86,7 @@ public String getName() { return this.getClass().getSimpleName(); } - /** Called when the system starts to allow for initialisation. */ + /** Called when the system starts to allow for initialization. */ public void init(Container container, Configuration serverConfiguration) throws Exception { mqttBrokerService = container.getService(MQTTBrokerService.class); clientEventService = container.getService(ClientEventService.class); @@ -107,7 +107,7 @@ public void init(Container container, Configuration serverConfiguration) throws addPublishTopicServerConfiguration(container, serverConfiguration); } - /** Called when the system starts to allow for initialisation. */ + /** Called when the system starts to allow for initialization. */ public void start(Container container) throws Exception { clientSession = mqttBrokerService.createSession(); @@ -213,7 +213,7 @@ protected void addPublishConsumer(String topic) throws Exception { } catch (Exception e) { getLogger() .info( - "An error occurred whilst handling onPublish to topic '" + "An error occurred while handling onPublish to topic '" + topic + "': clientID=" + clientID); @@ -360,14 +360,14 @@ public void publishMessage(String topic, Object data, MqttQoS qoS) { protected abstract Logger getLogger(); /** - * Called to authorise a subscription if {@link #handlesTopic} returned true; should return true + * Called to authorize a subscription if {@link #handlesTopic} returned true; should return true * if the subscription is allowed otherwise return false. */ public abstract boolean canSubscribe( RemotingConnection connection, AuthContext authContext, Topic topic); /** - * Called to authorise a publish if {@link #handlesTopic} returned true; should return true if the + * Called to authorize a publish if {@link #handlesTopic} returned true; should return true if the * publish is allowed otherwise return false. */ public abstract boolean canPublish( diff --git a/manager/src/main/java/org/openremote/manager/mqtt/UserAssetProvisioningMQTTHandler.java b/manager/src/main/java/org/openremote/manager/mqtt/UserAssetProvisioningMQTTHandler.java index 7d368e7110..7aedc12d5a 100644 --- a/manager/src/main/java/org/openremote/manager/mqtt/UserAssetProvisioningMQTTHandler.java +++ b/manager/src/main/java/org/openremote/manager/mqtt/UserAssetProvisioningMQTTHandler.java @@ -432,7 +432,7 @@ public boolean canPublish(RemotingConnection connection, AuthContext authContext // Requests and their responses are two halves of one exchange on a device wide topic pair, so // only the connection that owns the response topic may publish requests. Without this an - // unauthorised client could push errors into a legitimate device's handshake, or make the + // unauthorized client could push errors into a legitimate device's handshake, or make the // manager do certificate validation work on messages it will never answer to that client. if (!ownsResponseTopic(connection, topic)) { LOG.fine( @@ -1028,7 +1028,7 @@ public static Asset getCreateClientAsset( .orElseThrow( () -> new RuntimeException( - "Failed to de-serialise asset template into an asset instance: " + "Failed to deserialize asset template into an asset instance: " + provisioningConfig)); // Set ID and realm diff --git a/manager/src/main/java/org/openremote/manager/notification/EmailNotificationHandler.java b/manager/src/main/java/org/openremote/manager/notification/EmailNotificationHandler.java index 63ed4f89f4..f1b23f3b05 100644 --- a/manager/src/main/java/org/openremote/manager/notification/EmailNotificationHandler.java +++ b/manager/src/main/java/org/openremote/manager/notification/EmailNotificationHandler.java @@ -367,7 +367,7 @@ true, new StringPredicate(User.SYSTEM_ACCOUNT_ATTRIBUTE)), } if (devMode && mappedTargets.isEmpty() && targets != null && !targets.isEmpty()) { - // Keep the no-targets behaviour identical to production but make the dropped notification + // Keep the no-targets behavior identical to production but make the dropped notification // visible LOG.info( "Dev mode: no email recipients mapped for email notification, original targets=[" diff --git a/manager/src/main/java/org/openremote/manager/notification/NotificationProcessingException.java b/manager/src/main/java/org/openremote/manager/notification/NotificationProcessingException.java index 26ac990864..1221be0c9f 100644 --- a/manager/src/main/java/org/openremote/manager/notification/NotificationProcessingException.java +++ b/manager/src/main/java/org/openremote/manager/notification/NotificationProcessingException.java @@ -53,7 +53,7 @@ public enum Reason { */ INVALID_MESSAGE, - /** An error occurred whilst trying to map target IDs to actual targets. */ + /** An error occurred while trying to map target IDs to actual targets. */ ERROR_TARGET_MAPPING, /** {@link NotificationHandler} failed to return any results. */ diff --git a/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.java b/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.java index ba046c8e8a..3b721021ed 100644 --- a/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.java +++ b/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.java @@ -265,7 +265,7 @@ protected void verifyAccess(SentNotification sentNotification, String targetId) "Anonymous request can only update public assets not linked to a user", FORBIDDEN); } - // Disabled until console permissions finalised + // Disabled until console permissions finalized // if (assetStorageService.isUserAsset(asset.getId())) { // LOG.fine("DENIED: Anonymous request to update a notification sent to an // asset that is linked to one or more users"); diff --git a/manager/src/main/java/org/openremote/manager/notification/PushNotificationHandler.java b/manager/src/main/java/org/openremote/manager/notification/PushNotificationHandler.java index 5414ed1891..9f506d8173 100644 --- a/manager/src/main/java/org/openremote/manager/notification/PushNotificationHandler.java +++ b/manager/src/main/java/org/openremote/manager/notification/PushNotificationHandler.java @@ -113,7 +113,7 @@ public void init(Container container) throws Exception { FirebaseApp.initializeApp(options); valid = true; } catch (Exception ex) { - LOG.severe("Exception occurred whilst initialising FCM"); + LOG.severe("Exception occurred while initializing FCM"); } } @@ -417,7 +417,7 @@ public List getTargets( } if (devMode && mappedTargets.isEmpty() && targets != null && !targets.isEmpty()) { - // Keep the no-targets behaviour identical to production but make the dropped notification + // Keep the no-targets behavior identical to production but make the dropped notification // visible LOG.info( "Dev mode: no console asset targets mapped for push notification, original targets=[" @@ -627,7 +627,7 @@ protected static Message buildFCMMessage(long id, PushNotificationMessage pushMe apnsConfigBuilder.putHeader( "apns-priority", !dataOnly ? "10" : "5"); // Don't use 10 for data only - // set the following APNS flag to allow console to customise the notification before delivery + // set the following APNS flag to allow console to customize the notification before delivery // and to ensure delivery apsBuilder.setMutableContent(true); diff --git a/manager/src/main/java/org/openremote/manager/rules/AssetLocationPredicateConsumer.java b/manager/src/main/java/org/openremote/manager/rules/AssetLocationPredicateConsumer.java index b30213031c..0a100282e7 100644 --- a/manager/src/main/java/org/openremote/manager/rules/AssetLocationPredicateConsumer.java +++ b/manager/src/main/java/org/openremote/manager/rules/AssetLocationPredicateConsumer.java @@ -24,7 +24,7 @@ public interface AssetLocationPredicateConsumer { /** - * Called when one or more asset's location predicate rules change; the initialising flag + * Called when one or more asset's location predicate rules change; the initializing flag * indicates if the */ void accept(RulesEngine t, List u); diff --git a/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java b/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java index 194bd67b01..123d009dc5 100644 --- a/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java +++ b/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java @@ -818,7 +818,7 @@ public void start(RulesFacts facts) { this.scheduledActionConsumer); }); - // Initialise asset states + // Initialize asset states onAssetStatesChanged(facts, null); } diff --git a/manager/src/main/java/org/openremote/manager/rules/RulesEngine.java b/manager/src/main/java/org/openremote/manager/rules/RulesEngine.java index 48ca53e3cd..7ffae720a4 100644 --- a/manager/src/main/java/org/openremote/manager/rules/RulesEngine.java +++ b/manager/src/main/java/org/openremote/manager/rules/RulesEngine.java @@ -532,7 +532,7 @@ protected void fireAllDeployments() { Set updateInfosCopy; Set retractInfosCopy; - // Synchronise attribute events and states + // Synchronize attribute events and states synchronized (insertInfos) { insertInfosCopy = new HashSet<>(insertInfos); updateInfosCopy = new HashSet<>(updateInfos); diff --git a/manager/src/main/java/org/openremote/manager/rules/RulesService.java b/manager/src/main/java/org/openremote/manager/rules/RulesService.java index 3710466db4..118d8363aa 100644 --- a/manager/src/main/java/org/openremote/manager/rules/RulesService.java +++ b/manager/src/main/java/org/openremote/manager/rules/RulesService.java @@ -386,7 +386,7 @@ public void stop(Container container) throws Exception { try { geofenceAssetAdapter.stop(container); } catch (Exception e) { - LOG.log(SEVERE, "Exception thrown whilst stopping geofence adapter", e); + LOG.log(SEVERE, "Exception thrown while stopping geofence adapter", e); } } @@ -1099,9 +1099,7 @@ protected void processModifiedGeofences() { } catch (Exception e) { LOG.log( - SEVERE, - "Exception thrown by geofence adapter whilst processing location predicates", - e); + SEVERE, "Exception thrown by geofence adapter while processing location predicates", e); } finally { // Clear modified assets ready for next batch assetsWithModifiedLocationPredicates.clear(); diff --git a/manager/src/main/java/org/openremote/manager/rules/RulesetDeployment.java b/manager/src/main/java/org/openremote/manager/rules/RulesetDeployment.java index e3fcffbe7a..5411f1e583 100644 --- a/manager/src/main/java/org/openremote/manager/rules/RulesetDeployment.java +++ b/manager/src/main/java/org/openremote/manager/rules/RulesetDeployment.java @@ -290,7 +290,7 @@ public boolean canStart() { return status != COMPILATION_ERROR && status != DISABLED && status != RulesetStatus.EXPIRED; } - /** Called when a ruleset is started (allows for initialisation tasks) */ + /** Called when a ruleset is started (allows for initialization tasks) */ public boolean start(RulesFacts facts) { if (!canStart()) { return false; diff --git a/manager/src/main/java/org/openremote/manager/rules/geofence/GeofenceAssetAdapter.java b/manager/src/main/java/org/openremote/manager/rules/geofence/GeofenceAssetAdapter.java index a108b6bec7..f94739050c 100644 --- a/manager/src/main/java/org/openremote/manager/rules/geofence/GeofenceAssetAdapter.java +++ b/manager/src/main/java/org/openremote/manager/rules/geofence/GeofenceAssetAdapter.java @@ -34,14 +34,14 @@ * change; if the {@link RulesEngine.AssetLocationPredicates#getLocationPredicates()} is null or * empty then it means that there are no longer any associated with that {@link Asset} so the * adapter should clear any that already exist on that {@link Asset}, it is the adapters job to - * maintain state if required (see initialising flag on {@link #processLocationPredicates}). + * maintain state if required (see initializing flag on {@link #processLocationPredicates}). * *

    How the geofences are implemented and 'pushed' to the {@link Asset}s is up to the adapter but * when a geofence is triggered on an asset then the asset should update its own location by posting * to the asset/location endpoint, the location value sent should be as follows: * *

      - *
    • Geofence Enter - Send geofence centre point as location (centre point should have been + *
    • Geofence Enter - Send geofence center point as location (center point should have been * provided in the geofence definition retrieved from the backend) *
    • Geofence Exit - Send null (this will clear the devices location and indicate that the asset * has left the geofence) diff --git a/manager/src/main/java/org/openremote/manager/rules/geofence/ORConsoleGeofenceAssetAdapter.java b/manager/src/main/java/org/openremote/manager/rules/geofence/ORConsoleGeofenceAssetAdapter.java index ee19791df8..610bc402dc 100644 --- a/manager/src/main/java/org/openremote/manager/rules/geofence/ORConsoleGeofenceAssetAdapter.java +++ b/manager/src/main/java/org/openremote/manager/rules/geofence/ORConsoleGeofenceAssetAdapter.java @@ -55,7 +55,7 @@ * This implementation is for handling geofences on console assets that support the OR Console * Geofence Provider (i.e. Android and iOS Consoles): * - *

      This adapter utilises push notifications to notify assets when their geofences change; a data + *

      This adapter utilizes push notifications to notify assets when their geofences change; a data * only (silent) push notification is sent to affected consoles/assets. Consoles can also manually * request their geofences (e.g. on startup) */ diff --git a/manager/src/main/java/org/openremote/manager/security/AuthorisationService.java b/manager/src/main/java/org/openremote/manager/security/AuthorisationService.java index 6aa2cb1a71..da2823c78f 100644 --- a/manager/src/main/java/org/openremote/manager/security/AuthorisationService.java +++ b/manager/src/main/java/org/openremote/manager/security/AuthorisationService.java @@ -22,7 +22,7 @@ import org.openremote.model.ContainerService; /** - * This service is intended to form a centralised authorisation service for all resources and + * This service is intended to form a centralized authorization service for all resources and * actions within the system. */ public class AuthorisationService implements ContainerService { diff --git a/manager/src/main/java/org/openremote/manager/security/ManagerIdentityProvider.java b/manager/src/main/java/org/openremote/manager/security/ManagerIdentityProvider.java index 49705385b0..b49772353b 100644 --- a/manager/src/main/java/org/openremote/manager/security/ManagerIdentityProvider.java +++ b/manager/src/main/java/org/openremote/manager/security/ManagerIdentityProvider.java @@ -36,7 +36,7 @@ import org.openremote.model.security.*; import org.openremote.model.util.TextUtil; -// TODO: Normalise interface for Basic and Keycloak providers and add client CRUD +// TODO: Normalize interface for Basic and Keycloak providers and add client CRUD /** * SPI for implementations used by {@link ManagerIdentityService}, provides CRUD of {@link User} and diff --git a/manager/src/main/java/org/openremote/manager/security/ManagerKeycloakIdentityProvider.java b/manager/src/main/java/org/openremote/manager/security/ManagerKeycloakIdentityProvider.java index 8308777fee..c23b18ce77 100644 --- a/manager/src/main/java/org/openremote/manager/security/ManagerKeycloakIdentityProvider.java +++ b/manager/src/main/java/org/openremote/manager/security/ManagerKeycloakIdentityProvider.java @@ -992,7 +992,7 @@ public Realm[] getRealms() { @Override public Realm getRealm(String name) { - // This gets hit a lot for event authorisation so caching added + // This gets hit a lot for event authorization so caching added try { return realmCache.get( name, diff --git a/manager/src/main/java/org/openremote/manager/syslog/SyslogService.java b/manager/src/main/java/org/openremote/manager/syslog/SyslogService.java index 53910fd702..9d66ba0085 100644 --- a/manager/src/main/java/org/openremote/manager/syslog/SyslogService.java +++ b/manager/src/main/java/org/openremote/manager/syslog/SyslogService.java @@ -332,7 +332,7 @@ protected void flushBatch() { } }); } catch (Exception e) { - LOG.log(Level.SEVERE, "Exception occurred whilst flushing the syslog", e); + LOG.log(Level.SEVERE, "Exception occurred while flushing the syslog", e); } } } diff --git a/manager/src/main/java/org/openremote/manager/system/HealthService.java b/manager/src/main/java/org/openremote/manager/system/HealthService.java index c157307984..45cdd88858 100644 --- a/manager/src/main/java/org/openremote/manager/system/HealthService.java +++ b/manager/src/main/java/org/openremote/manager/system/HealthService.java @@ -31,13 +31,13 @@ import org.openremote.model.util.MapAccess; /** - * This service is here to initialise the discovered {@link HealthStatusProvider}s and ({@link + * This service is here to initialize the discovered {@link HealthStatusProvider}s and ({@link * StatusResource} */ public class HealthService implements ContainerService { // /** - // * Customised {@link MicrometerRoutePolicy} to add SEDA queue metrics + // * Customized {@link MicrometerRoutePolicy} to add SEDA queue metrics // */ // protected static class SedaMicrometerRoutePolicy extends MicrometerRoutePolicy { // @Override diff --git a/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java b/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java index 685b14e29b..32f134bb6f 100644 --- a/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java +++ b/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java @@ -170,7 +170,7 @@ private OpenAPI loadOpenApiBase() { public void addApiClasses(Class apiClass) { if (this.initialised) { throw new IllegalStateException( - "API classes must be added before the service is initialised"); + "API classes must be added before the service is initialized"); } apiClasses.add(apiClass); } @@ -179,7 +179,7 @@ public void addApiClasses(Class apiClass) { public void addApiSingleton(Object singleton) { if (this.initialised) { throw new IllegalStateException( - "API singletons must be added before the service is initialised"); + "API singletons must be added before the service is initialized"); } apiSingletons.add(singleton); } diff --git a/model-util/src/main/java/org/openremote/model/util/AssetModelInfoExtension.java b/model-util/src/main/java/org/openremote/model/util/AssetModelInfoExtension.java index 37ef065a1e..28ef79a9a7 100644 --- a/model-util/src/main/java/org/openremote/model/util/AssetModelInfoExtension.java +++ b/model-util/src/main/java/org/openremote/model/util/AssetModelInfoExtension.java @@ -39,7 +39,7 @@ public class AssetModelInfoExtension extends Extension { public AssetModelInfoExtension() { - // Ensure the asset model is initialised + // Ensure the asset model is initialized ValueUtil.initialise(null); // Service loader doesn't seem to work so manually load the agent model provider ValueUtil.getModelProviders().add(new AgentModelProvider()); diff --git a/model/src/main/java/org/openremote/model/AssetModelProvider.java b/model/src/main/java/org/openremote/model/AssetModelProvider.java index 404277217e..290033a865 100644 --- a/model/src/main/java/org/openremote/model/AssetModelProvider.java +++ b/model/src/main/java/org/openremote/model/AssetModelProvider.java @@ -65,7 +65,7 @@ default AssetDescriptor[] getAssetDescriptors() { * Get {@link AttributeDescriptor}s that should be associated with the specified {@link Asset} * type; these are combined with any {@link AttributeDescriptor}s already associated with the * given {@link Asset} type. Any duplicate conflicts will generate an {@link - * IllegalStateException} during {@link ValueUtil} initialisation. + * IllegalStateException} during {@link ValueUtil} initialization. */ default Map>> getAttributeDescriptors() { return null; @@ -75,7 +75,7 @@ default Map>> getAttributeDescriptors( * Get {@link MetaItemDescriptor}s that should be associated with the specified {@link Asset} * type; these are combined with any {@link MetaItemDescriptor}s already associated with the given * {@link Asset} type. Any duplicate conflicts will generate an {@link IllegalStateException} - * during {@link ValueUtil} initialisation. + * during {@link ValueUtil} initialization. * *

      If {@link #useAutoScan} is true and this is also defined then the results will be combined * with those returned by scanning. @@ -88,7 +88,7 @@ default Map>> getMetaItemDescriptors() * Get {@link ValueDescriptor}s that should be associated with the specified {@link Asset} type; * these are combined with any {@link ValueDescriptor}s already associated with the given {@link * Asset} type. Any duplicate conflicts will generate an {@link IllegalStateException} during - * {@link ValueUtil} initialisation. Shouldn't contain any {@link ValueDescriptor}s of type array + * {@link ValueUtil} initialization. Shouldn't contain any {@link ValueDescriptor}s of type array * (i.e. ones obtained by calling {@link ValueDescriptor#asArray} or ones where {@link * ValueDescriptor#getType} returns a class that {@link Class#isArray} returns true for. * @@ -100,7 +100,7 @@ default Map>> getValueDescriptors() { } /** - * Called when the full Asset model has been initialised which gives {@link AssetModelProvider}s + * Called when the full Asset model has been initialized which gives {@link AssetModelProvider}s * the chance to do additional work (e.g. add constraints such as allowed values based on * available asset types). */ diff --git a/model/src/main/java/org/openremote/model/asset/Asset.java b/model/src/main/java/org/openremote/model/asset/Asset.java index 16eb982408..a1d0b233eb 100644 --- a/model/src/main/java/org/openremote/model/asset/Asset.java +++ b/model/src/main/java/org/openremote/model/asset/Asset.java @@ -289,7 +289,7 @@ public AssetDeserializer(JsonDeserializer> defaultDeserializer, Class deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { JavaType jType = getValueType(ctxt); if (jType != null) { - // Make the asset type info available to the attribute deserialiser + // Make the asset type info available to the attribute deserializer ctxt.setAttribute( ASSET_TYPE_INFO_ATTRIBUTE, ValueUtil.getAssetInfo(jType.getRawClass().getSimpleName()).orElse(null)); @@ -407,7 +407,7 @@ protected Asset() {} protected Asset(String name) { setName(name); - // Initialise required attributes + // Initialize required attributes ValueUtil.initialiseAssetAttributes(this); } diff --git a/model/src/main/java/org/openremote/model/asset/agent/Agent.java b/model/src/main/java/org/openremote/model/asset/agent/Agent.java index ef9bbc0bfa..838d6d087f 100644 --- a/model/src/main/java/org/openremote/model/asset/agent/Agent.java +++ b/model/src/main/java/org/openremote/model/asset/agent/Agent.java @@ -269,10 +269,10 @@ public T setUpdateOnWrite(boolean updateOnWrite) { /** * Indicates if the specified attribute name is a configuration attribute and therefore if an * {@link org.openremote.model.attribute.AttributeEvent} is detected for this attribute the agent - * should be stopped and restarted. The default behaviour is any attribute that has an {@link + * should be stopped and restarted. The default behavior is any attribute that has an {@link * AttributeDescriptor} defined on the {@link Agent} class or one of its' subclasses is considered * to be a configuration attribute for the agent; excluding {@link Agent#STATUS}. Agent's can - * override this behaviour as required. + * override this behavior as required. */ public boolean isConfigurationAttribute(String attributeName) { // This is an event for an agent so is it for an attribute that has a descriptor which is diff --git a/model/src/main/java/org/openremote/model/asset/agent/Protocol.java b/model/src/main/java/org/openremote/model/asset/agent/Protocol.java index a694c5ac45..86a277d38b 100644 --- a/model/src/main/java/org/openremote/model/asset/agent/Protocol.java +++ b/model/src/main/java/org/openremote/model/asset/agent/Protocol.java @@ -54,7 +54,7 @@ *

    • {@link #stop} * * - *

      Create/initialise protocol instance

      + *

      Create/initialize protocol instance

      * * If the {@link Agent} was deleted or {@link Agent#isDisabled} then nothing happens otherwise: * @@ -70,7 +70,7 @@ * * Each {@link Agent} asset has its' own {@link Protocol} instance and this instance is responsible * for managing only the attributes linked to that specific instance, it is up to the specific - * {@link Agent} type to initialise an instance of its' own {@link Protocol}. + * {@link Agent} type to initialize an instance of its' own {@link Protocol}. * *

      * @@ -96,7 +96,7 @@ * body will be an {@link AttributeEvent}. Each message also contains the target protocol name in * header {@link #ACTUATOR_TOPIC_TARGET_PROTOCOL}. * - *

      To simplify protocol development some common protocol behaviour is recommended for generic + *

      To simplify protocol development some common protocol behavior is recommended for generic * protocols: * *

      Inbound value conversion (Protocol -> Linked Attribute)

      @@ -135,7 +135,7 @@ *

      NOTE: That {@link #start} will always be called before {@link #linkAttribute} and {@link * #unlinkAttribute} will always be called before {@link #stop}. * - *

      The following summarises the method calls protocols should expect: + *

      The following summarizes the method calls protocols should expect: * *

      {@link Agent} asset is created/loaded: * @@ -224,7 +224,7 @@ default String prefixLogMessage(String msg) { * Called before any calls to {@link #linkAttribute} to allow the protocol to perform required * tasks with {@link ContainerService}s (e.g. register Camel routes). The protocol instance should * validate the settings defined in the associated {@link Agent}; but whether or not the protocol - * establishes a connection/ fully initialises at this time is up to the protocol implementation, + * establishes a connection/ fully initializes at this time is up to the protocol implementation, * it could be desirable to wait until {@link #linkAttribute} is called for the first time, or it * could be a connectionless protocol. If there is a configuration issue etc. then an appropriate * exception should be thrown and suitable logs made. @@ -263,7 +263,7 @@ default String prefixLogMessage(String msg) { /** * An Attribute event (write) has been requested for an attribute linked to this protocol; - * implementations should handle multithreaded requests or use some sort of synchronisation for + * implementations should handle multithreaded requests or use some sort of synchronization for * thread safety. The {@link AttributeEvent} will be enriched with data about the relating asset * and attribute. */ diff --git a/model/src/main/java/org/openremote/model/asset/impl/UnknownAsset.java b/model/src/main/java/org/openremote/model/asset/impl/UnknownAsset.java index 45b6df103f..4c23186efd 100644 --- a/model/src/main/java/org/openremote/model/asset/impl/UnknownAsset.java +++ b/model/src/main/java/org/openremote/model/asset/impl/UnknownAsset.java @@ -23,7 +23,7 @@ import org.openremote.model.asset.Asset; /** - * This is only needed so JPA can deserialise an Asset whose type doesn't match an entity otherwise + * This is only needed so JPA can deserialize an Asset whose type doesn't match an entity otherwise * it is un-used */ @Entity diff --git a/model/src/main/java/org/openremote/model/attribute/Attribute.java b/model/src/main/java/org/openremote/model/attribute/Attribute.java index ceb28ef935..ddf407a72a 100644 --- a/model/src/main/java/org/openremote/model/attribute/Attribute.java +++ b/model/src/main/java/org/openremote/model/attribute/Attribute.java @@ -131,7 +131,7 @@ public Attribute deserialize(JsonParser jp, DeserializationContext ctxt) thro } case "meta" -> { // findNonContextualValueDeserializer is slow so caching the result to speed up - // deserialisation + // deserialization if (metaDeserialiser == null) { metaDeserialiser = ctxt.findNonContextualValueDeserializer(META_MAP_TYPE); } @@ -145,7 +145,7 @@ public Attribute deserialize(JsonParser jp, DeserializationContext ctxt) thro } case "timestamp" -> attribute.timestamp = jp.getValueAsLong(); case "value" -> { - // // Can only deserialise value once we know its' type + // // Can only deserialize value once we know its' type // if (!typeFound) { // valueBuffer = new TokenBuffer(jp, ctxt); // valueBuffer.copyCurrentStructure(jp); diff --git a/model/src/main/java/org/openremote/model/attribute/AttributeEvent.java b/model/src/main/java/org/openremote/model/attribute/AttributeEvent.java index 24e0bcdfc3..5214fced5e 100644 --- a/model/src/main/java/org/openremote/model/attribute/AttributeEvent.java +++ b/model/src/main/java/org/openremote/model/attribute/AttributeEvent.java @@ -41,7 +41,7 @@ public class AttributeEvent extends SharedEvent implements AttributeInfo { static { - // Set the default view for serialisation + // Set the default view for serialization ValueUtil.JSON.setConfig(ValueUtil.JSON.getSerializationConfig().withView(Basic.class)); } diff --git a/model/src/main/java/org/openremote/model/attribute/AttributeExecuteStatus.java b/model/src/main/java/org/openremote/model/attribute/AttributeExecuteStatus.java index b3279a0d3f..410cb8622b 100644 --- a/model/src/main/java/org/openremote/model/attribute/AttributeExecuteStatus.java +++ b/model/src/main/java/org/openremote/model/attribute/AttributeExecuteStatus.java @@ -28,7 +28,7 @@ public enum AttributeExecuteStatus { /** Request repeating execution */ REQUEST_REPEATING(true), - /** Request that running execution be cancelled */ + /** Request that running execution be canceled */ REQUEST_CANCEL(true), /** Ready to be executed */ @@ -40,7 +40,7 @@ public enum AttributeExecuteStatus { /** Execution is currently running */ RUNNING(false), - /** Execution has been cancelled */ + /** Execution has been canceled */ CANCELLED(false); private final boolean write; diff --git a/model/src/main/java/org/openremote/model/attribute/MetaItem.java b/model/src/main/java/org/openremote/model/attribute/MetaItem.java index bb5925030f..2a99d89cad 100644 --- a/model/src/main/java/org/openremote/model/attribute/MetaItem.java +++ b/model/src/main/java/org/openremote/model/attribute/MetaItem.java @@ -34,7 +34,7 @@ @JsonSerialize(using = MetaItem.MetaItemSerializer.class) public class MetaItem extends AbstractNameValueHolder { - /** Serialise the meta item as just the value to make it less verbose */ + /** Serialize the meta item as just the value to make it less verbose */ @SuppressWarnings("rawtypes") public static class MetaItemSerializer extends StdSerializer { diff --git a/model/src/main/java/org/openremote/model/attribute/MetaMap.java b/model/src/main/java/org/openremote/model/attribute/MetaMap.java index e6bd34b7c6..d323e5b45d 100644 --- a/model/src/main/java/org/openremote/model/attribute/MetaMap.java +++ b/model/src/main/java/org/openremote/model/attribute/MetaMap.java @@ -33,7 +33,7 @@ @JsonDeserialize(using = MetaMap.MetaObjectDeserializer.class) public class MetaMap extends NamedMap> { /** - * Deserialise a {@link MetaMap} that is represented as a JSON object where each key is the name + * Deserialize a {@link MetaMap} that is represented as a JSON object where each key is the name * of a {@link MetaItemDescriptor} */ public static class MetaObjectDeserializer extends StdDeserializer { diff --git a/model/src/main/java/org/openremote/model/event/shared/EventFilter.java b/model/src/main/java/org/openremote/model/event/shared/EventFilter.java index 1b69d0959f..2091e8213e 100644 --- a/model/src/main/java/org/openremote/model/event/shared/EventFilter.java +++ b/model/src/main/java/org/openremote/model/event/shared/EventFilter.java @@ -40,7 +40,7 @@ getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE) -// TODO: Provide authorisation method on this interface +// TODO: Provide authorization method on this interface @FunctionalInterface public interface EventFilter { /** diff --git a/model/src/main/java/org/openremote/model/gateway/GatewayInitDoneEvent.java b/model/src/main/java/org/openremote/model/gateway/GatewayInitDoneEvent.java index 3db87d70a1..abea5804f8 100644 --- a/model/src/main/java/org/openremote/model/gateway/GatewayInitDoneEvent.java +++ b/model/src/main/java/org/openremote/model/gateway/GatewayInitDoneEvent.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import org.openremote.model.event.shared.SharedEvent; -/** Indicates that the gateway synchronisation has finished */ +/** Indicates that the gateway synchronization has finished */ public class GatewayInitDoneEvent extends SharedEvent { public static final String TYPE = "gateway-init-done"; diff --git a/model/src/main/java/org/openremote/model/gateway/GatewayInitStartEvent.java b/model/src/main/java/org/openremote/model/gateway/GatewayInitStartEvent.java index 02239d2b65..097e420b04 100644 --- a/model/src/main/java/org/openremote/model/gateway/GatewayInitStartEvent.java +++ b/model/src/main/java/org/openremote/model/gateway/GatewayInitStartEvent.java @@ -23,7 +23,7 @@ import org.openremote.model.event.shared.SharedEvent; /** - * Indicates that the gateway has connected and the central manager wants to begin synchronisation + * Indicates that the gateway has connected and the central manager wants to begin synchronization */ public class GatewayInitStartEvent extends SharedEvent { public static final String TYPE = "gateway-init-start"; diff --git a/model/src/main/java/org/openremote/model/map/MapResource.java b/model/src/main/java/org/openremote/model/map/MapResource.java index 7f3c414bbb..dc56d4a9b3 100644 --- a/model/src/main/java/org/openremote/model/map/MapResource.java +++ b/model/src/main/java/org/openremote/model/map/MapResource.java @@ -64,7 +64,7 @@ ObjectNode saveSettings( MapConfig mapConfig); /** - * Returns style used to initialise MapLibre GL + * Returns style used to initialize MapLibre GL * * @return */ diff --git a/model/src/main/java/org/openremote/model/notification/NotificationResource.java b/model/src/main/java/org/openremote/model/notification/NotificationResource.java index 013fe31674..9dd2c47c3f 100644 --- a/model/src/main/java/org/openremote/model/notification/NotificationResource.java +++ b/model/src/main/java/org/openremote/model/notification/NotificationResource.java @@ -166,7 +166,7 @@ void removeNotification( Long notificationId); /** - * Send a notification to one or more targets; the authorisation of the requesting user will + * Send a notification to one or more targets; the authorization of the requesting user will * determine whether or not the targets can be contacted; if one or more targets are not * accessible due to permissions then the entire request will fail with a 403 response. */ diff --git a/model/src/main/java/org/openremote/model/query/filter/GeoJSONGeofencePredicate.java b/model/src/main/java/org/openremote/model/query/filter/GeoJSONGeofencePredicate.java index 78183b2393..d7c32e4216 100644 --- a/model/src/main/java/org/openremote/model/query/filter/GeoJSONGeofencePredicate.java +++ b/model/src/main/java/org/openremote/model/query/filter/GeoJSONGeofencePredicate.java @@ -102,7 +102,7 @@ public double[] getCentrePoint() { return new double[] {centroid.getX(), centroid.getY()}; } } catch (Exception e) { - LOG.log(Level.WARNING, "Failed to get centre point from GeoJSON", e); + LOG.log(Level.WARNING, "Failed to get center point from GeoJSON", e); } return new double[] {0, 0}; } diff --git a/model/src/main/java/org/openremote/model/rules/RulesetStatus.java b/model/src/main/java/org/openremote/model/rules/RulesetStatus.java index 61c9a8ca1c..c2c2f30ef4 100644 --- a/model/src/main/java/org/openremote/model/rules/RulesetStatus.java +++ b/model/src/main/java/org/openremote/model/rules/RulesetStatus.java @@ -37,7 +37,7 @@ public enum RulesetStatus { /** Ruleset was executed but there was a runtime error. */ EXECUTION_ERROR, - /** Ruleset caused a loop whilst being executed. */ + /** Ruleset caused a loop while being executed. */ LOOP_ERROR, /** Ruleset has been disabled. */ diff --git a/model/src/main/java/org/openremote/model/rules/json/RuleActionTarget.java b/model/src/main/java/org/openremote/model/rules/json/RuleActionTarget.java index 42abcd815b..fc0c032d3d 100644 --- a/model/src/main/java/org/openremote/model/rules/json/RuleActionTarget.java +++ b/model/src/main/java/org/openremote/model/rules/json/RuleActionTarget.java @@ -23,7 +23,7 @@ /** * Controls which {@link org.openremote.model.asset.Asset}s the {@link RuleAction} is applied to; if - * not supplied or none of the options are supplied then the default behaviour is to use all {@link + * not supplied or none of the options are supplied then the default behavior is to use all {@link * org.openremote.model.asset.Asset}s that caused the rule to trigger. The precedence is: * *

        diff --git a/model/src/main/java/org/openremote/model/util/CronExpressionParser.java b/model/src/main/java/org/openremote/model/util/CronExpressionParser.java index ce8d827815..21b0ce75bc 100644 --- a/model/src/main/java/org/openremote/model/util/CronExpressionParser.java +++ b/model/src/main/java/org/openremote/model/util/CronExpressionParser.java @@ -149,7 +149,7 @@ public CronExpressionParser(String cronExpression) { } } - // Initialise empty year value + // Initialize empty year value otherValues[3] = ""; System.arraycopy(fields, 3, otherValues, 0, fields.length - 3); diff --git a/model/src/main/java/org/openremote/model/util/ValueUtil.java b/model/src/main/java/org/openremote/model/util/ValueUtil.java index 021360ad0a..c190bd9c88 100644 --- a/model/src/main/java/org/openremote/model/util/ValueUtil.java +++ b/model/src/main/java/org/openremote/model/util/ValueUtil.java @@ -409,7 +409,7 @@ public static Optional getValue(Object value, Class type) { } /** - * Basic type coercion/casting of values; utilises Jackson's underlying type coercion/casting mechanism + * Basic type coercion/casting of values; utilizes Jackson's underlying type coercion/casting mechanism */ public static Optional getValueCoerced(Object value, Class type) { return getValue(value, type, true); @@ -568,7 +568,7 @@ public static T clone(T object) { try { return (T) SerializationHelper.clone((Serializable) object); } catch (Exception e) { - LOG.log(Level.INFO, "Failed to clone using standard java serialisation, falling back to jackson object of type: " + object.getClass(), e); + LOG.log(Level.INFO, "Failed to clone using standard java serialization, falling back to jackson object of type: " + object.getClass(), e); } } @@ -742,13 +742,13 @@ public static void initialise(Container container) throws IllegalStateException try { doInitialise(); } catch (IllegalStateException e) { - LOG.log(Level.SEVERE, "Failed to initialise the asset model", e); + LOG.log(Level.SEVERE, "Failed to initialize the asset model", e); throw e; } } /** - * Initialise the asset model and throw an {@link IllegalStateException} exception if a problem is detected; this + * Initialize the asset model and throw an {@link IllegalStateException} exception if a problem is detected; this * can be called by applications at startup to fail hard and fast if the asset model is un-usable */ static void doInitialise() throws IllegalStateException { @@ -759,7 +759,7 @@ static void doInitialise() throws IllegalStateException { metaItemDescriptors.clear(); valueDescriptors.clear(); - LOG.info("Initialising asset model..."); + LOG.info("Initializing asset model..."); Set>> assetClasses = new TreeSet<>(new ClassHierarchyComparator()); Map> assetDescriptorsMap = new HashMap<>(); diff --git a/model/src/main/java/org/openremote/model/value/AbstractNameValueHolder.java b/model/src/main/java/org/openremote/model/value/AbstractNameValueHolder.java index 8c876f0f56..48dd600c34 100644 --- a/model/src/main/java/org/openremote/model/value/AbstractNameValueHolder.java +++ b/model/src/main/java/org/openremote/model/value/AbstractNameValueHolder.java @@ -46,7 +46,7 @@ public abstract class AbstractNameValueHolder implements NameValueHolder, nullable = true) protected T value; - @JsonIgnore protected String valueStr; // This is for lazy value initialisation when deserialising + @JsonIgnore protected String valueStr; // This is for lazy value initialization when deserializing @NotBlank(message = "{Asset.valueHolder.name.NotBlank}") @Pattern(regexp = "^\\w+$") @Schema(description = "Machine-readable name.", example = "temperature") protected String name; diff --git a/model/src/main/java/org/openremote/model/value/MetaItemDescriptor.java b/model/src/main/java/org/openremote/model/value/MetaItemDescriptor.java index 352295f3ac..8249ac245e 100644 --- a/model/src/main/java/org/openremote/model/value/MetaItemDescriptor.java +++ b/model/src/main/java/org/openremote/model/value/MetaItemDescriptor.java @@ -40,7 +40,7 @@ public class MetaItemDescriptor extends AbstractNameValueDescriptorHolder { /** - * This class handles deserialising meta item descriptor names to {@link MetaItemDescriptor}s; to + * This class handles deserializing meta item descriptor names to {@link MetaItemDescriptor}s; to * reuse instances */ public static class StringMetaItemDescriptorConverter diff --git a/model/src/main/java/org/openremote/model/value/MetaItemType.java b/model/src/main/java/org/openremote/model/value/MetaItemType.java index 723ed7a108..d8dc940250 100644 --- a/model/src/main/java/org/openremote/model/value/MetaItemType.java +++ b/model/src/main/java/org/openremote/model/value/MetaItemType.java @@ -81,7 +81,7 @@ public final class MetaItemType { /** * Marks the attribute as read-only for UI purposes only; this does not offer any - * authorisation/security. + * authorization/security. */ public static final MetaItemDescriptor READ_ONLY = new MetaItemDescriptor<>("readOnly", ValueType.BOOLEAN); @@ -160,7 +160,7 @@ public final class MetaItemType { /** * Indicates the units associated with the value, there's some special handling for {@link * Boolean} and {@link Date} values but otherwise the value type should be numeric. Units are - * intended for UI usage and should support internationalisation, custom unit types can be + * intended for UI usage and should support internationalization, custom unit types can be * composed e.g. ["kilo", "metre", "per", "hour"] => "km/h" see {@link * org.openremote.model.Constants} for well known units that UIs should support as a minimum. * Currencies get special handling and should be represented using the upper case 3 letter diff --git a/model/src/main/java/org/openremote/model/value/NameHolder.java b/model/src/main/java/org/openremote/model/value/NameHolder.java index 93ea0c2e47..39a964827b 100644 --- a/model/src/main/java/org/openremote/model/value/NameHolder.java +++ b/model/src/main/java/org/openremote/model/value/NameHolder.java @@ -28,7 +28,7 @@ */ public interface NameHolder { - /** This class handles serialising {@link ValueDescriptor}s as strings */ + /** This class handles serializing {@link ValueDescriptor}s as strings */ class NameHolderToStringConverter extends StdConverter { @Override diff --git a/model/src/main/java/org/openremote/model/value/ValueConstraint.java b/model/src/main/java/org/openremote/model/value/ValueConstraint.java index f7a4e82933..634ce57897 100644 --- a/model/src/main/java/org/openremote/model/value/ValueConstraint.java +++ b/model/src/main/java/org/openremote/model/value/ValueConstraint.java @@ -115,7 +115,7 @@ public Map getParameters() { @Override public boolean evaluate(Object value, Instant now) { if (value == null) { - return true; // Same behaviour as JSR-380 + return true; // Same behavior as JSR-380 } Class clazz = value.getClass(); diff --git a/model/src/main/java/org/openremote/model/value/ValueDescriptor.java b/model/src/main/java/org/openremote/model/value/ValueDescriptor.java index 2b78307d57..06097bc2a1 100644 --- a/model/src/main/java/org/openremote/model/value/ValueDescriptor.java +++ b/model/src/main/java/org/openremote/model/value/ValueDescriptor.java @@ -62,7 +62,7 @@ public class ValueDescriptor implements NameHolder, Serializable { /** - * Custom deserialiser that will return the same instance of {@link ValueDescriptor} using the + * Custom deserializer that will return the same instance of {@link ValueDescriptor} using the * {@link #VALUE_DESCRIPTOR_PROVIDER} attribute; otherwise it will construct a new instance */ public static class ValueDescriptorDeserializer extends StdDeserializer> diff --git a/model/src/main/java/org/openremote/model/value/ValueFilter.java b/model/src/main/java/org/openremote/model/value/ValueFilter.java index 4b8071b1b9..580566340d 100644 --- a/model/src/main/java/org/openremote/model/value/ValueFilter.java +++ b/model/src/main/java/org/openremote/model/value/ValueFilter.java @@ -34,7 +34,7 @@ @JsonSubTypes.Type(value = JsonPathFilter.class), @JsonSubTypes.Type(value = MathExpressionValueFilter.class) }) -// TODO: Standardise inbound/outbound value processing as ordered list of filters and/or converters +// TODO: Standardize inbound/outbound value processing as ordered list of filters and/or converters public abstract class ValueFilter implements Serializable { public abstract Object filter(Object value); diff --git a/profile/deploy.yml b/profile/deploy.yml index ecb9c66497..48fb8ba299 100644 --- a/profile/deploy.yml +++ b/profile/deploy.yml @@ -8,7 +8,7 @@ # including their default values. These can be overridden in many ways, shell environment variable, # env file, extending/merging this compose file, etc. # -# Here's a list of commonly customised environment variables: +# Here's a list of commonly customized environment variables: # # OR_ADMIN_PASSWORD # OR_HOSTNAME @@ -208,7 +208,7 @@ services: # !! WARNING: This will wipe your database !! # Force a full clean and setup on startup irrespective of whether there is existing data - # Default behaviour is false unless OR_DEV_MODE = true or openremote database doesn't already exist + # Default behavior is false unless OR_DEV_MODE = true or openremote database doesn't already exist OR_SETUP_RUN_ON_RESTART: ${OR_SETUP_RUN_ON_RESTART:-false} # Manager web server interface binding; default: 0.0.0.0 @@ -278,7 +278,7 @@ services: OR_MAP_TILES_PATH: ${OR_MAP_TILES_PATH:-/deployment/map/mapdata.mbtiles} # Override the map settings such as center location and zoom when opening the - # manager's map, as well as other style details and colours. + # manager's map, as well as other style details and colors. OR_MAP_SETTINGS_PATH: ${OR_MAP_SETTINGS_PATH:-/deployment/map/mapsettings.json} # Override the maximum allowed custom map tiles database file size in bytes. diff --git a/test/README-eks-load.md b/test/README-eks-load.md index e1d08321b8..a0a122b36d 100644 --- a/test/README-eks-load.md +++ b/test/README-eks-load.md @@ -143,7 +143,7 @@ The existing cluster must have the OpenRemote add-ons and managed ExternalDNS. For an independently sized cluster, choose a new `CLUSTER_NAME` too and use `up`; the helper derives a separate DNS role and ownership ID. -### Customise component values +### Customize component values The standard profile requires no YAML copying. To change dataset parameters, resource limits, or image tags, prepare an editable copy: diff --git a/test/load1/README.md b/test/load1/README.md index 1a40468052..64c76b167f 100644 --- a/test/load1/README.md +++ b/test/load1/README.md @@ -1,6 +1,6 @@ # Load Tests -[Blazemeter Taurus](https://gettaurus.org/) load testing utilising [JMeter](https://jmeter.apache.org/). +[Blazemeter Taurus](https://gettaurus.org/) load testing utilizing [JMeter](https://jmeter.apache.org/). ## Prerequisites diff --git a/test/load1/run.sh b/test/load1/run.sh index a4a5fbb70a..31a34684c7 100644 --- a/test/load1/run.sh +++ b/test/load1/run.sh @@ -9,7 +9,7 @@ # The following environment variables can be used: # # `DEPLOYMENT1_DO_NOTHING` (default: false) - Do not do anything with deployment1; useful when running the test multiple times to speed up deployment -# `DEPLOYMENT1_RESTART_ONLY` (default: false) - Will only restart the manager container on deployment 1 rather than the default behaviour of stack down/up +# `DEPLOYMENT1_RESTART_ONLY` (default: false) - Will only restart the manager container on deployment 1 rather than the default behavior of stack down/up # `DEPLOYMENT1_MQTT_RATE_LIMIT` (default: 100/s) - Will set the MQTT_RATE_LIMIT on the proxy container to limit the connection rate of MQTT devices # `DEPLOYMENT1_ENV` (default: unset) - Provide custom environment variables to the deployment # `DEPLOYMENT2_THREAD_COUNT` (default: unset) - Override console user test `THREAD_COUNT` (set to `0` to skip deployment 2 test) diff --git a/test/load2-eks/README.md b/test/load2-eks/README.md index 64695fce07..dc828747f8 100644 --- a/test/load2-eks/README.md +++ b/test/load2-eks/README.md @@ -196,7 +196,7 @@ DISCONNECT_DELAY: Delay before closing the MQTT connection after publishing loop Connects up to THREAD_COUNT accounts to the system. Once connected, it does 1 single publish every MILLIS_BETWEEN_PUBLISHES (defaults to 300s). -Goal is to measure the time it takes for the system to allow that many connections and stabilise. +Goal is to measure the time it takes for the system to allow that many connections and stabilize. The parameters are: MANAGER_HOSTNAME: Hostname of the manager to be tested. Default is 127.0.0.1. diff --git a/test/src/main/groovy/org/openremote/test/ContainerTrait.groovy b/test/src/main/groovy/org/openremote/test/ContainerTrait.groovy index 2db3cc9880..1fe38b5b17 100644 --- a/test/src/main/groovy/org/openremote/test/ContainerTrait.groovy +++ b/test/src/main/groovy/org/openremote/test/ContainerTrait.groovy @@ -363,7 +363,7 @@ trait ContainerTrait { TestFixture.users = getUsers() } - // Wait for agents and rulesets to be deployed - Just a very basic way of waiting for the system to be 'initialised' + // Wait for agents and rulesets to be deployed - Just a very basic way of waiting for the system to be 'initialized' def agentService = container.hasService(AgentService.class) ? container.getService(AgentService.class) : null def rulesService = container.hasService(RulesService.class) ? container.getService(RulesService.class) : null def assetProcessingService = container.hasService(AssetProcessingService.class) ? container.getService(AssetProcessingService.class) : null diff --git a/test/src/test/groovy/org/openremote/test/assets/ApplyPredictedDataPointsServiceTest.groovy b/test/src/test/groovy/org/openremote/test/assets/ApplyPredictedDataPointsServiceTest.groovy index 33797ecdbd..e0e4480115 100644 --- a/test/src/test/groovy/org/openremote/test/assets/ApplyPredictedDataPointsServiceTest.groovy +++ b/test/src/test/groovy/org/openremote/test/assets/ApplyPredictedDataPointsServiceTest.groovy @@ -618,7 +618,7 @@ class ApplyPredictedDataPointsServiceTest extends Specification implements Manag scheduled.future.get() } - then: "the scheduled prediction for the attribute is cancelled" + then: "the scheduled prediction for the attribute is canceled" conditions.eventually { assert !applyService.scheduledEntries.containsKey(attributeRef) } @@ -697,7 +697,7 @@ class ApplyPredictedDataPointsServiceTest extends Specification implements Manag scheduled.future.get() } - then: "the scheduled prediction for the attribute is cancelled" + then: "the scheduled prediction for the attribute is canceled" conditions.eventually { assert !applyService.scheduledEntries.containsKey(attributeRef) } diff --git a/test/src/test/groovy/org/openremote/test/assets/AssetDatapointTest.groovy b/test/src/test/groovy/org/openremote/test/assets/AssetDatapointTest.groovy index 8fd49153f1..4f3d4b798c 100644 --- a/test/src/test/groovy/org/openremote/test/assets/AssetDatapointTest.groovy +++ b/test/src/test/groovy/org/openremote/test/assets/AssetDatapointTest.groovy @@ -91,7 +91,7 @@ class AssetDatapointTest extends Specification implements ManagerContainerTrait String str = ValueUtil.asJSON(message).orElse(null) return prefix + str } catch (Exception e) { - throw new IllegalArgumentException("Unable to serialise message") + throw new IllegalArgumentException("Unable to serialize message") } } @@ -154,7 +154,7 @@ class AssetDatapointTest extends Specification implements ManagerContainerTrait //def datapointResource = getClientApiTarget(serverUri(serverPort), MASTER_REALM, accessToken).proxy(AssetDatapointResource.class) def predictedDatapointResource = getClientApiTarget(serverUri(serverPort), MASTER_REALM, accessToken).proxy(AssetPredictedDatapointResource.class) - then: "the simulator protocol instance should have been initialised and attributes linked" + then: "the simulator protocol instance should have been initialized and attributes linked" conditions.eventually { assert agentService.protocolInstanceMap.get(managerTestSetup.agentId) != null assert ((SimulatorProtocol) agentService.protocolInstanceMap.get(managerTestSetup.agentId)).linkedAttributes.size() == 4 diff --git a/test/src/test/groovy/org/openremote/test/assets/AssetIntegrityTest.groovy b/test/src/test/groovy/org/openremote/test/assets/AssetIntegrityTest.groovy index 87e03736d5..86b3676edd 100644 --- a/test/src/test/groovy/org/openremote/test/assets/AssetIntegrityTest.groovy +++ b/test/src/test/groovy/org/openremote/test/assets/AssetIntegrityTest.groovy @@ -559,7 +559,7 @@ class AssetIntegrityTest extends Specification implements ManagerContainerTrait childAsset.setName("Restored pending delete child") def restoredChildAsset = assetStorageService.merge(childAsset) - then: "the child deletion is cancelled and the asset is visible again" + then: "the child deletion is canceled and the asset is visible again" restoredChildAsset.id == childAsset.id restoredChildAsset.name == "Restored pending delete child" !restoredChildAsset.isDeletePending() diff --git a/test/src/test/groovy/org/openremote/test/assets/AssetQueryPredicateTest.groovy b/test/src/test/groovy/org/openremote/test/assets/AssetQueryPredicateTest.groovy index dcdd4a7fc9..a0411fbcff 100644 --- a/test/src/test/groovy/org/openremote/test/assets/AssetQueryPredicateTest.groovy +++ b/test/src/test/groovy/org/openremote/test/assets/AssetQueryPredicateTest.groovy @@ -313,7 +313,7 @@ class AssetQueryPredicateTest extends Specification { assert !coordinatePredicate.test(new Coordinate(12.50, 41.90)) } - def "GeoJSON centre point calculation test"() { + def "GeoJSON center point calculation test"() { given: "A polygon geofence" def polygonGeoJSON = ''' { @@ -331,10 +331,10 @@ class AssetQueryPredicateTest extends Specification { ''' GeofencePredicate geofencePredicate = new GeoJSONGeofencePredicate(polygonGeoJSON) - when: "Getting the centre point" + when: "Getting the center point" def centrePoint = geofencePredicate.getCentrePoint() - then: "The centre point should be approximately at the centroid" + then: "The center point should be approximately at the centroid" assert centrePoint != null assert centrePoint.length == 2 assert Math.abs(centrePoint[0] - 16.5) < 0.1 // longitude diff --git a/test/src/test/groovy/org/openremote/test/assets/AttributeLinkingTest.groovy b/test/src/test/groovy/org/openremote/test/assets/AttributeLinkingTest.groovy index 6454f5d14f..4794e1117e 100644 --- a/test/src/test/groovy/org/openremote/test/assets/AttributeLinkingTest.groovy +++ b/test/src/test/groovy/org/openremote/test/assets/AttributeLinkingTest.groovy @@ -156,7 +156,7 @@ class AttributeLinkingTest extends Specification implements ManagerContainerTrai assert noEventProcessedIn(assetProcessingService, 500) } - // Need to reset counter due to synchronisation issues (ideally counter would still be at 0 as + // Need to reset counter due to synchronization issues (ideally counter would still be at 0 as // each press event had a corresponding release event) when: "the counter is reset" def attr = asset2.getAttribute("counter").get() diff --git a/test/src/test/groovy/org/openremote/test/console/ConsoleTest.groovy b/test/src/test/groovy/org/openremote/test/console/ConsoleTest.groovy index 26b2706d63..79ea79c852 100644 --- a/test/src/test/groovy/org/openremote/test/console/ConsoleTest.groovy +++ b/test/src/test/groovy/org/openremote/test/console/ConsoleTest.groovy @@ -328,7 +328,7 @@ class ConsoleTest extends Specification implements ManagerContainerTrait { assert assetStorageService.find(unusedId, true) == null } - def "Check full console behaviour"() { + def "Check full console behavior"() { def notificationIds = new CopyOnWriteArrayList() def targetTypes = new CopyOnWriteArrayList() def targetIds = new CopyOnWriteArrayList() @@ -689,7 +689,7 @@ class ConsoleTest extends Specification implements ManagerContainerTrait { assert assetLocation.y == 0d assert assetLocation.z == 0d } - // TODO: Update once console permissions model finalised + // TODO: Update once console permissions model finalized // when: "an anonymous user updates the location of a console linked to users" // anonymousAssetResource.writeAttributeValue(null, testUser3Console1.id, LOCATION.name, new GeoJSONPoint(0d, 0d, 0d).objectToValue()) // @@ -785,7 +785,7 @@ class ConsoleTest extends Specification implements ManagerContainerTrait { assert geofences[0].httpMethod == WRITE_ATTRIBUTE_HTTP_METHOD assert geofences[0].url == getWriteAttributeUrl(new AttributeRef(testUser3Console1.id, Asset.LOCATION.name)) - // TODO: Update once console permissions model finalised + // TODO: Update once console permissions model finalized // when: "an anonymous user tries to retrieve the geofences of a console linked to users" // geofences = anonymousRulesResource.getAssetGeofences(null, testUser3Console1.id) // diff --git a/test/src/test/groovy/org/openremote/test/gateway/GatewayTest.groovy b/test/src/test/groovy/org/openremote/test/gateway/GatewayTest.groovy index c436403968..6c86efbac9 100644 --- a/test/src/test/groovy/org/openremote/test/gateway/GatewayTest.groovy +++ b/test/src/test/groovy/org/openremote/test/gateway/GatewayTest.groovy @@ -780,7 +780,7 @@ class GatewayTest extends Specification implements ManagerContainerTrait { then: "an error should occur" thrown(IllegalStateException) - when: "gateway assets are modified whilst the gateway is disconnected (building1Room5 re-added, building5 and descendants removed and building1 modified and building1Room1 attribute updated)" + when: "gateway assets are modified while the gateway is disconnected (building1Room5 re-added, building5 and descendants removed and building1 modified and building1Room1 attribute updated)" assets[4].setName("Test Building 1 Updated") assets[4].setVersion(2L) assets[0].getAttribute("temp").ifPresent { it.setValue(10) } @@ -1307,7 +1307,7 @@ class GatewayTest extends Specification implements ManagerContainerTrait { def oldConnector = gatewayClientService.connectionRealmMap.get(gatewayConnection.getLocalRealm()) gatewayClientResource.setConnection(null, managerTestSetup.realmCityName, gatewayConnection) - then: "the gateway connection IO client should have been replaced and synchronisation should be complete" + then: "the gateway connection IO client should have been replaced and synchronization should be complete" conditions.eventually { assert gatewayClientService.connectionRealmMap.get(gatewayConnection.getLocalRealm()) != null assert gatewayClientService.connectionRealmMap.get(gatewayConnection.getLocalRealm()) != oldConnector diff --git a/test/src/test/groovy/org/openremote/test/gateway/GatewayTunnelAuthorizationTest.groovy b/test/src/test/groovy/org/openremote/test/gateway/GatewayTunnelAuthorizationTest.groovy index 6ba01f52ef..788b834771 100644 --- a/test/src/test/groovy/org/openremote/test/gateway/GatewayTunnelAuthorizationTest.groovy +++ b/test/src/test/groovy/org/openremote/test/gateway/GatewayTunnelAuthorizationTest.groovy @@ -278,7 +278,7 @@ class GatewayTunnelAuthorizationTest extends Specification implements ManagerCon SharedEvent response String messageId = request.messageID if (request instanceof GatewayInitStartEvent) { - // The gateway has no assets of its own to synchronise + // The gateway has no assets of its own to synchronize response = new AssetsEvent([]) messageId = GatewayConnector.ASSET_READ_EVENT_NAME_INITIAL } else if (request instanceof GatewayCapabilitiesRequestEvent) { diff --git a/test/src/test/groovy/org/openremote/test/model/AssetModelTest.groovy b/test/src/test/groovy/org/openremote/test/model/AssetModelTest.groovy index 25f6e92465..b62a2c37b5 100644 --- a/test/src/test/groovy/org/openremote/test/model/AssetModelTest.groovy +++ b/test/src/test/groovy/org/openremote/test/model/AssetModelTest.groovy @@ -97,7 +97,7 @@ class AssetModelTest extends Specification implements ManagerContainerTrait { def assetTypeInfoStr = AssetModelService.JSON.writeValueAsString(assetTypeInfo) Files.writeString(storageDir.resolve("CustomAsset"), assetTypeInfoStr, StandardOpenOption.CREATE, StandardOpenOption.WRITE) startContainer(defaultConfig(), defaultServices()) - // Ensure the asset model is re-initialised (just in case container is reused) + // Ensure the asset model is re-initialized (just in case container is reused) container.getService(AssetModelService).initDynamicModel() ValueUtil.doInitialise() assetModelResource = getClientApiTarget(serverUri(serverPort), MASTER_REALM).proxy(AssetModelResource.class) @@ -119,7 +119,7 @@ class AssetModelTest extends Specification implements ManagerContainerTrait { Objects.equals(attributes1, attributes2) } - def "Serialise/Deserialise asset and attribute events and test validation"() { + def "Serialize/Deserialize asset and attribute events and test validation"() { given: "an authenticated admin user" def accessToken = authenticate( @@ -442,10 +442,10 @@ class AssetModelTest extends Specification implements ManagerContainerTrait { and: "we simulate a value descriptor being removed on a custom attribute (by changing the type name of the attribute)" ((ObjectNode)((ObjectNode)assetObjectNode.get("attributes")).get("custom1")).put("type", "missingType2") - and: "we deserialise the object back into an Asset" + and: "we deserialize the object back into an Asset" modelTestAsset = ValueUtil.parse(assetObjectNode.toString(), Asset).orElse(null) as ModelTestAsset - then: "the attribute with the missing attribute descriptor should still have the correct value type and value should have deserialised correctly" + then: "the attribute with the missing attribute descriptor should still have the correct value type and value should have deserialized correctly" modelTestAsset.getAttribute("missingAttr").map {it.type}.orElse(null) == ValueType.TIMESTAMP modelTestAsset.getAttribute("missingAttr").flatMap {it.value}.orElse(null) instanceof Long @@ -615,7 +615,7 @@ class AssetModelTest extends Specification implements ManagerContainerTrait { when: "all value descriptors are retrieved" def valueDescriptors = assetModelResource.getValueDescriptors(null, null) - then: "the value descriptors should be correctly serialised/deserialised" + then: "the value descriptors should be correctly serialized/deserialized" valueDescriptors.size() > 0 valueDescriptors.every { it.value.name == it.key && it.value.type != null & it.value.jsonType != null @@ -634,7 +634,7 @@ class AssetModelTest extends Specification implements ManagerContainerTrait { when: "all meta item descriptors are retrieved" def metaItemDescriptors = assetModelResource.getMetaItemDescriptors(null, null) - then: "the meta item descriptors should be correctly serialised/deserialised" + then: "the meta item descriptors should be correctly serialized/deserialized" metaItemDescriptors.size() > 0 when: "represented as JSON" @@ -725,7 +725,7 @@ class AssetModelTest extends Specification implements ManagerContainerTrait { asset.getColourRGB().map{it.getG()}.orElse(null) == 100I asset.getColourRGB().map{it.getB()}.orElse(null) == 200I - when: "the asset is serialised using default object mapper" + when: "the asset is serialized using default object mapper" def assetStr = ValueUtil.asJSON(asset).orElse(null) then: "the string should be valid JSON" diff --git a/test/src/test/groovy/org/openremote/test/mqtt/MqttBrokerTest.groovy b/test/src/test/groovy/org/openremote/test/mqtt/MqttBrokerTest.groovy index 8508a4506a..25210833e6 100644 --- a/test/src/test/groovy/org/openremote/test/mqtt/MqttBrokerTest.groovy +++ b/test/src/test/groovy/org/openremote/test/mqtt/MqttBrokerTest.groovy @@ -181,7 +181,7 @@ class MqttBrokerTest extends Specification implements ManagerContainerTrait { when: "the client disconnects" client.disconnect() - then: "the status should be reported and reconnect cancelled" + then: "the status should be reported and reconnect canceled" conditions.eventually { assert clientConnectionStatuses.contains(ConnectionStatus.DISCONNECTED) } @@ -535,7 +535,7 @@ class MqttBrokerTest extends Specification implements ManagerContainerTrait { assert receivedEvents.poll(1, TimeUnit.SECONDS) == null } - def "MQTT last wills update authorised attributes and clients can publish after reconnect"() { + def "MQTT last wills update authorized attributes and clients can publish after reconnect"() { given: "an independent observer subscribed to the last will attribute" preserveAttributes(managerTestSetup.apartment1HallwayId) def observerId = UniqueIdentifierGenerator.generateId() @@ -611,12 +611,12 @@ class MqttBrokerTest extends Specification implements ManagerContainerTrait { } } - def "MQTT last wills cannot update unauthorised attributes"() { + def "MQTT last wills cannot update unauthorized attributes"() { given: "a client ID for the restricted user" preserveAttributes(managerTestSetup.apartment2LivingroomId) def mqttClientId = UniqueIdentifierGenerator.generateId() - when: "a restricted client connects with a last will topic for an unauthorised asset/attribute" + when: "a restricted client connects with a last will topic for an unauthorized asset/attribute" def asset = assetStorageService.find(managerTestSetup.apartment2LivingroomId) def currentCO2Level = asset.getAttribute("co2Level").flatMap{it.getValue()}.orElse(0d) def client = createMqttClient(mqttClientId, restrictedMqttCredentials, new MQTTLastWill("${keycloakTestSetup.realmBuilding.name}/$mqttClientId/$DefaultMQTTHandler.ATTRIBUTE_VALUE_WRITE_TOPIC/co2Level/$managerTestSetup.apartment2LivingroomId".toString(), "1000", false)) diff --git a/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy b/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy index 6a824f9ceb..3abb7cb232 100644 --- a/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy +++ b/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy @@ -504,7 +504,7 @@ class NotificationTest extends Specification implements ManagerContainerTrait { } == 1 } - // TODO: Update once console permissions model finalised + // TODO: Update once console permissions model finalized // when: "an anonymous user marks a console notification from another console as delivered" // anonymousNotificationResource.notificationDelivered(null, testuser3Console1.id, notifications.find {n -> n.targetId == testuser3Console1.id}.id) // diff --git a/test/src/test/groovy/org/openremote/test/protocol/KNXImportXXETest.groovy b/test/src/test/groovy/org/openremote/test/protocol/KNXImportXXETest.groovy index 92df70c564..8212713bfe 100644 --- a/test/src/test/groovy/org/openremote/test/protocol/KNXImportXXETest.groovy +++ b/test/src/test/groovy/org/openremote/test/protocol/KNXImportXXETest.groovy @@ -36,7 +36,7 @@ import java.util.zip.ZipOutputStream class KNXImportXXETest extends Specification { def "KNX asset import still processes valid ETS project files"() { - given: "a KNX protocol instance with only the import executor initialised" + given: "a KNX protocol instance with only the import executor initialized" ValueUtil.initialise(null) def executor = Executors.newSingleThreadExecutor() def protocol = new TestKNXProtocol(new KNXAgent("KNX").setId("knx-agent"), executor) @@ -101,7 +101,7 @@ class KNXImportXXETest extends Specification { """) - and: "a KNX protocol instance with only the import executor initialised" + and: "a KNX protocol instance with only the import executor initialized" ValueUtil.initialise(null) def executor = Executors.newSingleThreadExecutor() def protocol = new TestKNXProtocol(new KNXAgent("KNX").setId("knx-agent"), executor) diff --git a/test/src/test/groovy/org/openremote/test/protocol/http/HttpServerProtocolTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/http/HttpServerProtocolTest.groovy index ab2083ecdf..13c2876f2d 100644 --- a/test/src/test/groovy/org/openremote/test/protocol/http/HttpServerProtocolTest.groovy +++ b/test/src/test/groovy/org/openremote/test/protocol/http/HttpServerProtocolTest.groovy @@ -60,7 +60,7 @@ import static org.openremote.model.value.ValueType.TEXT class HttpServerProtocolTest extends Specification implements ManagerContainerTrait { def tryPost(TestResource authenticatedTestResource, Asset testAsset) { - // There's some weird behaviour where sometimes a forbidden exception is thrown and sometimes not + // There's some weird behavior where sometimes a forbidden exception is thrown and sometimes not try { authenticatedTestResource.postAsset(testAsset) } catch (Exception ex) { diff --git a/test/src/test/groovy/org/openremote/test/protocol/http/WebTargetTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/http/WebTargetTest.groovy index 95645be518..aac2ffa442 100644 --- a/test/src/test/groovy/org/openremote/test/protocol/http/WebTargetTest.groovy +++ b/test/src/test/groovy/org/openremote/test/protocol/http/WebTargetTest.groovy @@ -215,7 +215,7 @@ class WebTargetTest extends Specification { ResteasyClient client def setupSpec() { - // Initialise the web target builder and load in the mock 'server' + // Initialize the web target builder and load in the mock 'server' client = WebTargetBuilder.createClient(null) client.register(mockServer, Integer.MAX_VALUE) } @@ -228,7 +228,7 @@ class WebTargetTest extends Specification { mockServer.refreshTokenCount = 0 } - def "OAuth grant serialisation and deserialisation"() { + def "OAuth grant serialization and deserialization"() { given: "a grant object" OAuthPasswordGrant grant = new OAuthPasswordGrant("https://mockapi/token", @@ -238,10 +238,10 @@ class WebTargetTest extends Specification { "testuser", "password") - when: "it is serialised" + when: "it is serialized" String grantStr = ValueUtil.asJSON(grant).orElse(null) - and: "deserialised again" + and: "deserialized again" OAuthGrant grant2 = ValueUtil.JSON.readValue(grantStr, OAuthGrant.class) then: "the two grant objects should be the same" @@ -253,13 +253,13 @@ class WebTargetTest extends Specification { assert ((OAuthPasswordGrant)grant2).username == grant.username assert ((OAuthPasswordGrant)grant2).password == grant.password - when: "serialised" + when: "serialized" Map map = new HashMap<>() String v = "{\"test\": 123}" map.put("value", v) String mapStr = ValueUtil.JSON.writeValueAsString(map) - and: "deserialised" + and: "deserialized" def newMap = ValueUtil.JSON.readValue(mapStr, Map.class) then: "should work" diff --git a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy index 505bfc9446..e2e33a16ce 100644 --- a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy +++ b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy @@ -740,7 +740,7 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(2) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB4AN @@ -777,7 +777,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH8_LOCKED") } - when: "the channel lock is cancelled" + when: "the channel lock is canceled" device.writeProperty("CH8_LOCK", 0d) then: "the channel should become unlocked again" @@ -793,7 +793,7 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(1) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBGP1 @@ -812,7 +812,7 @@ class VelbusBasicTest extends Specification { }) } - and: "the input button property values should be initialised" + and: "the input button property values should be initialized" conditions.eventually { 1.upto(8, { assert device.getPropertyValue("CH" + it) == InputProcessor.ChannelState.RELEASED @@ -826,7 +826,7 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(48) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBGPOD @@ -849,7 +849,7 @@ class VelbusBasicTest extends Specification { }) } - and: "the input button property values should be initialised" + and: "the input button property values should be initialized" conditions.eventually { 1.upto(32, { if (it >= 25 && it <= 32) { @@ -952,7 +952,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH8_LOCKED") } - when: "the channel lock is cancelled" + when: "the channel lock is canceled" device.writeProperty("CH8_LOCK", 0d) then: "the channel should become unlocked again" @@ -1033,7 +1033,7 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(10) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB7IN @@ -1048,7 +1048,7 @@ class VelbusBasicTest extends Specification { }) } - and: "the input button property values should be initialised" + and: "the input button property values should be initialized" conditions.eventually { 1.upto(7, { if (it == 1) { @@ -1139,7 +1139,7 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(1) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBGP1 @@ -1159,7 +1159,7 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(3) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBGP1 @@ -1180,7 +1180,7 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(48) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBGPOD @@ -1194,7 +1194,7 @@ class VelbusBasicTest extends Specification { assert thermostatProcessor.isThermostatEnabled(device) } - and: "the thermostat values should be initialised" + and: "the thermostat values should be initialized" conditions.eventually { assert device.getPropertyValue("HEATER") == InputProcessor.ChannelState.RELEASED assert device.getPropertyValue("BOOST") == InputProcessor.ChannelState.RELEASED @@ -1384,7 +1384,7 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(48) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBGPOD @@ -1395,7 +1395,7 @@ class VelbusBasicTest extends Specification { assert device.getSubAddresses()[3] == 64 } - and: "the programs property values should be initialised" + and: "the programs property values should be initialized" conditions.eventually { 1.upto(24, { def programStepsEnabled = it != 13 @@ -1540,14 +1540,14 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(48) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBGPOD assert device.getBaseAddress() == 48 } - and: "the OLED property values should be initialised" + and: "the OLED property values should be initialized" conditions.eventually { assert device.getPropertyValue("MEMO_TEXT") == "" } @@ -1599,14 +1599,14 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(81) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB1RYNO assert device.getBaseAddress() == 81 } - and: "the relay property values should be initialised" + and: "the relay property values should be initialized" conditions.eventually { assert device.getPropertyValue("CH1") == RelayProcessor.ChannelState.OFF assert device.getPropertyValue("CH2") == RelayProcessor.ChannelState.OFF @@ -1700,7 +1700,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH2_LED") == FeatureProcessor.LedState.FAST } - when: "the relay intermittent state is cancelled" + when: "the relay intermittent state is canceled" device.writeProperty("CH2_INTERMITTENT", 0d) then: "the relay should return to normal" @@ -1735,7 +1735,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH2_SETTING") == OutputChannelProcessor.ChannelSetting.INHIBITED } - when: "the relay inhibit is cancelled" + when: "the relay inhibit is canceled" device.writeProperty("CH2_INHIBIT", 0d) then: "the relay should return to normal" @@ -1848,7 +1848,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH2_SETTING") == OutputChannelProcessor.ChannelSetting.LOCKED } - when: "the relay lock is cancelled" + when: "the relay lock is canceled" device.writeProperty("CH2_LOCK", 0d) then: "the relay should return to normal" @@ -1877,14 +1877,14 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(10) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB7IN assert device.getBaseAddress() == 10 } - and: "the counter property values should be initialised" + and: "the counter property values should be initialized" conditions.eventually { 1.upto(4, { if (it == 1) { @@ -1935,14 +1935,14 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(2) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB4AN assert device.getBaseAddress() == 2 } - and: "the IO module property values should be initialised" + and: "the IO module property values should be initialized" conditions.eventually { assert device.getPropertyValue("OUTPUT1") == AnalogOutputProcessor.ChannelState.OFF assert device.getPropertyValue("OUTPUT2") == AnalogOutputProcessor.ChannelState.OFF @@ -2032,14 +2032,14 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(187) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB4DC assert device.getBaseAddress() == 187 } - and: "the dimmer property values should be initialised" + and: "the dimmer property values should be initialized" conditions.eventually { assert device.getPropertyValue("CH1") == AnalogOutputProcessor.ChannelState.OFF assert device.getPropertyValue("CH2") == AnalogOutputProcessor.ChannelState.OFF @@ -2228,7 +2228,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH3_SETTING") == OutputChannelProcessor.ChannelSetting.INHIBITED } - when: "the dimmer inhibit is cancelled" + when: "the dimmer inhibit is canceled" device.writeProperty("CH3_INHIBIT", 0d) then: "the dimmer should return to normal" @@ -2326,7 +2326,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH3_SETTING") == OutputChannelProcessor.ChannelSetting.LOCKED } - when: "the dimmer lock is cancelled" + when: "the dimmer lock is canceled" device.writeProperty("CH3_LOCK", 0d) then: "the dimmer should return to normal" @@ -2353,14 +2353,14 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(97) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB2BLE assert device.getBaseAddress() == 97 } - and: "the blind property values should be initialised" + and: "the blind property values should be initialized" conditions.eventually { assert device.getPropertyValue("CH1") == BlindProcessor.ChannelState.HALT assert device.getPropertyValue("CH2") == BlindProcessor.ChannelState.HALT @@ -2518,7 +2518,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH2_SETTING") == BlindProcessor.ChannelSetting.INHIBITED } - when: "the blind inhibit is cancelled" + when: "the blind inhibit is canceled" device.writeProperty("CH2_INHIBIT", 0d) then: "the blind should return to normal" @@ -2538,7 +2538,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH2_SETTING") == BlindProcessor.ChannelSetting.INHIBITED_DOWN } - when: "the blind inhibit is cancelled" + when: "the blind inhibit is canceled" device.writeProperty("CH2_INHIBIT", 0d) then: "the blind should return to normal" @@ -2590,7 +2590,7 @@ class VelbusBasicTest extends Specification { assert device.getPropertyValue("CH2_LOCKED") } - when: "the blind lock is cancelled" + when: "the blind lock is canceled" device.writeProperty("CH2_LOCK", 0d) then: "the blind should return to normal" @@ -2621,7 +2621,7 @@ class VelbusBasicTest extends Specification { }) def device = network.getDevice(2) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB4AN @@ -2651,14 +2651,14 @@ class VelbusBasicTest extends Specification { }) device = network.getDevice(254) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBMETEO assert device.getBaseAddress() == 254 } - and: "the device property values should be initialised" + and: "the device property values should be initialized" conditions.eventually { assert device.getPropertyValue("TEMP_CURRENT") == 22.2 assert device.getPropertyValue("TEMP_MIN") == -0.6 @@ -2686,14 +2686,14 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(8) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMBPIRO assert device.getBaseAddress() == 8 } - and: "the device property values should be initialised" + and: "the device property values should be initialized" conditions.eventually { assert device.getPropertyValue("TEMP_CURRENT") == 29.6 assert device.getPropertyValue("TEMP_MIN") == 20.0 @@ -2718,14 +2718,14 @@ class VelbusBasicTest extends Specification { }) VelbusDevice device = network.getDevice(5) - then: "The device should be created and become initialised" + then: "The device should be created and become initialized" conditions.eventually { assert device != null assert device.getDeviceType() == VelbusDeviceType.VMB1TS assert device.getBaseAddress() == 5 } - and: "the device property values should be initialised" + and: "the device property values should be initialized" conditions.eventually { assert device.getPropertyValue("TEMP_CURRENT") == 29.9 assert device.getPropertyValue("TEMP_MIN") == 19.3 diff --git a/test/src/test/groovy/org/openremote/test/protocol/websocket/WebsocketClientTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/websocket/WebsocketClientTest.groovy index c5252e3e07..51f36157a1 100644 --- a/test/src/test/groovy/org/openremote/test/protocol/websocket/WebsocketClientTest.groovy +++ b/test/src/test/groovy/org/openremote/test/protocol/websocket/WebsocketClientTest.groovy @@ -81,7 +81,7 @@ class WebsocketClientTest extends Specification implements ManagerContainerTrait String str = ValueUtil.asJSON(message).orElse(null) return prefix + str } catch (Exception e) { - throw new IllegalArgumentException("Unable to serialise message") + throw new IllegalArgumentException("Unable to serialize message") } } @@ -483,7 +483,7 @@ class WebsocketClientTest extends Specification implements ManagerContainerTrait } // TODO: Remove this once client supports some better connection logic - and: "some time passes to allow the connection to be fully initialised" + and: "some time passes to allow the connection to be fully initialized" sleep(3000) when: "we subscribe to attribute events produced by the server" diff --git a/test/src/test/groovy/org/openremote/test/rules/BasicRulesProcessingTest.groovy b/test/src/test/groovy/org/openremote/test/rules/BasicRulesProcessingTest.groovy index cce0200c07..cbf7ceabf7 100644 --- a/test/src/test/groovy/org/openremote/test/rules/BasicRulesProcessingTest.groovy +++ b/test/src/test/groovy/org/openremote/test/rules/BasicRulesProcessingTest.groovy @@ -88,7 +88,7 @@ class BasicRulesProcessingTest extends Specification implements ManagerContainer }) } - and: "the new rule engine is fully initialised" + and: "the new rule engine is fully initialized" conditions.eventually { assert smartHomeEngine.facts.assetStates.size() == DEMO_RULE_STATES_SMART_BUILDING assertRulesFired(rulesImport.globalEngine, 1) diff --git a/test/src/test/groovy/org/openremote/test/rules/RulesEngineFiringTest.groovy b/test/src/test/groovy/org/openremote/test/rules/RulesEngineFiringTest.groovy index a42e5e82a0..b7c8d33e90 100644 --- a/test/src/test/groovy/org/openremote/test/rules/RulesEngineFiringTest.groovy +++ b/test/src/test/groovy/org/openremote/test/rules/RulesEngineFiringTest.groovy @@ -167,7 +167,7 @@ class RulesEngineFiringTest extends Specification implements ManagerContainerTra /* The exact timing issue is: - fireTimer triggers and is executing the rules (fireAllDeployments) - - stop is called, cancelling the fireTimer and setting it to null + - stop is called, canceling the fireTimer and setting it to null - start is called, creating a new fireTimer - in this case, that new timer does not fire yet and fireAllDeployments returns, the fire lambda sets fireTimer to null and creates a new timer @@ -253,7 +253,7 @@ class RulesEngineFiringTest extends Specification implements ManagerContainerTra /* The exact timing issue is: - fireTimer triggers and is executing the rules (fireAllDeployments) - - stop is called, cancelling the fireTimer and setting it to null + - stop is called, canceling the fireTimer and setting it to null - start is called, creating a new fireTimer - in this case, that new timer already fires while fireAllDeployments is still running As a result, the newly created timer triggers while the original rules execution is still happening diff --git a/ui/AGENTS.md b/ui/AGENTS.md index 50e980b10b..62102061b1 100644 --- a/ui/AGENTS.md +++ b/ui/AGENTS.md @@ -94,7 +94,7 @@ Stories call `getORStorybookHelpers(tagName)` (from `ui/component/storybook-util - **Test Naming:** `test.describe` blocks describe a feature. Tests should be named starting with "should ...". - **Test Structure:** Keep tests flat by default. Omit top-level `test.describe` blocks. If grouping is needed, target a specific feature (e.g., filtering notifications) rather than a parent concept like the whole page. Example: `test.describe("Filter Notifications", ...)` instead of `test.describe("Notifications", ...)`. -- **Regression Tests:** Every bug fix ships with a test that fails without it. Name it after the behaviour that should hold rather than the defect, and record what used to go wrong in a comment on the assertion that catches it. +- **Regression Tests:** Every bug fix ships with a test that fails without it. Name it after the behavior that should hold rather than the defect, and record what used to go wrong in a comment on the assertion that catches it. ### Fixtures diff --git a/ui/app/manager/src/index.ts b/ui/app/manager/src/index.ts index 76fee471ec..a217117519 100644 --- a/ui/app/manager/src/index.ts +++ b/ui/app/manager/src/index.ts @@ -322,7 +322,7 @@ Util.retryWithBackoff(async () => { } }) .catch((reason) => { - console.error("Failed to initialise app: " + reason); + console.error("Failed to initialize app: " + reason); }); } }); diff --git a/ui/app/manager/src/pages/page-assets.ts b/ui/app/manager/src/pages/page-assets.ts index 5f1910b4e1..257ebadfcd 100644 --- a/ui/app/manager/src/pages/page-assets.ts +++ b/ui/app/manager/src/pages/page-assets.ts @@ -255,7 +255,7 @@ export class PageAssets extends Page { `; } - // State is only utilised for initial loading, and for changes within the store. + // State is only utilized for initial loading, and for changes within the store. // On the assets page, we shouldn't change editMode nor assetIds if the URL/state hasn't changed. stateChanged(state: AssetsStateKeyed) { this.getRealmState(state); // Order is important here! diff --git a/ui/app/manager/src/pages/page-insights.ts b/ui/app/manager/src/pages/page-insights.ts index 5721412156..545e13737a 100644 --- a/ui/app/manager/src/pages/page-insights.ts +++ b/ui/app/manager/src/pages/page-insights.ts @@ -139,7 +139,7 @@ export class PageInsights extends Page { } stateChanged(state: AppStateKeyed) { - // State is only utilised for initial loading + // State is only utilized for initial loading this.getRealmState(state); // Order is important here! this._editMode = state.app.params && state.app.params.editMode diff --git a/ui/app/manager/test/fixtures/manager.ts b/ui/app/manager/test/fixtures/manager.ts index 2c5a19e8f6..c750903290 100644 --- a/ui/app/manager/test/fixtures/manager.ts +++ b/ui/app/manager/test/fixtures/manager.ts @@ -311,9 +311,9 @@ export class Manager { } /** - * When an application initialises a WebSocket this will assign that instance to the `window.ws` object. + * When an application initializes a WebSocket this will assign that instance to the `window.ws` object. * - * Must only be used inside a `await page.addInitScript` before the WebSocket gets initialised. + * Must only be used inside a `await page.addInitScript` before the WebSocket gets initialized. */ hijackWebSocket() { return () => { diff --git a/ui/app/manager/test/fixtures/pages/insights.ts b/ui/app/manager/test/fixtures/pages/insights.ts index 6a446f0018..b47336cdbb 100644 --- a/ui/app/manager/test/fixtures/pages/insights.ts +++ b/ui/app/manager/test/fixtures/pages/insights.ts @@ -210,9 +210,9 @@ export class InsightsPage implements BasePage { } /** - * Sets the custom line/bar colour of the (single) attribute in the open widget + * Sets the custom line/bar color of the (single) attribute in the open widget * settings. - * @param hex The colour to set, e.g. `#ff0000` + * @param hex The color to set, e.g. `#ff0000` */ async setAttributeColor(hex: string) { const settings = this.getWidgetSettings(); @@ -224,15 +224,15 @@ export class InsightsPage implements BasePage { (el as HTMLInputElement).value = value; el.dispatchEvent(new Event("input", { bubbles: true })); }, hex); - // The colour change is written to the config behind a debounce; wait for it - // to flush so the colour persists when the dashboard is saved. + // The color change is written to the config behind a debounce; wait for it + // to flush so the color persists when the dashboard is saved. await expect .poll(async () => (await this.getAttributeColors()).some(([, c]) => c?.toLowerCase() === hex.toLowerCase())) .toBe(true); } /** - * Reads the current value of the (single) custom colour input in the open + * Reads the current value of the (single) custom color input in the open * widget settings. */ getAttributeColorInput(): Locator { diff --git a/ui/app/manager/test/insights.test.ts b/ui/app/manager/test/insights.test.ts index ebbb6494cc..ee814eabe3 100644 --- a/ui/app/manager/test/insights.test.ts +++ b/ui/app/manager/test/insights.test.ts @@ -191,7 +191,7 @@ test("Replace broken chart references while preserving custom colors", async ({ await manager.goToRealmStartPage("smartcity"); await manager.navigateToTab("Insights"); - // Build a Line Chart and a Bar Chart referencing "Power", colour them, and save + // Build a Line Chart and a Bar Chart referencing "Power", color them, and save await expect(insightsPage.getDashboardListItems()).toHaveCount(0); await page.click(".mdi-plus >> nth=0"); await expect(insightsPage.getDashboardListItems()).toHaveCount(1); @@ -204,7 +204,7 @@ test("Replace broken chart references while preserving custom colors", async ({ const lineWidget = insightsPage.getWidgets({ hasText: "Line Chart" }).first(); const barWidget = insightsPage.getWidgets({ hasText: "Bar Chart" }).first(); - // Line chart: add the Power attribute and give it a custom red colour + // Line chart: add the Power attribute and give it a custom red color await insightsPage.selectWidget(lineWidget); await expect(insightsPage.getWidgetSettings({ hasText: "Line Chart" })).toBeVisible(); await insightsPage.resizeWidgetTo(lineWidget, [6, 6]); @@ -212,11 +212,11 @@ test("Replace broken chart references while preserving custom colors", async ({ await expect(insightsPage.getWidgetAttributes()).toHaveCount(1); await insightsPage.setAttributeColor("#ff0000"); await expect(insightsPage.getAttributeColorInput()).toHaveValue("#ff0000"); - // Change the custom colour a second time; to make sure that works. + // Change the custom color a second time; to make sure that works. await insightsPage.setAttributeColor("#0000ff"); await expect(insightsPage.getAttributeColorInput()).toHaveValue("#0000ff"); - // Bar chart: add the Power attribute and give it a custom green colour + // Bar chart: add the Power attribute and give it a custom green color await insightsPage.selectWidget(barWidget); await expect(insightsPage.getWidgetSettings({ hasText: "Bar Chart" })).toBeVisible(); await insightsPage.resizeWidgetTo(barWidget, [12, 6], { force: true }); @@ -224,7 +224,7 @@ test("Replace broken chart references while preserving custom colors", async ({ await expect(insightsPage.getWidgetAttributes()).toHaveCount(1); await insightsPage.setAttributeColor("#00ff00"); await expect(insightsPage.getAttributeColorInput()).toHaveValue("#00ff00"); - // Change the custom colour a second time; to make sure that works. + // Change the custom color a second time; to make sure that works. await insightsPage.setAttributeColor("#ffc400"); await expect(insightsPage.getAttributeColorInput()).toHaveValue("#ffc400"); @@ -264,7 +264,7 @@ test("Replace broken chart references while preserving custom colors", async ({ await linePicker.getByRole("button", { name: "Add" }).click(); await expect(linePicker).toBeHidden(); - // Line chart broken row should now be replaced and the custom colour migrated to the new ref + // Line chart broken row should now be replaced and the custom color migrated to the new ref await expect(insightsPage.getBrokenAttributeRows()).toHaveCount(0); await expect(insightsPage.getWidgetAttributes()).toHaveCount(1); await expect(insightsPage.getWidgetAttributes().first()).toContainText("Import Asset"); @@ -286,7 +286,7 @@ test("Replace broken chart references while preserving custom colors", async ({ await barPicker.getByRole("button", { name: "Add" }).click(); await expect(barPicker).toBeHidden(); - // Bar chart: broken row should be replaced and the custom colour migrated to the new ref + // Bar chart: broken row should be replaced and the custom color migrated to the new ref await expect(insightsPage.getBrokenAttributeRows()).toHaveCount(0); await expect(insightsPage.getWidgetAttributes()).toHaveCount(1); await expect(insightsPage.getWidgetAttributes().first()).toContainText("Import Asset"); diff --git a/ui/app/manager/test/map.test.ts b/ui/app/manager/test/map.test.ts index e9909c4e5c..c18269a580 100644 --- a/ui/app/manager/test/map.test.ts +++ b/ui/app/manager/test/map.test.ts @@ -177,7 +177,7 @@ test.describe("Marker config", () => { * * @skip This test is skipped on Firefox because headless mode does not support WebGL required by maplibre */ - test("should toggle asset marker colour based on attribute value", async ({ page, manager, browserName }) => { + test("should toggle asset marker color based on attribute value", async ({ page, manager, browserName }) => { test.skip(browserName === "firefox", "firefox headless mode does not support webgl required by maplibre"); await page.addInitScript(manager.hijackWebSocket()); @@ -240,7 +240,7 @@ test.describe("Marker config", () => { * * @skip This test is skipped on Firefox because headless mode does not support WebGL required by maplibre */ - test("should display marker with label and change marker colour based on attribute range", async ({ + test("should display marker with label and change marker color based on attribute range", async ({ page, manager, browserName, @@ -313,7 +313,7 @@ test.describe("Marker clustering", () => { * @given Assets with location are set up in the "smartcity" realm * @when Logging in to OpenRemote "smartcity" realm as "smartcity" * @and Navigating to the "map" page - * @then Shows cluster marker with the expected asset type colours + * @then Shows cluster marker with the expected asset type colors * @when Zooming in * @then Shows cluster marker reduce to 10 * @and Shows a normal marker @@ -726,7 +726,7 @@ test.describe("Preset filters", () => { }); /** - * Parameterised: for each filter option (including "All"), verify marker count and badge text. + * Parameterized: for each filter option (including "All"), verify marker count and badge text. * * @skip This test is skipped on Firefox because headless mode does not support WebGL required by maplibre */ @@ -769,7 +769,7 @@ test.describe("Preset filters", () => { /** * @given filters are configured, one of which has an explicit label and an unresolvable asset type * @when opening the preset filter dropdown - * @then the labelled option displays the configured label instead of a derived type name + * @then the labeled option displays the configured label instead of a derived type name * @when selecting that option * @then the select field shows the configured label as the selected value * diff --git a/ui/app/manager/test/notifications.test.ts b/ui/app/manager/test/notifications.test.ts index 0e5241bd7f..fd0d99426d 100644 --- a/ui/app/manager/test/notifications.test.ts +++ b/ui/app/manager/test/notifications.test.ts @@ -641,7 +641,7 @@ test.describe("Role-Based Access Control", () => { /** * @given A notification seeded into "smartcity" (REST) and a "smartcity" user with read:notifications only * @when That user opens the notification's details dialog - * @then The recipient type is shown, but the recipient's identity is sanitised away (shown as "-") + * @then The recipient type is shown, but the recipient's identity is sanitized away (shown as "-") */ test("should hide the recipient identity for a viewer without user/asset read permission", async ({ manager, diff --git a/ui/app/manager/test/rules.test.ts b/ui/app/manager/test/rules.test.ts index 89066dd949..6febf5ab7f 100644 --- a/ui/app/manager/test/rules.test.ts +++ b/ui/app/manager/test/rules.test.ts @@ -419,10 +419,10 @@ test("Create a When-Then rule for an asset with a alarm action", async ({ page, /** * @given A When-Then rule with an alarm action * @when Setting the alarm severity, which sits outside the settings dialog - * @and Editing the alarm title inside the dialog and cancelling - * @then The severity should be kept, and the saved rule should not contain the cancelled edit + * @and Editing the alarm title inside the dialog and canceling + * @then The severity should be kept, and the saved rule should not contain the canceled edit */ -test("Cancelling the alarm settings dialog discards only the changes made inside it", async ({ +test("Canceling the alarm settings dialog discards only the changes made inside it", async ({ page, manager, rulesPage, diff --git a/ui/app/shared/locales/en/or.json b/ui/app/shared/locales/en/or.json index 878bac8a53..958bd1a276 100644 --- a/ui/app/shared/locales/en/or.json +++ b/ui/app/shared/locales/en/or.json @@ -977,14 +977,14 @@ "center": "Center", "centerDescription": "The center point where the user will start on when loading the map", "logoMobile": "Logo mobile", - "realmColors": "Realm colours", + "realmColors": "Realm colors", "--or-app-color4": "Primary: buttons, actions, and list headers", "--or-app-color5": "Borders and lines: tables and separators", "--or-app-color6": "Invalid and errors: warning icons and helper text", - "--or-app-color1": "Surface: surface colour for dialogs, panels, and headers", - "--or-app-color2": "Background: colour behind surface panels", + "--or-app-color1": "Surface: surface color for dialogs, panels, and headers", + "--or-app-color2": "Background: color behind surface panels", "--or-app-color3": "Text: page and panel titles", - "--or-app-color8": "Text on primary: text on items with the primary colour", + "--or-app-color8": "Text on primary: text on items with the primary color", "navigation": "Navigation", "navigationDescription": "Primary navigation is shown in the page header, secondary items can be found in the menu on the right.", "primaryNavigation": "Primary menu", diff --git a/ui/component/core/README.md b/ui/component/core/README.md index 01da57b9cb..c1eb6d3d24 100644 --- a/ui/component/core/README.md +++ b/ui/component/core/README.md @@ -6,15 +6,15 @@ ES6 modules for connecting to an OpenRemote Manager as well as utilities for per The default export is a singleton of type `Manager` that can be used to connect to an OpenRemote Manager, initiate authentication and download common resources (translation files, icons, etc). Everything is initiated by calling -the `init` method, what tasks are performed during initialisation is determined by the `ManagerConfig` passed to the +the `init` method, what tasks are performed during initialization is determined by the `ManagerConfig` passed to the `init`, the tasks include the following: - Check the manager exists and is accessible (calls the `api/master/info` endpoint) -- Initialise authentication and perform login redirect (if requested in the `ManagerConfig`) +- Initialize authentication and perform login redirect (if requested in the `ManagerConfig`) - Download `mdi` iconset (if requested in the `ManagerConfig` - if not specified iconset will be downloaded) -- Initialise REST API client (`@openremote/rest`) - Sets a timeout of 10s and will also add a request interceptor to +- Initialize REST API client (`@openremote/rest`) - Sets a timeout of 10s and will also add a request interceptor to add required `Authorization` header for authentication -- Initialise console (the console is the device used to render the application desktop, Android or iOS device) +- Initialize console (the console is the device used to render the application desktop, Android or iOS device) - Download built in OpenRemote translation files - Download Asset Model Descriptors @@ -29,10 +29,10 @@ yarn add @openremote/core For a full list of properties, methods and options refer to the TypeDoc generated [documentation](<>). -Initialisation is done by calling the `init` method which returns a Promise that is fulfilled with a `boolean` indicating -whether initialisation was successful or not. +Initialization is done by calling the `init` method which returns a Promise that is fulfilled with a `boolean` indicating +whether initialization was successful or not. -Initialisation usage example: +Initialization usage example: ```$javascript import openremote from "@openremote/core"; @@ -85,7 +85,7 @@ class AssetComponent extends subscribe(openremote) { ### Events (`./dist/event`) Provides infrastructure for connecting to the OpenRemote Manager client event bus; by default an `EventProvider` instance -`Manager` is initialised by the `Manager` during the initialisation process and can be accessed from `openremote.events` +`Manager` is initialized by the `Manager` during the initialization process and can be accessed from `openremote.events` but it is also possible to instantiate an `EventProvider` manually. ### Util (`./dist/util`) diff --git a/ui/component/core/src/console.ts b/ui/component/core/src/console.ts index 59088381b2..197a2171d7 100644 --- a/ui/component/core/src/console.ts +++ b/ui/component/core/src/console.ts @@ -108,7 +108,7 @@ export class Console { consoleReg.apps = storedReg.apps; } } catch (e) { - console.error("Failed to deserialise console registration"); + console.error("Failed to deserialize console registration"); } } @@ -183,7 +183,7 @@ export class Console { return; } - console.debug("Console: initialising"); + console.debug("Console: initializing"); this._initialiseInProgress = true; try { @@ -218,7 +218,7 @@ export class Console { // to be retrieved from the replies; if that is required then providers should be manually enabled from the calling app public async enableProviders(): Promise { if (!this._initialised) { - throw new Error("Console must be initialised before enabling providers"); + throw new Error("Console must be initialized before enabling providers"); } for (let index = this._pendingProviderEnables.length - 1; index > -1; index--) { @@ -229,8 +229,8 @@ export class Console { public async enableProvider(providerName: string, data?: any): Promise { if (!this._initialised) { - console.debug("Console must be initialised before disabling providers"); - throw new Error("Console must be initialised before enabling providers"); + console.debug("Console must be initialized before disabling providers"); + throw new Error("Console must be initialized before enabling providers"); } if (!this._registration.providers!.hasOwnProperty(providerName)) { @@ -267,8 +267,8 @@ export class Console { public async disableProvider(provider: string): Promise { if (!this._initialised) { - console.debug("Console must be initialised before disabling providers"); - throw new Error("Console must be initialised before disabling providers"); + console.debug("Console must be initialized before disabling providers"); + throw new Error("Console must be initialized before disabling providers"); } if (!this._registration.providers!.hasOwnProperty(provider)) { @@ -639,7 +639,7 @@ export class Console { } protected async _initialiseProvider(providerName: string): Promise { - console.debug("Console: initialising provider '" + providerName + "'"); + console.debug("Console: initializing provider '" + providerName + "'"); let initResponse: ProviderInitialiseResponse; try { @@ -673,7 +673,7 @@ export class Console { } if (!initResponse.success) { - console.debug("Provider initialisation failed: '" + providerName + "'"); + console.debug("Provider initialization failed: '" + providerName + "'"); initResponse.disabled = true; this._registration.providers![providerName].disabled = true; } diff --git a/ui/component/core/src/index.ts b/ui/component/core/src/index.ts index dc08a9ec90..a06f6a1d68 100644 --- a/ui/component/core/src/index.ts +++ b/ui/component/core/src/index.ts @@ -104,7 +104,7 @@ export const I18NEXT_TO_MOMENT_LOCALE: Record = { }; /** - * Registers the formats the translations interpolate with on an initialised i18next instance. + * Registers the formats the translations interpolate with on an initialized i18next instance. * i18next lowercases a format name, so the Moment formats that only differ in case take an option. */ export function addTranslationFormats(i18n: i18n): void { @@ -135,7 +135,7 @@ export function normaliseConfig(config: ManagerConfig): ManagerConfig { (window.location.port ? ":" + window.location.port : "") + window.location.pathname.replace(/\/[^/]+\/?$/, ""); } else { - // Normalise by stripping any trailing slashes + // Normalize by stripping any trailing slashes normalisedConfig.managerUrl = normalisedConfig.managerUrl.replace(/\/+$/, ""); } @@ -369,7 +369,7 @@ export class Manager implements EventProviderFactory { protected async doInit(config: ManagerConfig): Promise { if (this._config) { - console.debug("Already initialised"); + console.debug("Already initialized"); } this._config = normaliseConfig(config); @@ -423,7 +423,7 @@ export class Manager implements EventProviderFactory { this._config.keycloakUrl = this._config.managerUrl + "/auth"; } - // Normalise by stripping any trailing slashes + // Normalize by stripping any trailing slashes this._config.keycloakUrl = this._config.keycloakUrl.replace(/\/+$/, ""); success = await this.doAuthInit(); @@ -461,7 +461,7 @@ export class Manager implements EventProviderFactory { this._emitEvent(OREvent.READY); } else { (this._config as any) = undefined; - console.warn("Failed to initialise the manager"); + console.warn("Failed to initialize the manager"); } this.displayRealm = config.realm || "master"; @@ -872,7 +872,7 @@ export class Manager implements EventProviderFactory { const returnedFromLogin = hash.has("state") && hash.has("code"); try { - // Initialise keycloak + // Initialize keycloak this._keycloak = new Keycloak({ clientId: this._config.clientId!, realm: this._config.realm!, @@ -924,7 +924,7 @@ export class Manager implements EventProviderFactory { return true; } catch (error) { this._authenticated = false; - console.error("Failed to initialise Keycloak: " + error); + console.error("Failed to initialize Keycloak: " + error); if (returnedFromLogin && this._keycloak && this._startNewLogin()) { return false; } diff --git a/ui/component/core/src/util.ts b/ui/component/core/src/util.ts index e72e3638ef..18c265f396 100644 --- a/ui/component/core/src/util.ts +++ b/ui/component/core/src/util.ts @@ -414,7 +414,7 @@ export function camelCaseToSentenceCase(str: string | undefined): string { // Skip empty blocks if (!v) return v; - // If first block then capitalise 1st letter regardless + // If first block then capitalize 1st letter regardless if (!startDone) { startDone = true; return v.charAt(0).toUpperCase() + v.slice(1); diff --git a/ui/component/or-app/src/index.ts b/ui/component/or-app/src/index.ts index 2fdaaee050..4c0235465c 100644 --- a/ui/component/or-app/src/index.ts +++ b/ui/component/or-app/src/index.ts @@ -267,7 +267,7 @@ export class OrApp extends OrElement { if (!managerConfig.defaultLanguage) { managerConfig.defaultLanguage = Util.getBrowserLanguage(); } - console.info("Initialising the manager"); + console.info("Initializing the manager"); const started = manager.init(managerConfig).then(async (success) => { if (success) { diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts index 0d17bbb35a..0ceea83af6 100644 --- a/ui/component/or-asset-viewer/src/index.ts +++ b/ui/component/or-asset-viewer/src/index.ts @@ -1705,7 +1705,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(OrEleme (asset.version !== this._assetInfo.asset?.version && // Version is different from what is loaded !this._saveInProgress); // And save isn't in progress if (reloadAsset && this.editMode && this._assetInfo?.modified) { - // Asset has changed whilst we're editing it so inform the user and reload + // Asset has changed while we're editing it so inform the user and reload showConfirmDialog( this.shadowRoot!, html` diff --git a/ui/component/or-chart/src/index.ts b/ui/component/or-chart/src/index.ts index b8b85f16dc..ae9e86a7ae 100644 --- a/ui/component/or-chart/src/index.ts +++ b/ui/component/or-chart/src/index.ts @@ -1602,7 +1602,7 @@ export class OrChart extends translate(i18next)(OrElement) { this._zoomChanged = false; } catch (ex) { if ((ex as Error)?.message === "canceled") { - console.debug("Cancelled chart data request. (probably because another request is taking place)"); + console.debug("Canceled chart data request. (probably because another request is taking place)"); return; // If request has been canceled (using AbortController); return, and prevent _loading is set to false. } console.warn(ex); diff --git a/ui/component/or-components/src/or-loading-wrapper.ts b/ui/component/or-components/src/or-loading-wrapper.ts index 9bf0a73832..bd93f723e6 100644 --- a/ui/component/or-components/src/or-loading-wrapper.ts +++ b/ui/component/or-components/src/or-loading-wrapper.ts @@ -21,7 +21,7 @@ import { OrElement } from "@openremote/or-element"; import { customElement, property } from "lit/decorators.js"; /** - * A simple loading wrapper around some other content that will hide the content whilst loading property is true + * A simple loading wrapper around some other content that will hide the content while loading property is true */ @customElement("or-loading-wrapper") export class OrLoadingWrapper extends OrElement { diff --git a/ui/component/or-dashboard-builder/README.md b/ui/component/or-dashboard-builder/README.md index d757e26f87..b470fa5de1 100644 --- a/ui/component/or-dashboard-builder/README.md +++ b/ui/component/or-dashboard-builder/README.md @@ -28,7 +28,7 @@ Here it is: | **Dashboard** | The board / area that contains widgets. (stored in database) | | **Widget** | The object on the dashboard that contains information like content (stored in database) | | _WidgetContainer_ | Wrapper that displays widget content, header, and its actions | -| _WidgetSettings_ | The available settings to customise WidgetConfig, | +| _WidgetSettings_ | The available settings to customize WidgetConfig, | | **Insights** | 'The showcase term' we use for the page in our Manager App. We also have an "Insights app" that is a standalone app for viewing your dashboards. |
        diff --git a/ui/component/or-dashboard-builder/src/index.ts b/ui/component/or-dashboard-builder/src/index.ts index c25cfa4d2c..edb044a6d5 100644 --- a/ui/component/or-dashboard-builder/src/index.ts +++ b/ui/component/or-dashboard-builder/src/index.ts @@ -244,7 +244,7 @@ export function getActivePreset( } // A map containing a unique identifier as key, and a WidgetManifest (displayName, displayIcon and HTML tags) as value. -// We will use this for or-dashboard-browser and to initialise widgets, based on the html tags. +// We will use this for or-dashboard-browser and to initialize widgets, based on the html tags. export const widgetTypes: Map = new Map(); export function registerWidgetTypes() { diff --git a/ui/component/or-dashboard-builder/src/or-dashboard-engine.ts b/ui/component/or-dashboard-builder/src/or-dashboard-engine.ts index 6ac2fce886..f256b006bb 100644 --- a/ui/component/or-dashboard-builder/src/or-dashboard-engine.ts +++ b/ui/component/or-dashboard-builder/src/or-dashboard-engine.ts @@ -36,9 +36,9 @@ gridStackInternals._sortDom = function (this: GridStack) { }; export class OrDashboardEngine extends GridStackEngine { - // Cancelling move when it collides with the same widget. + // Canceling move when it collides with the same widget. // Apparently during some rerenders, the widget moved downwards after colliding with itself. - // Now cancelling the movement when the IDs are the same. + // Now canceling the movement when the IDs are the same. public moveNode(node: GridStackNode, o: GridStackMoveOpts): boolean { if (o.skip && o.skip.id == node.id) { o.x = o.skip.x; diff --git a/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.ts b/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.ts index 7099471b9d..b024d9729d 100644 --- a/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.ts +++ b/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.ts @@ -137,7 +137,7 @@ export class OrDashboardWidgetContainer extends OrElement { } protected initializeWidgetElem(manifest: WidgetManifest, config: WidgetConfig) { - console.debug(`Initialising ${manifest.displayName} widget..`); + console.debug(`Initializing ${manifest.displayName} widget..`); if (this.orWidget) { this.orWidget.remove(); } diff --git a/ui/component/or-icon/README.md b/ui/component/or-icon/README.md index 076aa9bbcd..0ea0a0e8d8 100644 --- a/ui/component/or-icon/README.md +++ b/ui/component/or-icon/README.md @@ -17,7 +17,7 @@ For a full list of properties, methods and options refer to the TypeDoc generate Icons are defined in iconsets, there are two iconsets provided by default and new ones can be created as required (see [demo-core](../../demo/demo-core)), The `mdi` iconset is quite large and it is possible to prevent loading of this -when initialising the OpenRemote `Manager` via the `ManagerConfig`: +when initializing the OpenRemote `Manager` via the `ManagerConfig`: - `mdi` - [Material Design Icons](https://materialdesignicons.com/) - `or` - OpenRemote icons (see [here](./or-iconset.ts)) diff --git a/ui/component/or-json-forms/src/util.ts b/ui/component/or-json-forms/src/util.ts index df2efd848b..5d00723f9f 100644 --- a/ui/component/or-json-forms/src/util.ts +++ b/ui/component/or-json-forms/src/util.ts @@ -386,7 +386,7 @@ export const showJsonEditor = (title: string, value: any, updateCallback: (newVa const editorRef: Ref = createRef(); const updateBtnRef: Ref = createRef(); const onEditorEdit = () => { - // Disable update button whilst edit in progress + // Disable update button while edit in progress updateBtnRef.value!.disabled = true; }; const onEditorChanged = (ev: OrAceEditorChangedEvent) => { diff --git a/ui/component/or-map/src/asset-map.ts b/ui/component/or-map/src/asset-map.ts index 38a345e911..73eadc90c6 100644 --- a/ui/component/or-map/src/asset-map.ts +++ b/ui/component/or-map/src/asset-map.ts @@ -454,7 +454,7 @@ export class AssetMap extends BaseMap { } /** - * Registers the colour of an asset type the map has not seen before + * Registers the color of an asset type the map has not seen before * @returns Whether the type is new, meaning the cluster properties are out of date */ private _addAssetType(type: string) { diff --git a/ui/component/or-map/src/markers/or-map-marker.ts b/ui/component/or-map/src/markers/or-map-marker.ts index feb4799a86..b37d10a2d0 100644 --- a/ui/component/or-map/src/markers/or-map-marker.ts +++ b/ui/component/or-map/src/markers/or-map-marker.ts @@ -242,7 +242,7 @@ export class OrMapMarker extends OrElement { } /** - * Override in sub types to customise the look of the marker. If undefined returned then a default marker will + * Override in sub types to customize the look of the marker. If undefined returned then a default marker will * be used instead. */ public createMarkerContent(): HTMLElement | undefined { diff --git a/ui/component/or-mwc-components/stories/input/color.stories.ts b/ui/component/or-mwc-components/stories/input/color.stories.ts index 037835c879..0ecdcd29d2 100644 --- a/ui/component/or-mwc-components/stories/input/color.stories.ts +++ b/ui/component/or-mwc-components/stories/input/color.stories.ts @@ -50,7 +50,7 @@ const meta: Meta = { export const Primary: Story = { args: { type: InputType.COLOUR, - label: "Colour picker", + label: "Color picker", }, }; diff --git a/ui/component/or-rules/src/index.ts b/ui/component/or-rules/src/index.ts index 7495388094..94b40e4676 100644 --- a/ui/component/or-rules/src/index.ts +++ b/ui/component/or-rules/src/index.ts @@ -973,8 +973,8 @@ export class OrRules extends translate(i18next)(OrElement) { /** * HTML event callback on when a "rule (or group) selection is requested". - * It is a cancellable event that can prompt a user "to discard changes" if they have been made. - * @param event - The cancellable selection event + * It is a cancelable event that can prompt a user "to discard changes" if they have been made. + * @param event - The cancelable selection event */ protected _onRuleSelectionRequested(event: OrRulesRequestSelectionEvent) { const isModified = this._viewer?.modified; @@ -1168,7 +1168,7 @@ export class OrRules extends translate(i18next)(OrElement) { if (node.ruleset) { moveAndSave(node.ruleset, groupId) ?.then(() => { - this._rulesTree?.moveNodesToGroup([node], ev.detail.groupNode); // move the nodes again, as the initial event got cancelled. + this._rulesTree?.moveNodesToGroup([node], ev.detail.groupNode); // move the nodes again, as the initial event got canceled. showSnackbar(undefined, "ruleDragSuccess!"); }) .catch(() => { diff --git a/ui/component/or-translate/stories/or-translate.stories.ts b/ui/component/or-translate/stories/or-translate.stories.ts index 7265cdb594..003733f063 100644 --- a/ui/component/or-translate/stories/or-translate.stories.ts +++ b/ui/component/or-translate/stories/or-translate.stories.ts @@ -66,7 +66,7 @@ export { customElements, packageJson }; /* ------------------------------------------------------- */ /** - * Initialises {@link OrTranslate}, awaits initialization, and returns the HTML object. + * Initializes {@link OrTranslate}, awaits initialization, and returns the HTML object. */ async function loadOrTranslate(storyArgs: any) { console.debug("Loading OrTranslate..."); diff --git a/ui/component/or-tree-menu/src/index.ts b/ui/component/or-tree-menu/src/index.ts index 5848a54368..4ef0fecd6f 100644 --- a/ui/component/or-tree-menu/src/index.ts +++ b/ui/component/or-tree-menu/src/index.ts @@ -572,7 +572,7 @@ export class OrTreeMenu extends OrElement { } /** - * Dispatches a cancellable tree drag event. + * Dispatches a cancelable tree drag event. */ protected _dispatchCancellableDragEvent( nodes: TreeNode[], @@ -600,7 +600,7 @@ export class OrTreeMenu extends OrElement { const selected = [...this._findSelectedTreeNodes()]; const treeNode = this._getTreeNodeFromTree(node); if (treeNode) selected.push(treeNode); - const success = this._dispatchSelectEvent(selected); // Dispatch a "select" event, and return when cancelled by a consumer + const success = this._dispatchSelectEvent(selected); // Dispatch a "select" event, and return when canceled by a consumer if (!success) return; } node.selected = true; @@ -626,7 +626,7 @@ export class OrTreeMenu extends OrElement { selectedNodes.push(nodes[x]); } } - // Dispatch a "select" event with the new nodes. If cancelled, we will not select the nodes. + // Dispatch a "select" event with the new nodes. If canceled, we will not select the nodes. if (notify) { const nodes = selectedNodes.map((n) => this._getTreeNodeFromTree(n)).filter((n) => n) as TreeNode[]; const success = this._notifyNodesSelect(nodes); @@ -639,7 +639,7 @@ export class OrTreeMenu extends OrElement { /** * Function that notifies parent HTMLElements that a tree node got selected. * It dispatches the OrTreeSelectEvent, which includes a list of the selected nodes. - * @returns a 'success' boolean whether the event was cancelled or not + * @returns a 'success' boolean whether the event was canceled or not */ protected async _notifyNodesSelect(selectedNodes?: TreeNode[]) { await this.getUpdateComplete(); // await render to include the latest changes. @@ -694,7 +694,7 @@ export class OrTreeMenu extends OrElement { /** * Utility function for sending a "select" event, so consumers of this component are aware a new node has been selected. * @param selectedNodes - List of selected nodes to include in the event payload. - * @returns a 'success' boolean whether the event was cancelled or not. + * @returns a 'success' boolean whether the event was canceled or not. */ protected _dispatchSelectEvent(selectedNodes?: TreeNode[]): boolean { return this.dispatchEvent(new OrTreeSelectEvent(selectedNodes || [])); diff --git a/ui/component/or-vaadin-components/src/or-vaadin-checkbox-group.ts b/ui/component/or-vaadin-components/src/or-vaadin-checkbox-group.ts index 63e39e1e36..2b6c5ab18a 100644 --- a/ui/component/or-vaadin-components/src/or-vaadin-checkbox-group.ts +++ b/ui/component/or-vaadin-components/src/or-vaadin-checkbox-group.ts @@ -27,7 +27,7 @@ export type * from "@vaadin/checkbox-group"; @customElement("or-vaadin-checkbox-group") export class OrVaadinCheckboxGroup extends CheckboxGroup implements OrVaadinComponent { /* - * Vaadin's `CheckboxGroupMixin` recognises group items via a strict `localName === "vaadin-checkbox"` + * Vaadin's `CheckboxGroupMixin` recognizes group items via a strict `localName === "vaadin-checkbox"` * check, so wrapped children (`or-vaadin-checkbox`, `or-vaadin-toggle`) would never register: the * group's `value`, its validation and its disabled/readonly propagation would all ignore them. * Accept any `Checkbox` subclass instead. This overrides a private Vaadin API, so re-check it when diff --git a/ui/component/or-vaadin-components/src/or-vaadin-dialog.ts b/ui/component/or-vaadin-components/src/or-vaadin-dialog.ts index c1c4f584ad..fbf6ea900e 100644 --- a/ui/component/or-vaadin-components/src/or-vaadin-dialog.ts +++ b/ui/component/or-vaadin-components/src/or-vaadin-dialog.ts @@ -75,7 +75,7 @@ export class OrVaadinDialog extends (Dialog as new () => Dialog & LitElement) im background-color: var(--lumo-contrast-5pct); } ::part(header) { - /* Colour header icons (e.g. the close cross) with the primary colour */ + /* Color header icons (e.g. the close cross) with the primary color */ --internal-or-icon-fill: var(--lumo-primary-color); } ::part(header), diff --git a/ui/component/or-vaadin-components/src/or-vaadin-toggle-group.ts b/ui/component/or-vaadin-components/src/or-vaadin-toggle-group.ts index 20d15be4c3..4172d3d600 100644 --- a/ui/component/or-vaadin-components/src/or-vaadin-toggle-group.ts +++ b/ui/component/or-vaadin-components/src/or-vaadin-toggle-group.ts @@ -21,7 +21,7 @@ import { OrVaadinCheckboxGroup } from "./or-vaadin-checkbox-group"; import "./or-vaadin-toggle"; /* - * A checkbox-group specialised for `` children. It exists only to give the toggle + * A checkbox-group specialized for `` children. It exists only to give the toggle * group its own tag so the spacing between toggles can be set (in the theme) without committing the * shared `` to a gap value (still undecided for checkboxes). */ diff --git a/ui/component/or-vaadin-components/src/or-vaadin-toggle.ts b/ui/component/or-vaadin-components/src/or-vaadin-toggle.ts index f289150e00..2b7b50c149 100644 --- a/ui/component/or-vaadin-components/src/or-vaadin-toggle.ts +++ b/ui/component/or-vaadin-components/src/or-vaadin-toggle.ts @@ -24,7 +24,7 @@ import type { LitElement } from "lit"; /* * The toggle reuses the Vaadin `` as its base, so it inherits the checkbox's - * behaviour, form participation, accessibility and `checked` / `readonly` / `disabled` states. + * behavior, form participation, accessibility and `checked` / `readonly` / `disabled` states. * Only the visuals and the exposed role differ: the `checkbox` part is restyled into a pill-shaped * track with a sliding knob, and the input is exposed as a `switch` to assistive technology. * diff --git a/ui/component/or-vaadin-components/test/or-vaadin-toggle.test.ts b/ui/component/or-vaadin-components/test/or-vaadin-toggle.test.ts index 8453807a18..6cbe71e7d9 100644 --- a/ui/component/or-vaadin-components/test/or-vaadin-toggle.test.ts +++ b/ui/component/or-vaadin-components/test/or-vaadin-toggle.test.ts @@ -305,7 +305,7 @@ ct.describe("Group", () => { * Image snapshots are not used in this repo, so the toggle's key visual invariants are asserted * through computed styles instead. This guards the restyled shadow internals against Vaadin * upgrades: a change in the base checkbox styles could otherwise e.g. hide the knob in the off - * state or restore the 500 label weight without any of the behavioural tests failing. + * state or restore the 500 label weight without any of the behavioral tests failing. * The expected values are the defaults of the public `--or-toggle-*` variables. */ ct.describe("Styling", () => { diff --git a/ui/demo/demo-core/src/index.ts b/ui/demo/demo-core/src/index.ts index 3d439af28e..cb01b06019 100644 --- a/ui/demo/demo-core/src/index.ts +++ b/ui/demo/demo-core/src/index.ts @@ -61,7 +61,7 @@ class OrDemo extends subscribe(manager)(LitElement) { return html`

        Message: ${manager.authenticated ? this.loggedInTemplate(manager) : this.loggedOutTemplate(manager)}


        -

        Initialised: ${manager.ready}

        +

        Initialized: ${manager.ready}

        Manager Version: ${manager.managerVersion}

        Authenticated: ${manager.authenticated}

        Username: ${manager.username}

        diff --git a/ui/util/rspack.util.js b/ui/util/rspack.util.js index 974cb42cf4..d71e4f501e 100644 --- a/ui/util/rspack.util.js +++ b/ui/util/rspack.util.js @@ -86,7 +86,7 @@ function getAppConfig(mode, isDevServer, dirname, managerUrl, keycloakUrl, port) if (isDevServer) { console.log(""); - console.log("To customise the URL of the manager and/or keycloak use the managerUrl and/or keycloakUrl"); + console.log("To customize the URL of the manager and/or keycloak use the managerUrl and/or keycloakUrl"); console.log(" environment arguments e.g: "); console.log(""); console.log("npm run serve -- --env managerUrl=https://127.0.0.1");