This commit is contained in:
commit
aa56926258
27
.editorconfig
Normal file
27
.editorconfig
Normal file
@ -0,0 +1,27 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Default settings
|
||||
# Each of the following settings can be overwritten for any file type / path.
|
||||
[*]
|
||||
charset = utf-8
|
||||
# Use spaces instead of tabs
|
||||
indent_style = space
|
||||
# 2 space indentation by default
|
||||
indent_size = 2
|
||||
# 4 space continuation indentation (might not be supported for all file types/domains)
|
||||
continuation_indent_size = 4
|
||||
# Use Unix-style newlines
|
||||
end_of_line = lf
|
||||
# New line at the end of each file
|
||||
insert_final_newline = true
|
||||
# Trim trailing whitespaces
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.bat]
|
||||
end_of_line = crlf
|
29
.gitattributes
vendored
Normal file
29
.gitattributes
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.adoc text
|
||||
*.gradle text
|
||||
*.java text
|
||||
*.puml text
|
||||
|
||||
# Declare files that will always have CRLF line endings on checkout.
|
||||
*.bat text eol=crlf
|
||||
|
||||
# Declare files that will always have LF line endings on checkout.
|
||||
*.directory text eol=lf
|
||||
*.desktop text eol=lf
|
||||
*.menu text eol=lf
|
||||
*.sh text eol=lf
|
||||
gradlew text eol=lf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.gif binary
|
||||
*.jar binary
|
||||
*.jpg binary
|
||||
*.png binary
|
||||
*.tar.gz binary
|
47
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
47
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Affected version
|
||||
|
||||
_Name the affected version, i.e. "release x.y.z" or "revision <HASH>"._
|
||||
|
||||
...
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
_How can the incorrect behaviour be reproduced?_
|
||||
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
### Expected behaviour
|
||||
|
||||
_What would be the correct/expected behaviour?_
|
||||
|
||||
...
|
||||
|
||||
### Actual behaviour
|
||||
|
||||
_What behaviour can actually be observed instead of the correct behaviour?_
|
||||
|
||||
...
|
||||
|
||||
### Additional information
|
||||
|
||||
_Other data that can help with fixing the defect, e.g. logs, screenshots etc._
|
||||
|
||||
* Operating system and version: _e.g. Ubuntu Linux 20.04, Windows 10, ..._
|
||||
* Java distribution version: _e.g. Oracle Java Runtime Environment 13_
|
||||
* ...
|
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
---
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Ask a question or get support
|
||||
url: https://github.com/opentcs/opentcs/discussions
|
||||
about: Ask a question or request support for using openTCS
|
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## User story / use case
|
||||
|
||||
_A description of the proposed functionality. What is the purpose of this proposal? What problems would it solve? Are there already ideas for a solution?_
|
51
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
51
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
## Description
|
||||
|
||||
<!--
|
||||
Please explain the changes you made here, and why you made them.
|
||||
If this PR is related to an issue, reference it here.
|
||||
Note that, with a reference to an issue and/or an expressive commit message (see below), you can usually keep this quite short.
|
||||
-->
|
||||
|
||||
...
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] You have the right to contribute the code/documentation/assets to this project, and you agree to contribute it under the terms of the project's license(s).
|
||||
- [ ] All changes have been made on a separate branch (not master) in a fork.
|
||||
- [ ] The whole project compiles correctly and all tests pass, i.e. `gradlew clean build` succeeds with the changes made, and without unavoidable compiler/toolchain warnings.
|
||||
- [ ] New tests covering the change have been added, if it is possible / makes sense.
|
||||
- [ ] The documentation has been extended, if necessary.
|
||||
- [ ] The PR contains a proposal for a _well-formed_ commit message that mentions all authors who contributed to the PR.
|
||||
(The commits in the PR will be squashed into one commit on the base branch, and your proposed message is intended to be used for this commit. See below for a template you can use for the message. See [this blog post](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) and [this one](https://chris.beams.io/posts/git-commit/#seven-rules) for more on well-formed commit messages.)
|
||||
|
||||
## Proposed squash commit message
|
||||
|
||||
<!--
|
||||
A proposed message for the eventual squashed commit.
|
||||
Please stick to the following pattern:
|
||||
|
||||
- A short one-line summary (max. 50 characters).
|
||||
- A blank line.
|
||||
- A detailed explanation of the changes introduced by this merge request.
|
||||
Each line should not exceed 72 characters.
|
||||
*********1*********2*********3*********4*********5*********6*********7** (<-- Ruler for line width assistance)
|
||||
-->
|
||||
```
|
||||
A short one-line summary (max. 50 characters)
|
||||
|
||||
A more detailed explanation of the changes introduced by this merge
|
||||
request.
|
||||
|
||||
* You can use lists here, too.
|
||||
* Each line should not exceed 72 characters.
|
||||
|
||||
Co-authored-by: NAME <EMAIL>
|
||||
```
|
||||
<!--
|
||||
*********1*********2*********3*********4*********5*********6*********7** (<-- Ruler for line width assistance)
|
||||
-->
|
43
.github/workflows/build.yml
vendored
Normal file
43
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: Gradle Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # (=v4.1.1)
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # (=v4.0.0)
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # (=v2.1.1)
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # (=v4.0.0)
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Check code formatting
|
||||
run: ./gradlew spotlessCheck
|
||||
- name: Cleanup Gradle Cache
|
||||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
|
||||
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
|
||||
run: |
|
||||
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
||||
rm -f ~/.gradle/caches/modules-2/gc.properties
|
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
/.idea/*
|
||||
!/.idea/codeStyles
|
||||
!/.idea/runConfigurations
|
||||
/.gradle/
|
||||
/build/
|
||||
/opentcs-*/build/
|
||||
*~
|
||||
|
||||
# Ignore approval test result files.
|
||||
*Test*.received.txt
|
222
.gitlab-ci.yml
Normal file
222
.gitlab-ci.yml
Normal file
@ -0,0 +1,222 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
default:
|
||||
image: eclipse-temurin:21-jdk-jammy
|
||||
tags:
|
||||
- opentcs-runner
|
||||
before_script:
|
||||
# Put GRADLE_USER_HOME into the cache directory so the wrapper and dependencies are not
|
||||
# re-downloaded for every job.
|
||||
- export GRADLE_USER_HOME=`pwd`/.gradle
|
||||
timeout: 15 minutes
|
||||
|
||||
include: '.gitlab/docker/codequality/version.yml'
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == "web"
|
||||
|
||||
variables:
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
DO_BUILD_CODEQUALITY_IMAGE:
|
||||
value: "false"
|
||||
description: "Whether ('true') or not ('false') to (re-)build the Docker image for code quality jobs."
|
||||
DO_DEPLOY_PRIVATE:
|
||||
value: "false"
|
||||
description: "Whether ('true') or not ('false') to deploy artifacts to private (GitLab) repository."
|
||||
DO_DEPLOY_OSSRH:
|
||||
value: "false"
|
||||
description: "Whether ('true') or not ('false') to deploy artifacts to the public OSSRH repository, e.g. for release builds."
|
||||
NO_BUILD_NUMBER:
|
||||
value: "false"
|
||||
description: "Whether ('true') or not ('false') to exclude the build number in the artifacts' version number, e.g. for release builds."
|
||||
SIGNING_KEY:
|
||||
value: ""
|
||||
description: "The key to use for signing artifacts."
|
||||
SIGNING_PASSWORD:
|
||||
value: ""
|
||||
description: "The password to use for signing artifacts."
|
||||
DEPLOY_REPO_OSSRH_USERNAME:
|
||||
value: ""
|
||||
description: "User name for logging in with the public OSSRH repository."
|
||||
DEPLOY_REPO_OSSRH_PASSWORD:
|
||||
value: ""
|
||||
description: "Password for logging in with the public OSSRH repository."
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
build_code_quality_image:
|
||||
stage: build
|
||||
rules:
|
||||
- if: $DO_BUILD_CODEQUALITY_IMAGE == "true"
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:v1.9.1-debug
|
||||
entrypoint: [""]
|
||||
dependencies: []
|
||||
script:
|
||||
- echo "Building code quality image with tag ${CODEQUALITY_IMAGE_TAG}..."
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||
- '/kaniko/executor
|
||||
--context "${CI_PROJECT_DIR}/.gitlab/docker/codequality"
|
||||
--dockerfile "${CI_PROJECT_DIR}/.gitlab/docker/codequality/Dockerfile"
|
||||
--destination "${CI_REGISTRY_IMAGE}/codequality:${CODEQUALITY_IMAGE_TAG}"'
|
||||
|
||||
build:
|
||||
stage: build
|
||||
interruptible: true
|
||||
dependencies: []
|
||||
script:
|
||||
- ./gradlew -x check release testClasses -PNO_BUILD_NUMBER="$NO_BUILD_NUMBER"
|
||||
artifacts:
|
||||
name: 'opentcs-build-b$CI_PIPELINE_IID'
|
||||
paths:
|
||||
- .gradle
|
||||
- opentcs-*/build/classes/
|
||||
- opentcs-*/build/generated/
|
||||
- opentcs-*/build/libs/
|
||||
- opentcs-*/build/resources/
|
||||
- opentcs-*/build/tmp/
|
||||
exclude:
|
||||
- .gradle/.tmp/**/*
|
||||
- .gradle/caches/**/*
|
||||
- .gradle/wrapper/**/*
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
key: build_test_deploy-$(date +%Y-%m)
|
||||
paths:
|
||||
- .gradle
|
||||
|
||||
test:
|
||||
stage: test
|
||||
interruptible: true
|
||||
dependencies:
|
||||
- build
|
||||
script:
|
||||
- echo "Touching build results to prevent Gradle rebuilding them..."
|
||||
- find .gradle | xargs touch
|
||||
- find . -regex '\./opentcs-[^/]+/build/.*' | xargs touch
|
||||
- echo "Running unit tests..."
|
||||
- ./gradlew test jacocoLogAggregatedCoverage -PNO_BUILD_NUMBER="$NO_BUILD_NUMBER"
|
||||
coverage: '/Branch Coverage: ([0-9.]+)%/'
|
||||
artifacts:
|
||||
name: 'opentcs-test-b$CI_PIPELINE_IID'
|
||||
paths:
|
||||
# Results of (failed) approval tests.
|
||||
- opentcs-*/**/*.received.txt
|
||||
reports:
|
||||
junit: opentcs-*/build/test-results/test/TEST-*.xml
|
||||
when: always
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
key: build_test_deploy-$(date +%Y-%m)
|
||||
paths:
|
||||
- .gradle
|
||||
|
||||
lint-spotless:
|
||||
stage: test
|
||||
interruptible: true
|
||||
dependencies: []
|
||||
script:
|
||||
- echo "Running Spotless check..."
|
||||
- ./gradlew spotlessCheck
|
||||
cache:
|
||||
key: lint_spotless-$(date +%Y-%m)
|
||||
paths:
|
||||
- .gradle
|
||||
|
||||
lint-checkstyle:
|
||||
stage: test
|
||||
interruptible: true
|
||||
image: ${CI_REGISTRY_IMAGE}/codequality:${CODEQUALITY_IMAGE_TAG}
|
||||
variables:
|
||||
CHANGELOG_FILE: opentcs-documentation/src/docs/release-notes/changelog.adoc
|
||||
MALFORMED_HEADERS_FILE: malformed_section_headers.txt
|
||||
CODE_CLIMATE_FILE: gl-code-quality-report.json
|
||||
dependencies:
|
||||
- build
|
||||
script:
|
||||
- echo "Touching build results to prevent Gradle rebuilding them..."
|
||||
- find .gradle | xargs touch
|
||||
- find . -regex '\./opentcs-[^/]+/build/.*' | xargs touch
|
||||
- echo "Checking for changelog headers that do not match 'Version x.y.z (yyyy-mm-dd)'..."
|
||||
- '( grep --extended-regexp "^==[^=]" $CHANGELOG_FILE
|
||||
| grep --invert-match --extended-regexp "^== Version [0-9]+\.[0-9]+(\.[0-9]+)? +\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\)$"
|
||||
> $MALFORMED_HEADERS_FILE )
|
||||
|| true'
|
||||
- 'if [ -s $MALFORMED_HEADERS_FILE -a $NO_BUILD_NUMBER = "true" ] ; then
|
||||
echo "Found malformed changelog headers:" ;
|
||||
cat $MALFORMED_HEADERS_FILE ;
|
||||
exit 1 ;
|
||||
fi'
|
||||
- rm -f $MALFORMED_HEADERS_FILE
|
||||
- echo "Running CheckStyle checks..."
|
||||
- ./gradlew checkstyleMain checkstyleTest checkstyleGuiceConfig
|
||||
- echo "Converting CheckStyle reports to CodeClimate report..."
|
||||
- violations-command-line -cc $CODE_CLIMATE_FILE -print-violations false -diff-print-violations true -v "CHECKSTYLE" "." ".*checkstyle/.*\.xml$" "Checkstyle"
|
||||
- sed -i.bak -e "s,$CI_PROJECT_DIR/,,g" $CODE_CLIMATE_FILE
|
||||
artifacts:
|
||||
reports:
|
||||
codequality: $CODE_CLIMATE_FILE
|
||||
when: always
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
key: lint_checkstyle-$(date +%Y-%m)
|
||||
paths:
|
||||
- .gradle
|
||||
|
||||
lint-reuse:
|
||||
stage: test
|
||||
interruptible: true
|
||||
dependencies: []
|
||||
image:
|
||||
name: fsfe/reuse:4.0.3
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- reuse lint
|
||||
|
||||
deploy_private:
|
||||
stage: deploy
|
||||
rules:
|
||||
- if: $DO_DEPLOY_PRIVATE == "true"
|
||||
dependencies:
|
||||
- build
|
||||
script:
|
||||
- './gradlew -x check publish
|
||||
-PDO_DEPLOY_PRIVATE="true"
|
||||
-PDO_DEPLOY_OSSRH="false"
|
||||
-PNO_BUILD_NUMBER="$NO_BUILD_NUMBER"
|
||||
-PSIGNING_KEY="$SIGNING_KEY"
|
||||
-PSIGNING_PASSWORD="$SIGNING_PASSWORD"'
|
||||
cache:
|
||||
key: build_test_deploy-$(date +%Y-%m)
|
||||
paths:
|
||||
- .gradle
|
||||
policy: pull
|
||||
|
||||
deploy_ossrh:
|
||||
stage: deploy
|
||||
rules:
|
||||
- if: $DO_DEPLOY_OSSRH == "true"
|
||||
dependencies:
|
||||
- build
|
||||
script:
|
||||
- './gradlew -x check publishToSonatype closeAndReleaseStagingRepositories
|
||||
-PDO_DEPLOY_PRIVATE="false"
|
||||
-PDO_DEPLOY_OSSRH="true"
|
||||
-PNO_BUILD_NUMBER="$NO_BUILD_NUMBER"
|
||||
-PSIGNING_KEY="$SIGNING_KEY"
|
||||
-PSIGNING_PASSWORD="$SIGNING_PASSWORD"
|
||||
-PDEPLOY_REPO_OSSRH_USERNAME="$DEPLOY_REPO_OSSRH_USERNAME"
|
||||
-PDEPLOY_REPO_OSSRH_PASSWORD="$DEPLOY_REPO_OSSRH_PASSWORD"'
|
||||
cache:
|
||||
key: build_test_deploy-$(date +%Y-%m)
|
||||
paths:
|
||||
- .gradle
|
||||
policy: pull
|
5
.gitlab/CODEOWNERS
Normal file
5
.gitlab/CODEOWNERS
Normal file
@ -0,0 +1,5 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# Reviews should be done by these.
|
||||
* @mgrzenia @stwalter
|
18
.gitlab/docker/codequality/Dockerfile
Normal file
18
.gitlab/docker/codequality/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
#
|
||||
# Remember to update version.yml when you change the image contents here!
|
||||
#
|
||||
FROM eclipse-temurin:21-jdk-jammy
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
bash \
|
||||
nodejs \
|
||||
npm \
|
||||
sed \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN npm install -g violations-command-line@1.25.3
|
||||
|
||||
CMD ["/bin/bash"]
|
6
.gitlab/docker/codequality/version.yml
Normal file
6
.gitlab/docker/codequality/version.yml
Normal file
@ -0,0 +1,6 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
variables:
|
||||
# Remember to update this whenever you change the image contents in Dockerfile!
|
||||
CODEQUALITY_IMAGE_TAG: "1.2.0"
|
48
.gitlab/issue_templates/Defect.md
Normal file
48
.gitlab/issue_templates/Defect.md
Normal file
@ -0,0 +1,48 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
## Defect
|
||||
|
||||
<!-- A template to be used for reporting bugs/defects/problems -->
|
||||
|
||||
### Affected version
|
||||
|
||||
<!-- Name the affected version, i.e. "Release x.y.z" or "Revision <HASH>" -->
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
<!-- How can the incorrect behaviour be reproduced? -->
|
||||
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
### Expected behaviour
|
||||
|
||||
<!-- What would be the correct/expected behaviour? -->
|
||||
|
||||
...
|
||||
|
||||
### Actual behaviour
|
||||
|
||||
<!-- What behaviour can actually be observed instead of the correct behaviour? -->
|
||||
|
||||
...
|
||||
|
||||
### Additional information (logs, screenshots etc.)
|
||||
|
||||
<!-- Other data that can help with fixing the defect, e.g. logs, screenshots etc. -->
|
||||
|
||||
...
|
||||
|
||||
### Acceptance criteria
|
||||
|
||||
<!-- Important criteria for the issue to be considered resolved -->
|
||||
|
||||
* Actual behaviour corrected
|
||||
* New tests added or existing tests improved to help prevent future defects
|
||||
* Changelog entry added
|
||||
|
||||
/label ~defect
|
32
.gitlab/issue_templates/Enhancement.md
Normal file
32
.gitlab/issue_templates/Enhancement.md
Normal file
@ -0,0 +1,32 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
## Enhancement
|
||||
|
||||
<!-- A template to be used for proposing enhancements to existing functionality -->
|
||||
|
||||
### Current behaviour
|
||||
|
||||
<!-- The behaviour to be improved (as it is now) -->
|
||||
|
||||
...
|
||||
|
||||
### Improved behaviour
|
||||
|
||||
<!-- What should be improved about the current behaviour, and how -->
|
||||
|
||||
...
|
||||
|
||||
### Acceptance criteria
|
||||
|
||||
<!-- Important criteria for the issue to be considered resolved -->
|
||||
|
||||
* Behaviour improved
|
||||
* New tests added or existing tests updated to help prevent defects of the changed code
|
||||
* User documentation covers changed behaviour
|
||||
* Developer documentation covers new feature
|
||||
* Changelog entry added
|
||||
|
||||
/label ~enhancement
|
26
.gitlab/issue_templates/Feature.md
Normal file
26
.gitlab/issue_templates/Feature.md
Normal file
@ -0,0 +1,26 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
## New feature
|
||||
|
||||
<!-- A template to be used for proposing new functionality -->
|
||||
|
||||
### User story / use case
|
||||
|
||||
<!-- A description of the proposed functionality -->
|
||||
|
||||
...
|
||||
|
||||
### Acceptance criteria
|
||||
|
||||
<!-- Important criteria for the issue to be considered resolved -->
|
||||
|
||||
* New feature implemented
|
||||
* New tests added to help prevent defects of the new code
|
||||
* User documentation covers new feature
|
||||
* Developer documentation covers new feature
|
||||
* Changelog entry added
|
||||
|
||||
/label ~feature
|
48
.gitlab/merge_request_templates/Default.md
Normal file
48
.gitlab/merge_request_templates/Default.md
Normal file
@ -0,0 +1,48 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
## Related issues
|
||||
|
||||
<!-- Issues that are closed by or related to this merge request, e.g. "Closes #x" -->
|
||||
|
||||
...
|
||||
|
||||
## To do
|
||||
|
||||
<!--
|
||||
Action items that need to be completed before merging.
|
||||
Adjust these as deemed appropriate.
|
||||
-->
|
||||
|
||||
- [ ] Implement code changes
|
||||
- [ ] Update documentation
|
||||
- [ ] Add changelog entry
|
||||
|
||||
## Proposed squash commit message
|
||||
|
||||
<!--
|
||||
A proposed message for the eventual squashed commit.
|
||||
Please stick to the following pattern:
|
||||
|
||||
- A short one-line summary (max. 50 characters).
|
||||
- A blank line.
|
||||
- A detailed explanation of the changes introduced by this merge request.
|
||||
Each line should not exceed 72 characters.
|
||||
*********1*********2*********3*********4*********5*********6*********7** (<-- Ruler for line width assistance)
|
||||
-->
|
||||
```
|
||||
A short one-line summary (max. 50 characters)
|
||||
|
||||
* A more detailed explanation of the changes introduced by this merge
|
||||
request.
|
||||
* Each line should not exceed 72 characters.
|
||||
|
||||
Co-authored-by: NAME <EMAIL>
|
||||
Reviewed-by: NAME <EMAIL>
|
||||
Acked-by: NAME <EMAIL>
|
||||
```
|
||||
<!--
|
||||
*********1*********2*********3*********4*********5*********6*********7** (<-- Ruler for line width assistance)
|
||||
-->
|
9
.gitlab/renovate.json5
Normal file
9
.gitlab/renovate.json5
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
],
|
||||
"assigneesFromCodeOwners": true,
|
||||
"assigneesSampleSize": 1,
|
||||
"dependencyDashboardApproval": true
|
||||
}
|
2
.gitlab/renovate.json5.license
Normal file
2
.gitlab/renovate.json5.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC0-1.0
|
72
.idea/codeStyles/Project.xml
Normal file
72
.idea/codeStyles/Project.xml
Normal file
@ -0,0 +1,72 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="FORMATTER_ON_TAG" value="FORMATTER:ON" />
|
||||
<option name="FORMATTER_OFF_TAG" value="FORMATTER:OFF" />
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="ANNOTATION_PARAMETER_WRAP" value="1" />
|
||||
<option name="NEW_LINE_AFTER_LPAREN_IN_ANNOTATION" value="true" />
|
||||
<option name="RPAREN_ON_NEW_LINE_IN_ANNOTATION" value="true" />
|
||||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
|
||||
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
|
||||
<value />
|
||||
</option>
|
||||
<option name="IMPORT_LAYOUT_TABLE">
|
||||
<value>
|
||||
<package name="" withSubpackages="true" static="true" />
|
||||
<emptyLine />
|
||||
<package name="" withSubpackages="true" static="false" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ALIGN_MULTILINE_RECORDS" value="false" />
|
||||
<option name="NEW_LINE_AFTER_LPAREN_IN_RECORD_HEADER" value="true" />
|
||||
<option name="RPAREN_ON_NEW_LINE_IN_RECORD_HEADER" value="true" />
|
||||
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
|
||||
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
|
||||
<option name="JD_P_AT_EMPTY_LINES" value="false" />
|
||||
<option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
|
||||
<option name="JD_PRESERVE_LINE_FEEDS" value="true" />
|
||||
</JavaCodeStyleSettings>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="RIGHT_MARGIN" value="100" />
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="CATCH_ON_NEW_LINE" value="true" />
|
||||
<option name="FINALLY_ON_NEW_LINE" value="true" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="METHOD_PARAMETERS_WRAP" value="1" />
|
||||
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="RESOURCE_LIST_WRAP" value="5" />
|
||||
<option name="RESOURCE_LIST_LPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="RESOURCE_LIST_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="EXTENDS_LIST_WRAP" value="2" />
|
||||
<option name="THROWS_LIST_WRAP" value="1" />
|
||||
<option name="EXTENDS_KEYWORD_WRAP" value="2" />
|
||||
<option name="THROWS_KEYWORD_WRAP" value="2" />
|
||||
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
|
||||
<option name="TERNARY_OPERATION_WRAP" value="1" />
|
||||
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
||||
<option name="KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE" value="true" />
|
||||
<option name="KEEP_SIMPLE_CLASSES_IN_ONE_LINE" value="true" />
|
||||
<option name="FOR_STATEMENT_WRAP" value="1" />
|
||||
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
|
||||
<option name="ASSIGNMENT_WRAP" value="1" />
|
||||
<option name="PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE" value="true" />
|
||||
<option name="WRAP_COMMENTS" value="true" />
|
||||
<option name="ASSERT_STATEMENT_WRAP" value="1" />
|
||||
<option name="PARAMETER_ANNOTATION_WRAP" value="2" />
|
||||
<option name="VARIABLE_ANNOTATION_WRAP" value="2" />
|
||||
<option name="ENUM_CONSTANTS_WRAP" value="2" />
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
21
.idea/codeStyles/README.adoc
Normal file
21
.idea/codeStyles/README.adoc
Normal file
@ -0,0 +1,21 @@
|
||||
= IntelliJ IDEA code style preferences
|
||||
|
||||
This project uses https://github.com/diffplug/spotless[Spotless] for consistent formatting of the project's code and integrates the corresponding Gradle plugin, which can be used to apply the configured formatting rules.
|
||||
Although this is already sufficient to enable development in this project, executing a Gradle task to format (new) code does not necessarily provide a fluent development experience (as this can take a few seconds).
|
||||
To improve this situation when working with IntelliJ IDEA, IDE-specific configuration files can be found in the directory this file is located.
|
||||
With these files, IDE-specific formatting is configured to be as close as possible to formatting with Spotless.
|
||||
|
||||
== Updating IntelliJ IDEA code style preferences
|
||||
|
||||
The formatting rules that Spotless applies are defined in `config/eclipse-formatter-preferences.xml`.
|
||||
If the content of this file changes, the IDE-specific configuration files probably have to be updated as well.
|
||||
To do this, go to `Settings -> Editor -> Code Style -> Java`, click on the settings icon next to the scheme selection and select `Import Scheme -> Eclipse XML Profile`.
|
||||
Select the `eclipse-formatter-preferences.xml` file and be sure to select `To: Current Scheme` in the "Import Scheme" dialog.
|
||||
In order for the updated configuration to be persisted in the configuration files, be sure to manually adjust one (any) setting, click "Apply", reset it to the original value and click "Apply" again.
|
||||
|
||||
== Manual adjustments to the IntelliJ IDEA code style preferences
|
||||
|
||||
Unfortunately, despite the import described above, a complete match between the formatting applied by Spotless and the IDE-specific formatting cannot be achieved.
|
||||
The following code style preferences may have to be adjusted manually after an import:
|
||||
|
||||
* `Wrapping and Braces -> Throws list -> Wrap if long`
|
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
24
.idea/runConfigurations/openTCS_Kernel.xml
Normal file
24
.idea/runConfigurations/openTCS_Kernel.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="openTCS-Kernel" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value=":openTCS-Kernel:run" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
24
.idea/runConfigurations/openTCS_KernelControlCenter.xml
Normal file
24
.idea/runConfigurations/openTCS_KernelControlCenter.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="openTCS-KernelControlCenter" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="openTCS-KernelControlCenter:run" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
24
.idea/runConfigurations/openTCS_ModelEditor.xml
Normal file
24
.idea/runConfigurations/openTCS_ModelEditor.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="openTCS-ModelEditor" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="openTCS-ModelEditor:run" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
24
.idea/runConfigurations/openTCS_OperationsDesk.xml
Normal file
24
.idea/runConfigurations/openTCS_OperationsDesk.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="openTCS-OperationsDesk" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="openTCS-OperationsDesk:run" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
6
CHANGELOG.adoc
Normal file
6
CHANGELOG.adoc
Normal file
@ -0,0 +1,6 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
= Changelog
|
||||
|
||||
The changelog is maintained in link:./opentcs-documentation/src/docs/release-notes/changelog.adoc[opentcs-documentation/src/docs/release-notes/changelog.adoc].
|
129
CODE_OF_CONDUCT.adoc
Normal file
129
CODE_OF_CONDUCT.adoc
Normal file
@ -0,0 +1,129 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
= openTCS Code of Conduct
|
||||
|
||||
== Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
== Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
== Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
== Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
== Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
stefan.walter@iml.fraunhofer.de and/or martin.grzenia@iml.fraunhofer.de.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
== Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
=== 1. Correction
|
||||
|
||||
*Community Impact*: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
*Consequence*: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
=== 2. Warning
|
||||
|
||||
*Community Impact*: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
*Consequence*: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
=== 3. Temporary Ban
|
||||
|
||||
*Community Impact*: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
*Consequence*: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
=== 4. Permanent Ban
|
||||
|
||||
*Community Impact*: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
*Consequence*: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
== Attribution
|
||||
|
||||
This Code of Conduct is adapted from the https://www.contributor-covenant.org[Contributor Covenant],
|
||||
version 2.1, available at
|
||||
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
https://github.com/mozilla/diversity[Mozilla's code of conduct enforcement ladder].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available
|
||||
at https://www.contributor-covenant.org/translations.
|
113
CONTRIBUTING.adoc
Normal file
113
CONTRIBUTING.adoc
Normal file
@ -0,0 +1,113 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
= Contributing to openTCS
|
||||
|
||||
The following is a set of guidelines for contributing to openTCS.
|
||||
|
||||
This project is maintained by the openTCS development team of https://www.iml.fraunhofer.de/en.html[Fraunhofer IML].
|
||||
A public mirror of the development repository is available at https://github.com/opentcs/opentcs[GitHub].
|
||||
|
||||
You are very welcome to contribute to this project when you find a bug, want to suggest an improvement, or have an idea for a useful feature.
|
||||
For this, please always create an issue and/or a pull request, and follow our style guides as described below.
|
||||
|
||||
== Issues
|
||||
|
||||
It is required to create an issue if you want to integrate a bugfix, improvement, or feature.
|
||||
Briefly and clearly describe the purpose of your contribution in the corresponding issue, using the appropriate template for it.
|
||||
|
||||
== Pull requests / merge requests
|
||||
|
||||
Pull requests fixing bugs, adding new features or improving the quality of the code and/or the documentation are very welcome!
|
||||
To contribute changes, please follow these steps:
|
||||
|
||||
. Before putting any significant amount of work into changes you want to make, get in touch with the maintainers.
|
||||
Informing and coordinating helps to avoid conflicts with other changes made elsewhere.
|
||||
If there already is an issue or a forum discussion related to the intended changes, announce your will to work on it there; if there isn't, yet, create one.
|
||||
(Specific bug reports and feature/improvement suggestions should be handled in issues; loose ideas should be discussed in the forum first.)
|
||||
. Fork the repository and create a new branch for your changes.
|
||||
. Make your changes in the new branch, adhering to the coding guidelines.
|
||||
. If your changes add a new feature, consider adding documentation for it to the user's guide or the developer's guide.
|
||||
If your changes change an existing feature's behaviour, check these documents and update them if necessary.
|
||||
. If your changes affect users, document them in the link:opentcs-documentation/src/docs/release-notes/changelog.adoc[changelog].
|
||||
. Push your branch to your forked repository.
|
||||
. Open a pull request against the main repository's main branch.
|
||||
.. Fill out the pull request template and provide a clear description of your changes and the problem they solve.
|
||||
.. Provide a commit message for the pull request, adhering to the commit message guidelines described below.
|
||||
|
||||
When contributing, keep unrelated changes in separate pull requests!
|
||||
|
||||
=== Commit message guidelines
|
||||
|
||||
When writing commit messages, please follow these guidelines:
|
||||
|
||||
* Use descriptive and meaningful commit messages.
|
||||
* Start the subject line with a verb in the imperative mood (e.g., "Add," "Fix," "Update").
|
||||
* Keep the subject line short and concise (preferably 50 characters or less).
|
||||
* Provide additional details in the body if needed.
|
||||
* Separate the subject from the body with a blank line.
|
||||
* Keep the length of body lines less than or equal to 72.
|
||||
* Reference relevant commit hashes in the commit message if applicable.
|
||||
|
||||
Example:
|
||||
|
||||
----
|
||||
Make vehicle energy level thresholds configurable
|
||||
|
||||
Allow a vehicle's set of energy level thresholds to be modified during
|
||||
runtime via the Operations Desk application and the web API.
|
||||
|
||||
Co-authored-by: Martin Grzenia <martin.grzenia@iml.fraunhofer.de>
|
||||
Co-authored-by: Stefan Walter <stefan.walter@iml.fraunhofer.de>
|
||||
----
|
||||
|
||||
== Coding guidelines
|
||||
|
||||
In general, please adhere to the following guidelines to maintain code consistency, readability, and quality:
|
||||
|
||||
* Write lean and efficient code.
|
||||
Avoid unnecessary complexity or redundant logic.
|
||||
* Use meaningful and descriptive names for classes, methods and variables.
|
||||
* Write clear and concise comments when necessary, but strive for code that is self-explanatory.
|
||||
* Prioritize code readability over cleverness.
|
||||
|
||||
The following subsections contain a few more detailed guidelines we consider important in this project.
|
||||
Note that parts of the existing code may not fully adhere to these rules, yet.
|
||||
When updating such code, do improve it by applying the guidelines where it makes sense, but avoid modifying large unrelated sections.
|
||||
|
||||
=== Primary formatting rules
|
||||
|
||||
For consistent formatting of the project's code, https://github.com/diffplug/spotless[Spotless] is used.
|
||||
After making changes, make sure you run `./gradlew spotlessApply` to re-format the code.
|
||||
|
||||
=== Automatic tests
|
||||
|
||||
* New or changed non-trivial code should be covered by tests.
|
||||
* This project uses https://junit.org/[JUnit] for unit testing.
|
||||
* JUnit test classes and methods should omit the `public` modifier unless there is a technical reason for adding it.
|
||||
* For assertions, `assertThat()` should be preferred over `assertTrue()`, as the former provides more information when failing.
|
||||
|
||||
=== Check preconditions in subroutines
|
||||
|
||||
Methods belonging to a class's interface, i.e. `public` or `protected` methods, should check their preconditions.
|
||||
They should at least check their input parameters for validity:
|
||||
|
||||
* Reference types that may not be `null` should be checked using `java.util.Objects.requireNonNull()`.
|
||||
It also makes sense to mark them using the `@Nonnull` annotation to document that they may not be `null`.
|
||||
* Parameters of numeric types for which only certain ranges of values are acceptable should be checked using `org.opentcs.util.Assertions.checkInRange()`.
|
||||
* Parameters for which only certain values are acceptable should be checked using `org.opentcs.util.Assertions.checkArgument()`.
|
||||
|
||||
Checking the object's internal state may also make sense for a method.
|
||||
For such checks, `org.opentcs.util.Assertions.checkState()` should be used.
|
||||
|
||||
=== Avoid single-use local variables
|
||||
|
||||
Declaring local variables in subroutines that are then used only once creates unnecessary noise for the reader of the code.
|
||||
In many cases, eliminating the variable by inlining its value improves the readability of the code.
|
||||
|
||||
== Development setup
|
||||
|
||||
=== IDE: NetBeans
|
||||
|
||||
To build the project from NetBeans, register a Java platform named "JDK 21 - openTCS" (without the quotes) within NetBeans.
|
||||
This JDK will be used by NetBeans for running the build process.
|
73
LICENSES/Apache-2.0.txt
Normal file
73
LICENSES/Apache-2.0.txt
Normal file
@ -0,0 +1,73 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
156
LICENSES/CC-BY-4.0.txt
Normal file
156
LICENSES/CC-BY-4.0.txt
Normal file
@ -0,0 +1,156 @@
|
||||
Creative Commons Attribution 4.0 International
|
||||
|
||||
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
|
||||
|
||||
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
Section 1 – Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||||
|
||||
B. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section 6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||
|
||||
B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified form), You must:
|
||||
|
||||
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
|
||||
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
|
||||
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
|
||||
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
|
||||
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
|
||||
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||
|
||||
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
121
LICENSES/CC0-1.0.txt
Normal file
121
LICENSES/CC0-1.0.txt
Normal file
@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
176
LICENSES/LGPL-2.1-only.txt
Normal file
176
LICENSES/LGPL-2.1-only.txt
Normal file
@ -0,0 +1,176 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
one line to give the library's name and an idea of what it does.
|
||||
Copyright (C) year name of author
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in
|
||||
the library `Frob' (a library for tweaking knobs) written
|
||||
by James Random Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
That's all there is to it!
|
9
LICENSES/MIT.txt
Normal file
9
LICENSES/MIT.txt
Normal file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
43
LICENSES/OFL-1.1.txt
Normal file
43
LICENSES/OFL-1.1.txt
Normal file
@ -0,0 +1,43 @@
|
||||
SIL OPEN FONT LICENSE
|
||||
|
||||
Version 1.1 - 26 February 2007
|
||||
|
||||
PREAMBLE
|
||||
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
45
README.adoc
Normal file
45
README.adoc
Normal file
@ -0,0 +1,45 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
= openTCS
|
||||
|
||||
image:https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg[Contributor Covenant,link=CODE_OF_CONDUCT.md]
|
||||
|
||||
* Homepage: https://www.opentcs.org/
|
||||
* Changelog: link:./opentcs-documentation/src/docs/release-notes/changelog.adoc[changelog.adoc]
|
||||
|
||||
openTCS (short for _open Transportation Control System_) is a free platform for controlling fleets of https://en.wikipedia.org/wiki/Automated_guided_vehicle[automated guided vehicles (AGVs)] and mobile robots.
|
||||
It should generally be possible to control any automatic vehicle with communication capabilities with it, but AGVs are the main target.
|
||||
|
||||
openTCS is being maintained by the openTCS team at the https://www.iml.fraunhofer.de/[Fraunhofer Institute for Material Flow and Logistics].
|
||||
|
||||
The software runs on the Java platform version 21, with the recommended Java distribution being the one provided by the https://adoptium.net/[Adoptium project].
|
||||
All libraries required for compiling and/or using it are freely available, too.
|
||||
|
||||
openTCS itself is not a complete product you can use out-of-the-box to control AGVs with.
|
||||
Primarily, it is a framework/an implementation of the basic data structures and algorithms (routing, dispatching, scheduling) needed for running an AGV system with more than one vehicle.
|
||||
It tries to be as generic as possible to allow interoperation with vehicles of practically any vendor.
|
||||
Thus it is usually necessary to at least create and integrate a vehicle driver (called _communication adapter_ in openTCS-speak) that translates between the abstract interface of the openTCS kernel and the communication protocol your vehicle understands.
|
||||
Depending on your needs, it might also be necessary to adapt algorithms or add project-specific strategies.
|
||||
|
||||
== Getting started
|
||||
|
||||
To get started with openTCS, please refer to the user's guide, the developer's guide and the API documentation.
|
||||
These documents are included in the binary distribution and can also be read online on the https://www.opentcs.org/[openTCS homepage].
|
||||
|
||||
== Licensing
|
||||
|
||||
This work is licensed under multiple licences.
|
||||
Because keeping this section up-to-date is challenging, here is a brief summary as of November 2024:
|
||||
|
||||
* All original source code is licensed under link:./LICENSES/MIT.txt[MIT].
|
||||
* All original assets, including documentation, is licensed under link:./LICENSES/CC-BY-4.0.txt[CC-BY-4.0].
|
||||
* Some configuration and data files are licensed under link:./LICENSES/CC0-1.0.txt[CC0-1.0].
|
||||
* Some third-party assets are licensed under link:./LICENSES/Apache-2.0.txt[Apache-2.0] or link:./LICENSES/OFL-1.1.txt[OFL-1.1].
|
||||
|
||||
For more accurate information, check the individual files as well as the `REUSE.toml` files.
|
||||
|
||||
== Contributing
|
||||
|
||||
You are very welcome to contribute to this project.
|
||||
Please see link:./CONTRIBUTING.adoc[CONTRIBUTING.adoc] for a few guidelines related to this.
|
28
REUSE.toml
Normal file
28
REUSE.toml
Normal file
@ -0,0 +1,28 @@
|
||||
# SPDX-FileCopyrightText: The openTCS Authors
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
version = 1
|
||||
|
||||
[[annotations]]
|
||||
path = ["**/gradle.properties"]
|
||||
precedence = "closest"
|
||||
SPDX-FileCopyrightText = "The openTCS Authors"
|
||||
SPDX-License-Identifier = "CC0-1.0"
|
||||
|
||||
[[annotations]]
|
||||
path = ["**/*Test*.approved.txt"]
|
||||
precedence = "closest"
|
||||
SPDX-FileCopyrightText = "The openTCS Authors"
|
||||
SPDX-License-Identifier = "CC-BY-4.0"
|
||||
|
||||
[[annotations]]
|
||||
path = ["**/*.form"]
|
||||
precedence = "closest"
|
||||
SPDX-FileCopyrightText = "The openTCS Authors"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
||||
[[annotations]]
|
||||
path = [".idea/**"]
|
||||
precedence = "closest"
|
||||
SPDX-FileCopyrightText = "The openTCS Authors"
|
||||
SPDX-License-Identifier = "CC0-1.0"
|
122
build.gradle
Normal file
122
build.gradle
Normal file
@ -0,0 +1,122 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
id 'org.barfuin.gradle.jacocolog' version '3.1.0'
|
||||
id 'com.github.jk1.dependency-license-report' version '2.9'
|
||||
id 'com.diffplug.spotless' version '7.0.0.BETA4'
|
||||
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
|
||||
}
|
||||
|
||||
import com.github.jk1.license.filter.LicenseBundleNormalizer
|
||||
import com.github.jk1.license.render.CsvReportRenderer
|
||||
import com.github.jk1.license.render.InventoryHtmlReportRenderer
|
||||
|
||||
apply plugin: 'base' // To add "clean" task to the root project.
|
||||
apply plugin: 'distribution'
|
||||
|
||||
apply from: "${rootDir}/gradle/common.gradle"
|
||||
apply from: "${rootDir}/gradle/publishing-gitlab.gradle"
|
||||
apply from: "${rootDir}/gradle/publishing-ossrh.gradle"
|
||||
|
||||
subprojects {
|
||||
apply from: rootProject.file('gradle/common.gradle')
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
distributions {
|
||||
main {
|
||||
contents.from {
|
||||
project(':opentcs-kernel').ext.collectableDistDir
|
||||
}
|
||||
contents.from {
|
||||
project(':opentcs-kernelcontrolcenter').ext.collectableDistDir
|
||||
}
|
||||
contents.from {
|
||||
project(':opentcs-modeleditor').ext.collectableDistDir
|
||||
}
|
||||
contents.from {
|
||||
project(':opentcs-operationsdesk').ext.collectableDistDir
|
||||
}
|
||||
contents.from {
|
||||
project(':opentcs-documentation').ext.collectableDistDir
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task subDists {
|
||||
dependsOn(':opentcs-kernel:installDist')
|
||||
dependsOn(':opentcs-kernelcontrolcenter:installDist')
|
||||
dependsOn(':opentcs-modeleditor:installDist')
|
||||
dependsOn(':opentcs-operationsdesk:installDist')
|
||||
dependsOn(':opentcs-documentation:installDist')
|
||||
}
|
||||
|
||||
installDist.dependsOn subDists
|
||||
|
||||
distZip {
|
||||
archiveClassifier = 'bin'
|
||||
dependsOn subDists
|
||||
}
|
||||
|
||||
distTar {
|
||||
enabled = false
|
||||
archiveClassifier = 'bin'
|
||||
dependsOn subDists
|
||||
}
|
||||
|
||||
|
||||
|
||||
task distSrcZip(type: Zip) {
|
||||
archiveClassifier = 'src'
|
||||
from "${rootDir}"
|
||||
|
||||
includes << 'config/**'
|
||||
includes << 'gradle/**'
|
||||
includes << 'opentcs-*/**'
|
||||
includes << 'src/**'
|
||||
includes << '*.gradle'
|
||||
includes << 'gradlew'
|
||||
includes << 'gradlew.bat'
|
||||
|
||||
excludes << '.gitlab'
|
||||
excludes << '.gitlab-ci.yml'
|
||||
excludes << '.gradle'
|
||||
excludes << '**/build'
|
||||
}
|
||||
|
||||
build {
|
||||
subprojects.each { dependsOn("${it.name}:build") }
|
||||
dependsOn installDist
|
||||
}
|
||||
|
||||
task release {
|
||||
dependsOn build
|
||||
subprojects.each { dependsOn("${it.name}:release") }
|
||||
dependsOn distZip
|
||||
dependsOn distSrcZip
|
||||
}
|
||||
|
||||
licenseReport {
|
||||
outputDir = "${buildDir}/license-report"
|
||||
configurations = ['runtimeClasspath', 'guiceConfigRuntimeClasspath']
|
||||
excludeBoms = true
|
||||
filters = [new LicenseBundleNormalizer(bundlePath: "$projectDir/config/license-normalizer-bundle.json")]
|
||||
renderers = [
|
||||
new CsvReportRenderer('third-party-licenses.csv'),
|
||||
new InventoryHtmlReportRenderer('third-party-licenses.html')
|
||||
]
|
||||
}
|
212
config/checkstyle/checkstyle-noframes-severity-sorted.xsl
Normal file
212
config/checkstyle/checkstyle-noframes-severity-sorted.xsl
Normal file
@ -0,0 +1,212 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The Checkstyle Contributors (https://github.com/checkstyle/contribution/)
|
||||
SPDX-License-Identifier: LGPL-2.1-only
|
||||
-->
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
<xsl:decimal-format decimal-separator="." grouping-separator="," />
|
||||
|
||||
<xsl:key name="files" match="file" use="@name" />
|
||||
|
||||
<!-- Checkstyle XML Style Sheet by Rolf Wojtech <rolf@wojtech.de> -->
|
||||
<!-- (based on checkstyle-noframe-sorted.xsl by Stephane Bailliez -->
|
||||
<!-- <sbailliez@apache.org> and sf-patch 1721291 by Leo Liang) -->
|
||||
<!-- Changes: -->
|
||||
<!-- * Outputs seperate columns for error/warning/info -->
|
||||
<!-- * Sorts primarily by #error, secondarily by #warning, tertiary by #info -->
|
||||
<!-- * Compatible with windows path names (converts '\' to '/' for html anchor) -->
|
||||
<!-- -->
|
||||
<!-- Part of the Checkstyle distribution found at https://checkstyle.org -->
|
||||
<!-- Usage (generates checkstyle_report.html): -->
|
||||
<!-- <checkstyle failonviolation="false" config="${check.config}"> -->
|
||||
<!-- <fileset dir="${src.dir}" includes="**/*.java"/> -->
|
||||
<!-- <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/> -->
|
||||
<!-- </checkstyle> -->
|
||||
<!-- <style basedir="${doc.dir}" destdir="${doc.dir}" -->
|
||||
<!-- includes="checkstyle_report.xml" -->
|
||||
<!-- style="${doc.dir}/checkstyle-noframes-severity-sorted.xsl"/> -->
|
||||
|
||||
<xsl:template match="checkstyle">
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
.bannercell {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
body {
|
||||
margin-left: 10;
|
||||
margin-right: 10;
|
||||
font:normal 80% arial,helvetica,sanserif;
|
||||
background-color:#FFFFFF;
|
||||
color:#000000;
|
||||
}
|
||||
.a td {
|
||||
background: #efefef;
|
||||
}
|
||||
.b td {
|
||||
background: #fff;
|
||||
}
|
||||
th, td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
th {
|
||||
font-weight:bold;
|
||||
background: #ccc;
|
||||
color: black;
|
||||
}
|
||||
table, th, td {
|
||||
font-size:100%;
|
||||
border: none
|
||||
}
|
||||
table.log tr td, tr th {
|
||||
|
||||
}
|
||||
h2 {
|
||||
font-weight:bold;
|
||||
font-size:140%;
|
||||
margin-bottom: 5;
|
||||
}
|
||||
h3 {
|
||||
font-size:100%;
|
||||
font-weight:bold;
|
||||
background: #525D76;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
padding: 5px;
|
||||
margin-right: 2px;
|
||||
margin-left: 2px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<!-- jakarta logo -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="bannercell" rowspan="2">
|
||||
<!--a href="http://jakarta.apache.org/">
|
||||
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
|
||||
</a-->
|
||||
</td>
|
||||
<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-align:right">Designed for use with <a href='https://checkstyle.org/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr size="1"/>
|
||||
|
||||
<!-- Summary part -->
|
||||
<xsl:apply-templates select="." mode="summary"/>
|
||||
<hr size="1" width="100%" align="left"/>
|
||||
|
||||
<!-- Package List part -->
|
||||
<xsl:apply-templates select="." mode="filelist"/>
|
||||
<hr size="1" width="100%" align="left"/>
|
||||
|
||||
<!-- For each package create its part -->
|
||||
<xsl:apply-templates select="file[@name and generate-id(.) = generate-id(key('files', @name))]" />
|
||||
|
||||
<hr size="1" width="100%" align="left"/>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="checkstyle" mode="filelist">
|
||||
<h3>Files</h3>
|
||||
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Errors</th>
|
||||
<th>Warnings</th>
|
||||
<th>Infos</th>
|
||||
</tr>
|
||||
<xsl:for-each select="file[@name and generate-id(.) = generate-id(key('files', @name))]">
|
||||
|
||||
<!-- Sort method 1: Primary by #error, secondary by #warning, tertiary by #info -->
|
||||
<xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error[@severity='error'])"/>
|
||||
<xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error[@severity='warning'])"/>
|
||||
<xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error[@severity='info'])"/>
|
||||
|
||||
<!-- Sort method 1: Sum(#error+#info+#warning) (uncomment to use, comment method 1) -->
|
||||
<!--
|
||||
<xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error)"/>
|
||||
-->
|
||||
|
||||
<xsl:variable name="errorCount" select="count(key('files', @name)/error[@severity='error'])"/>
|
||||
<xsl:variable name="warningCount" select="count(key('files', @name)/error[@severity='warning'])"/>
|
||||
<xsl:variable name="infoCount" select="count(key('files', @name)/error[@severity='info'])"/>
|
||||
|
||||
<tr>
|
||||
<xsl:call-template name="alternated-row"/>
|
||||
<td><a href="#f-{translate(@name,'\','/')}"><xsl:value-of select="@name"/></a></td>
|
||||
<td><xsl:value-of select="$errorCount"/></td>
|
||||
<td><xsl:value-of select="$warningCount"/></td>
|
||||
<td><xsl:value-of select="$infoCount"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="file">
|
||||
<a name="f-{translate(@name,'\','/')}"></a>
|
||||
<h3>File <xsl:value-of select="@name"/></h3>
|
||||
|
||||
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
|
||||
<tr>
|
||||
<th>Severity</th>
|
||||
<th>Error Description</th>
|
||||
<th>Line</th>
|
||||
</tr>
|
||||
<xsl:for-each select="key('files', @name)/error">
|
||||
<xsl:sort data-type="number" order="ascending" select="@line"/>
|
||||
<tr>
|
||||
<xsl:call-template name="alternated-row"/>
|
||||
<td><xsl:value-of select="@severity"/></td>
|
||||
<td><xsl:value-of select="@message"/></td>
|
||||
<td><xsl:value-of select="@line"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<a href="#top">Back to top</a>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="checkstyle" mode="summary">
|
||||
<h3>Summary</h3>
|
||||
<xsl:variable name="fileCount" select="count(file[@name and generate-id(.) = generate-id(key('files', @name))])"/>
|
||||
<xsl:variable name="errorCount" select="count(file/error[@severity='error'])"/>
|
||||
<xsl:variable name="warningCount" select="count(file/error[@severity='warning'])"/>
|
||||
<xsl:variable name="infoCount" select="count(file/error[@severity='info'])"/>
|
||||
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
|
||||
<tr>
|
||||
<th>Files</th>
|
||||
<th>Errors</th>
|
||||
<th>Warnings</th>
|
||||
<th>Infos</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<xsl:call-template name="alternated-row"/>
|
||||
<td><xsl:value-of select="$fileCount"/></td>
|
||||
<td><xsl:value-of select="$errorCount"/></td>
|
||||
<td><xsl:value-of select="$warningCount"/></td>
|
||||
<td><xsl:value-of select="$infoCount"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="alternated-row">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:if test="position() mod 2 = 1">a</xsl:if>
|
||||
<xsl:if test="position() mod 2 = 0">b</xsl:if>
|
||||
</xsl:attribute>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
332
config/checkstyle/checkstyle.xml
Normal file
332
config/checkstyle/checkstyle.xml
Normal file
@ -0,0 +1,332 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||||
<!--
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
|
||||
<!-- See http://checkstyle.sourceforge.net/checks.html for all checks + descriptions. -->
|
||||
<module name="Checker">
|
||||
|
||||
<!-- For tests and configuration interfaces, we allow missing method JavaDoc documentation. -->
|
||||
<module name="SuppressionSingleFilter">
|
||||
<property name="checks" value="MissingJavadocMethod"/>
|
||||
<property name="files" value=".*Test.java|.*Configuration.java"/>
|
||||
</module>
|
||||
|
||||
<!-- For tests, we allow missing constructors, as we have @BeforeClass and @BeforeEach there. -->
|
||||
<module name="SuppressionSingleFilter">
|
||||
<property name="checks" value="MissingCtor"/>
|
||||
<property name="files" value=".*Test.java"/>
|
||||
</module>
|
||||
|
||||
<!-- For thirdparty packages and for package info files we allow the license header to differ. -->
|
||||
<module name="SuppressionSingleFilter">
|
||||
<property name="checks" value="Header"/>
|
||||
<property name="files" value=".*[/\\]org[/\\]opentcs[/\\]thirdparty[/\\].*|.*[/\\]package-info.java"/>
|
||||
</module>
|
||||
|
||||
<module name="SuppressWithPlainTextCommentFilter">
|
||||
<property name="offCommentFormat" value="// CHECKSTYLE:OFF.*"/>
|
||||
<property name="onCommentFormat" value="// CHECKSTYLE:ON"/>
|
||||
</module>
|
||||
|
||||
<module name="SuppressWarningsFilter"/>
|
||||
|
||||
<property name="severity" value="warning"/>
|
||||
|
||||
<property name="fileExtensions" value="java, properties"/>
|
||||
|
||||
<module name="FileLength">
|
||||
<property name="max" value="2000"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="FileTabCharacter">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="max" value="100"/>
|
||||
<property name="ignorePattern" value="(^(package|import) .*)|(^ *\* *[^ ]+$)|(GEN-FIRST:)"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="NewlineAtEndOfFile">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks that property files contain the same keys. -->
|
||||
<module name="Translation">
|
||||
<property name="fileExtensions" value="properties"/>
|
||||
<property name="baseName" value="^Bundle.*$"/>
|
||||
<property name="severity" value="ignore"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
<module name="SuppressionCommentFilter">
|
||||
<property name="offCommentFormat" value="// CHECKSTYLE:OFF.*"/>
|
||||
<property name="onCommentFormat" value="// CHECKSTYLE:ON"/>
|
||||
</module>
|
||||
|
||||
<module name="SuppressWarningsHolder"/>
|
||||
|
||||
<module name="IllegalImport">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="UnusedImports">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="RedundantImport">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for Naming Conventions. -->
|
||||
<module name="LocalVariableName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="LocalFinalVariableName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="StaticVariableName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="ConstantName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="MethodName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="TypeName">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="HiddenField">
|
||||
<property name="tokens" value="VARIABLE_DEF, LAMBDA"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="NeedBraces">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="CovariantEquals">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="EmptyStatement">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="InnerAssignment">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="MissingSwitchDefault">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="DefaultComesLast">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="FallThrough">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="ModifiedControlVariable">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="SimplifyBooleanExpression">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="SimplifyBooleanReturn">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="StringLiteralEquality">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="NestedTryDepth">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="PackageDeclaration">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="ParameterAssignment">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="MultipleVariableDeclarations">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="HideUtilityClassConstructor">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="MutableException">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="InnerTypeLast">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="UpperEll">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="ArrayTypeStyle">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="AvoidStarImport">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="MethodLength">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="AnonInnerLength">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="ParameterNumber">
|
||||
<property name="ignoreOverriddenMethods" value="true"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="EqualsHashCode">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="NestedIfDepth">
|
||||
<property name="max" value="2"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="DeclarationOrder">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="IllegalCatch">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="IllegalThrows">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="IllegalType">
|
||||
<property name="tokens" value="PARAMETER_DEF, METHOD_DEF"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="VisibilityModifier">
|
||||
<property name="protectedAllowed" value="true"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for Javadoc comments. -->
|
||||
<module name="JavadocType">
|
||||
<property name="scope" value="package"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocMethod">
|
||||
<property name="accessModifiers" value="public, protected"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="accessModifiers" value="package"/>
|
||||
<property name="severity" value="info"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocVariable">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocStyle">
|
||||
<property name="checkEmptyJavadoc" value="true"/>
|
||||
<property name="severity" value="info"/>
|
||||
</module>
|
||||
|
||||
<module name="MissingJavadocMethod">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="allowMissingPropertyJavadoc" value="true"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="ModifierOrder">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="RedundantModifier">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="EmptyBlock">
|
||||
<property name="severity" value="info"/>
|
||||
</module>
|
||||
|
||||
<module name="ExplicitInitialization">
|
||||
<property name="severity" value="info"/>
|
||||
</module>
|
||||
|
||||
<module name="UnnecessaryParentheses">
|
||||
<property name="severity" value="info"/>
|
||||
</module>
|
||||
|
||||
<module name="AvoidNestedBlocks">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="SuperClone">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSinglelineJava">
|
||||
<property name="format" value="\S\s+$"/>
|
||||
<property name="message" value="Line has trailing spaces."/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="MissingCtor">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="TodoComment">
|
||||
<property name="format" value="TODO|XXX"/>
|
||||
<property name="severity" value="info"/>
|
||||
</module>
|
||||
|
||||
<module name="TrailingComment">
|
||||
<!-- Trailing comments are often seen in NetBeans' generated GUI code. -->
|
||||
<property name="severity" value="ignore"/>
|
||||
</module>
|
||||
|
||||
</module>
|
||||
|
||||
</module>
|
401
config/eclipse-formatter-preferences.xml
Normal file
401
config/eclipse-formatter-preferences.xml
Normal file
@ -0,0 +1,401 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="23">
|
||||
<profile kind="CodeFormatterProfile" name="openTCS" version="23">
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="18"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="18"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration" value="65"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="82"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="65"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="65"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="65"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="65"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="65"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="65"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="18"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="FORMATTER:OFF"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="FORMATTER:ON"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_preserve"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_preserve"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_preserve"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_preserve"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_preserve"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_preserve"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_preserve"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="separate_lines_if_wrapped"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="separate_lines_if_wrapped"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="separate_lines_if_wrapped"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="separate_lines_if_wrapped"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="separate_lines_if_wrapped"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="3"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="false"/>
|
||||
</profile>
|
||||
</profiles>
|
2
config/eclipse-formatter-preferences.xml.license
Normal file
2
config/eclipse-formatter-preferences.xml.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC0-1.0
|
10
config/license-normalizer-bundle.json
Normal file
10
config/license-normalizer-bundle.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"bundles": [
|
||||
],
|
||||
"transformationRules": [
|
||||
{
|
||||
"bundleName": "LGPL-2.1-only",
|
||||
"licenseNamePattern": "GNU Lesser General Public License Version 2.1, February 1999"
|
||||
}
|
||||
]
|
||||
}
|
2
config/license-normalizer-bundle.json.license
Normal file
2
config/license-normalizer-bundle.json.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: The openTCS Authors
|
||||
SPDX-License-Identifier: CC0-1.0
|
9
gradle.properties
Normal file
9
gradle.properties
Normal file
@ -0,0 +1,9 @@
|
||||
netbeans.license=default
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=100
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
|
||||
netbeans.hint.jdkPlatform=JDK_21_-_openTCS
|
41
gradle/common.gradle
Normal file
41
gradle/common.gradle
Normal file
@ -0,0 +1,41 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//
|
||||
// This file is to be applied to every subproject.
|
||||
//
|
||||
|
||||
// If we do not have a build number, we're building on a developer's system, so
|
||||
// mark the artifact as a snapshot build.
|
||||
def versionBuild = "SNAPSHOT"
|
||||
if (System.env.BUILD_NUMBER) {
|
||||
versionBuild = "b" + System.env.BUILD_NUMBER
|
||||
}
|
||||
else if (System.env.CI_PIPELINE_IID) {
|
||||
versionBuild = "b" + System.env.CI_PIPELINE_IID
|
||||
}
|
||||
|
||||
// Semantic versioning:
|
||||
// - The major version number should be incremented with major API-breaking
|
||||
// changes.
|
||||
// - The minor version number should be incremented when new feature were added.
|
||||
// - The patch level should be incremented with every small change to the code
|
||||
// (e.g. bugfixes).
|
||||
project.version = "6.2.0"
|
||||
if (!(project.hasProperty("NO_BUILD_NUMBER")
|
||||
&& Boolean.valueOf(project.getProperties().get("NO_BUILD_NUMBER")))) {
|
||||
project.version += "-$versionBuild"
|
||||
}
|
||||
|
||||
project.ext.buildDate = new Date().format('yyyy-MM-dd HH:mm:ss')
|
||||
|
||||
group = 'org.opentcs'
|
||||
|
||||
task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
|
||||
sourceSets*.allSource*.srcDirs*.each { File srcDir ->
|
||||
if (!srcDir.isDirectory()) {
|
||||
println "Creating source folder: ${srcDir}"
|
||||
srcDir.mkdirs()
|
||||
}
|
||||
}
|
||||
}
|
29
gradle/guice-application.gradle
Normal file
29
gradle/guice-application.gradle
Normal file
@ -0,0 +1,29 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
apply from: "${rootDir}/gradle/guice-project.gradle"
|
||||
apply plugin: 'application'
|
||||
|
||||
run {
|
||||
dependsOn installDist
|
||||
workingDir new File(new File(buildDir, 'install'), project.name)
|
||||
enableAssertions true
|
||||
classpath sourceSets.guiceConfig.output
|
||||
}
|
||||
|
||||
task(debug, type:JavaExec) {
|
||||
dependsOn installDist
|
||||
|
||||
doFirst {
|
||||
workingDir = run.workingDir
|
||||
enableAssertions = run.enableAssertions
|
||||
|
||||
main = run.main
|
||||
args = run.args
|
||||
classpath = run.classpath
|
||||
jvmArgs = run.jvmArgs
|
||||
systemProperties = run.systemProperties
|
||||
|
||||
debug true
|
||||
}
|
||||
}
|
32
gradle/guice-project.gradle
Normal file
32
gradle/guice-project.gradle
Normal file
@ -0,0 +1,32 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
sourceSets {
|
||||
guiceConfig
|
||||
}
|
||||
|
||||
configurations {
|
||||
guiceConfigApi.extendsFrom api
|
||||
guiceConfigImplementation.extendsFrom implementation
|
||||
}
|
||||
|
||||
dependencies {
|
||||
guiceConfigImplementation sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
// Attributes for the AsciiDoc documentation to include code from source files
|
||||
ext.guiceSrcDir = sourceSets.guiceConfig.java.srcDirs[0]
|
||||
|
||||
compileGuiceConfigJava {
|
||||
options.release = 21
|
||||
options.compilerArgs << "-Werror"
|
||||
options.compilerArgs << "-Xlint:all"
|
||||
options.compilerArgs << "-Xlint:-serial"
|
||||
}
|
||||
|
||||
jar {
|
||||
from sourceSets.guiceConfig.output
|
||||
// This merely tells NetBeans where to look for classes in case of other
|
||||
// subprojects depending on this one. By default, it only scans 'main'.
|
||||
ext.netBeansSourceSets = [sourceSets.guiceConfig, sourceSets.main]
|
||||
}
|
18
gradle/java-codequality.gradle
Normal file
18
gradle/java-codequality.gradle
Normal file
@ -0,0 +1,18 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
checkstyle {
|
||||
toolVersion = '10.18.2'
|
||||
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
|
||||
showViolations = false
|
||||
}
|
||||
|
||||
project.afterEvaluate { project ->
|
||||
project.tasks.withType(Checkstyle) {
|
||||
reports {
|
||||
html.stylesheet resources.text.fromFile(rootProject.file("config/checkstyle/checkstyle-noframes-severity-sorted.xsl"))
|
||||
}
|
||||
}
|
||||
}
|
87
gradle/java-project.gradle
Normal file
87
gradle/java-project.gradle
Normal file
@ -0,0 +1,87 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'jacoco'
|
||||
apply plugin: 'com.diffplug.spotless'
|
||||
|
||||
base.archivesName = name.toLowerCase()
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.16'
|
||||
|
||||
compileOnly group: 'jakarta.inject', name: 'jakarta.inject-api', version: '2.0.1'
|
||||
|
||||
compileOnly group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '3.0.0'
|
||||
testCompileOnly group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '3.0.0'
|
||||
|
||||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.11.2'
|
||||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.11.2'
|
||||
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.11.2'
|
||||
testRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.11.2'
|
||||
|
||||
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '3.0'
|
||||
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.14.2'
|
||||
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.26.3'
|
||||
testImplementation group: 'com.approvaltests', name: 'approvaltests', version: '24.8.0'
|
||||
|
||||
testRuntimeOnly group: 'org.slf4j', name: 'slf4j-jdk14', version: '2.0.16'
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.release = 21
|
||||
options.compilerArgs << "-Werror"
|
||||
options.compilerArgs << "-Xlint:all"
|
||||
options.compilerArgs << "-Xlint:-serial"
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
options.release = 21
|
||||
options.compilerArgs << "-Werror"
|
||||
options.compilerArgs << "-Xlint:all"
|
||||
options.compilerArgs << "-Xlint:-serial"
|
||||
}
|
||||
|
||||
javadoc {
|
||||
title = "openTCS ${project.version} API documentation: ${project.name}"
|
||||
|
||||
options {
|
||||
header = "openTCS ${project.version}"
|
||||
overview = "${projectDir}/src/main/java/overview.html"
|
||||
addBooleanOption('Werror', true)
|
||||
addBooleanOption('Xdoclint:all,-missing', true)
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
// ignoreFailures = true
|
||||
systemProperties.put("java.awt.headless", "true")
|
||||
}
|
||||
|
||||
ext {
|
||||
// Attributes for the AsciiDoc documentation to include code from source files
|
||||
javaSrcDir = sourceSets.main.java.srcDirs[0]
|
||||
javaClassesDir = sourceSets.main.output.classesDirs
|
||||
testSrcDir = sourceSets.test.java.srcDirs[0]
|
||||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
// Use the default import order configuration
|
||||
importOrder()
|
||||
|
||||
// Use the Eclipse JDT formatter
|
||||
eclipse('4.26').configFile("${rootDir}/config/eclipse-formatter-preferences.xml")
|
||||
}
|
||||
}
|
26
gradle/publishing-gitlab.gradle
Normal file
26
gradle/publishing-gitlab.gradle
Normal file
@ -0,0 +1,26 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
if (Boolean.valueOf(project.findProperty('DO_DEPLOY_PRIVATE'))
|
||||
&& System.getenv('CI_API_V4_URL') != null
|
||||
&& System.getenv('CI_PROJECT_ID') != null
|
||||
&& System.getenv('CI_JOB_TOKEN') != null) {
|
||||
|
||||
maven {
|
||||
name = 'deploy-repo-gitlab'
|
||||
url = "${System.env.CI_API_V4_URL}/projects/${System.env.CI_PROJECT_ID}/packages/maven"
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = 'Job-Token'
|
||||
value = "${System.env.CI_JOB_TOKEN}"
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
49
gradle/publishing-java.gradle
Normal file
49
gradle/publishing-java.gradle
Normal file
@ -0,0 +1,49 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
apply from: "${rootDir}/gradle/signing.gradle"
|
||||
|
||||
// Enable javadoc and sources JARs to be created.
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create(project.name + '_mavenJava', MavenPublication) {
|
||||
from(components.java)
|
||||
|
||||
pom {
|
||||
// Override artifactId since project.name is used by default and is mixed-case.
|
||||
artifactId = project.name.toLowerCase()
|
||||
|
||||
name = project.name
|
||||
description = project.name
|
||||
url = "https://www.opentcs.org/"
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name = "MIT License"
|
||||
url = "https://opensource.org/license/mit"
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
name = "The openTCS Authors"
|
||||
email = "info@opentcs.org"
|
||||
organization = "The open Transportation Control System"
|
||||
organizationUrl = "https://www.opentcs.org/"
|
||||
}
|
||||
}
|
||||
|
||||
scm {
|
||||
connection = "scm:git:git://github.com/opentcs/opentcs.git"
|
||||
developerConnection = "scm:git:ssh://github.com:opentcs/opentcs.git"
|
||||
url = "https://github.com/opentcs/opentcs"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
18
gradle/publishing-ossrh.gradle
Normal file
18
gradle/publishing-ossrh.gradle
Normal file
@ -0,0 +1,18 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
nexusPublishing {
|
||||
if (Boolean.valueOf(project.findProperty('DO_DEPLOY_OSSRH'))
|
||||
&& project.hasProperty('DEPLOY_REPO_OSSRH_USERNAME')
|
||||
&& project.hasProperty('DEPLOY_REPO_OSSRH_PASSWORD')) {
|
||||
repositories {
|
||||
sonatype {
|
||||
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/'))
|
||||
snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))
|
||||
|
||||
username = project.property('DEPLOY_REPO_OSSRH_USERNAME')
|
||||
password = project.property('DEPLOY_REPO_OSSRH_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
17
gradle/signing.gradle
Normal file
17
gradle/signing.gradle
Normal file
@ -0,0 +1,17 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
signing {
|
||||
useInMemoryPgpKeys(
|
||||
project.hasProperty('SIGNING_KEY') ? project.property('SIGNING_KEY') : '',
|
||||
project.hasProperty('SIGNING_PASSWORD') ? project.property('SIGNING_PASSWORD') : ''
|
||||
)
|
||||
sign publishing.publications
|
||||
}
|
||||
|
||||
tasks.withType(Sign) {
|
||||
onlyIf {
|
||||
project.hasProperty('SIGNING_KEY') && !project.property('SIGNING_KEY').toString().isEmpty() \
|
||||
&& project.hasProperty('SIGNING_PASSWORD') && !project.property('SIGNING_PASSWORD').toString().isEmpty()
|
||||
}
|
||||
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.jar.license
vendored
Normal file
2
gradle/wrapper/gradle-wrapper.jar.license
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: The Gradle Authors
|
||||
SPDX-License-Identifier: Apache-2.0
|
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
2
gradle/wrapper/gradle-wrapper.properties.license
vendored
Normal file
2
gradle/wrapper/gradle-wrapper.properties.license
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: The Gradle Authors
|
||||
SPDX-License-Identifier: Apache-2.0
|
252
gradlew
vendored
Normal file
252
gradlew
vendored
Normal file
@ -0,0 +1,252 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
94
gradlew.bat
vendored
Normal file
94
gradlew.bat
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
10
opentcs-api-base/build.gradle
Normal file
10
opentcs-api-base/build.gradle
Normal file
@ -0,0 +1,10 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
apply from: "${rootDir}/gradle/java-project.gradle"
|
||||
apply from: "${rootDir}/gradle/java-codequality.gradle"
|
||||
apply from: "${rootDir}/gradle/publishing-java.gradle"
|
||||
|
||||
task release {
|
||||
dependsOn build
|
||||
}
|
40
opentcs-api-base/gradle.properties
Normal file
40
opentcs-api-base/gradle.properties
Normal file
@ -0,0 +1,40 @@
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapAnnotationArgs=WRAP_IF_LONG
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapAfterDotInChainedMethodCalls=false
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapFor=WRAP_IF_LONG
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.sortMembersByVisibility=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.visibilityOrder=PUBLIC;PROTECTED;DEFAULT;PRIVATE
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapMethodParams=WRAP_IF_LONG
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.enable-indent=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapDisjunctiveCatchTypes=WRAP_IF_LONG
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.keepGettersAndSettersTogether=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapExtendsImplementsList=WRAP_ALWAYS
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapThrowsKeyword=WRAP_ALWAYS
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapExtendsImplementsKeyword=WRAP_ALWAYS
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classMembersOrder=STATIC FIELD;FIELD;STATIC_INIT;CONSTRUCTOR;INSTANCE_INIT;STATIC METHOD;METHOD;STATIC CLASS;CLASS
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapEnumConstants=WRAP_ALWAYS
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapCommentText=false
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapThrowsList=WRAP_IF_LONG
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapAssert=WRAP_IF_LONG
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.continuationIndentSize=4
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAnnotationArgs=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.preserveNewLinesInComments=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
|
||||
netbeans.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=100
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
|
||||
netbeans.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
|
@ -0,0 +1,53 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Thrown when there are insufficient user permissions to perform an operation.
|
||||
*/
|
||||
public class CredentialsException
|
||||
extends
|
||||
KernelRuntimeException
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* Constructs a CredentialsException with no detail message.
|
||||
*/
|
||||
public CredentialsException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CredentialsException with the specified detail message.
|
||||
*
|
||||
* @param message The detail message.
|
||||
*/
|
||||
public CredentialsException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CredentialsException with the specified detail message and
|
||||
* cause.
|
||||
*
|
||||
* @param message The detail message.
|
||||
* @param cause The exception's cause.
|
||||
*/
|
||||
public CredentialsException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CredentialsException with the specified cause and a detail
|
||||
* message of <code>(cause == null ? null : cause.toString())</code> (which
|
||||
* typically contains the class and detail message of <code>cause</code>).
|
||||
*
|
||||
* @param cause The exception's cause.
|
||||
*/
|
||||
public CredentialsException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
/**
|
||||
* Declares the methods an openTCS kernel implements.
|
||||
*/
|
||||
public interface Kernel {
|
||||
|
||||
/**
|
||||
* The default name used for the empty model created on startup.
|
||||
*/
|
||||
String DEFAULT_MODEL_NAME = "unnamed";
|
||||
|
||||
/**
|
||||
* Returns the current state of the kernel.
|
||||
*
|
||||
* @return The current state of the kernel.
|
||||
* @throws CredentialsException If the calling client is not allowed to
|
||||
* execute this method.
|
||||
*/
|
||||
State getState()
|
||||
throws CredentialsException;
|
||||
|
||||
/**
|
||||
* Sets the current state of the kernel.
|
||||
* <p>
|
||||
* Note: This method should only be used internally by the Kernel application.
|
||||
* </p>
|
||||
*
|
||||
* @param newState The state the kernel is to be set to.
|
||||
* @throws IllegalArgumentException If setting the new state is not possible,
|
||||
* e.g. because a transition from the current to the new state is not allowed.
|
||||
* @throws CredentialsException If the calling client is not allowed to
|
||||
* execute this method.
|
||||
*/
|
||||
void setState(State newState)
|
||||
throws IllegalArgumentException,
|
||||
CredentialsException;
|
||||
|
||||
/**
|
||||
* The various states a kernel instance may be running in.
|
||||
*/
|
||||
enum State {
|
||||
|
||||
/**
|
||||
* The state in which the model/topology is created and parameters are set.
|
||||
*/
|
||||
MODELLING,
|
||||
/**
|
||||
* The normal mode of operation in which transport orders may be accepted
|
||||
* and dispatched to vehicles.
|
||||
*/
|
||||
OPERATING,
|
||||
/**
|
||||
* A transitional state the kernel is in while shutting down.
|
||||
*/
|
||||
SHUTDOWN
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* An exception thrown by the openTCS kernel.
|
||||
*/
|
||||
public class KernelException
|
||||
extends
|
||||
Exception
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* Constructs a new instance with no detail message.
|
||||
*/
|
||||
public KernelException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance with the specified detail message.
|
||||
*
|
||||
* @param message The detail message.
|
||||
*/
|
||||
public KernelException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance with the specified detail message and cause.
|
||||
*
|
||||
* @param message The detail message.
|
||||
* @param cause The exception's cause.
|
||||
*/
|
||||
public KernelException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance with the specified cause and a detail
|
||||
* message of <code>(cause == null ? null : cause.toString())</code> (which
|
||||
* typically contains the class and detail message of <code>cause</code>).
|
||||
*
|
||||
* @param cause The exception's cause.
|
||||
*/
|
||||
public KernelException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* A runtime exception thrown by the openTCS kernel.
|
||||
*/
|
||||
public class KernelRuntimeException
|
||||
extends
|
||||
RuntimeException
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* Constructs a new instance with no detail message.
|
||||
*/
|
||||
public KernelRuntimeException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance with the specified detail message.
|
||||
*
|
||||
* @param message The detail message.
|
||||
*/
|
||||
public KernelRuntimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance with the specified detail message and cause.
|
||||
*
|
||||
* @param message The detail message.
|
||||
* @param cause The exception's cause.
|
||||
*/
|
||||
public KernelRuntimeException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance with the specified cause and a detail
|
||||
* message of <code>(cause == null ? null : cause.toString())</code> (which
|
||||
* typically contains the class and detail message of <code>cause</code>).
|
||||
*
|
||||
* @param cause The exception's cause.
|
||||
*/
|
||||
public KernelRuntimeException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import jakarta.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
import org.opentcs.components.kernel.services.DispatcherService;
|
||||
import org.opentcs.components.kernel.services.NotificationService;
|
||||
import org.opentcs.components.kernel.services.PeripheralDispatcherService;
|
||||
import org.opentcs.components.kernel.services.PeripheralJobService;
|
||||
import org.opentcs.components.kernel.services.PeripheralService;
|
||||
import org.opentcs.components.kernel.services.PlantModelService;
|
||||
import org.opentcs.components.kernel.services.QueryService;
|
||||
import org.opentcs.components.kernel.services.RouterService;
|
||||
import org.opentcs.components.kernel.services.TransportOrderService;
|
||||
import org.opentcs.components.kernel.services.VehicleService;
|
||||
|
||||
/**
|
||||
* Provides clients access to kernel services.
|
||||
*/
|
||||
public interface KernelServicePortal {
|
||||
|
||||
/**
|
||||
* Logs in with/establishes a connection to the remote kernel service portal.
|
||||
*
|
||||
* @param hostName The host on which the remote portal is running.
|
||||
* @param port The port at which we can reach the remote RMI registry.
|
||||
* @throws KernelRuntimeException If there was a problem logging in with the remote portal.
|
||||
*/
|
||||
void login(
|
||||
@Nonnull
|
||||
String hostName,
|
||||
int port
|
||||
)
|
||||
throws KernelRuntimeException;
|
||||
|
||||
/**
|
||||
* Logs out from/clears the connection to the remote kernel service portal.
|
||||
*
|
||||
* @throws KernelRuntimeException If there was a problem logging out from the remote portal, i.e.
|
||||
* it is no longer available.
|
||||
*/
|
||||
void logout()
|
||||
throws KernelRuntimeException;
|
||||
|
||||
/**
|
||||
* Returns the current state of the kernel.
|
||||
*
|
||||
* @return The current state of the kernel.
|
||||
* @throws KernelRuntimeException In case there is an exception executing this method.
|
||||
*/
|
||||
Kernel.State getState()
|
||||
throws KernelRuntimeException;
|
||||
|
||||
/**
|
||||
* Fetches events buffered for the client.
|
||||
*
|
||||
* @param timeout A timeout (in ms) for which to wait for events to arrive.
|
||||
* @return A list of events (in the order they arrived).
|
||||
* @throws KernelRuntimeException In case there is an exception executing this method.
|
||||
*/
|
||||
List<Object> fetchEvents(long timeout)
|
||||
throws KernelRuntimeException;
|
||||
|
||||
/**
|
||||
* Publishes an event.
|
||||
*
|
||||
* @param event The event to be published.
|
||||
* @throws KernelRuntimeException In case there is an exception executing this method.
|
||||
*/
|
||||
void publishEvent(Object event)
|
||||
throws KernelRuntimeException;
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding the plant model.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding the plant model.
|
||||
*/
|
||||
@Nonnull
|
||||
PlantModelService getPlantModelService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding transport orders and order
|
||||
* sequences.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding transport orders and order
|
||||
* sequences.
|
||||
*/
|
||||
@Nonnull
|
||||
TransportOrderService getTransportOrderService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding vehicles.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding vehicles.
|
||||
*/
|
||||
@Nonnull
|
||||
VehicleService getVehicleService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding user notifications.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding user notifications.
|
||||
*/
|
||||
@Nonnull
|
||||
NotificationService getNotificationService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding the dispatcher.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding the dispatcher.
|
||||
*/
|
||||
@Nonnull
|
||||
DispatcherService getDispatcherService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding the router.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding the router.
|
||||
*/
|
||||
@Nonnull
|
||||
RouterService getRouterService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods for generic queries.
|
||||
*
|
||||
* @return The service a client can use to access methods for generic queries.
|
||||
*/
|
||||
@Nonnull
|
||||
QueryService getQueryService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding peripherals.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding peripherals.
|
||||
*/
|
||||
@Nonnull
|
||||
PeripheralService getPeripheralService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding peripheral jobs.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding peripheral jobs.
|
||||
*/
|
||||
@Nonnull
|
||||
PeripheralJobService getPeripheralJobService();
|
||||
|
||||
/**
|
||||
* Returns the service a client can use to access methods regarding the peripheral dispatcher.
|
||||
*
|
||||
* @return The service a client can use to access methods regarding the peripheral dispatcher.
|
||||
*/
|
||||
@Nonnull
|
||||
PeripheralDispatcherService getPeripheralDispatcherService();
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Emitted by/for kernel state changes.
|
||||
*/
|
||||
public class KernelStateTransitionEvent
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* The old state the kernel is leaving.
|
||||
*/
|
||||
private final Kernel.State leftState;
|
||||
/**
|
||||
* The new state the kernel is in transition to.
|
||||
*/
|
||||
private final Kernel.State enteredState;
|
||||
/**
|
||||
* Whether the transition to the entered state is finished or not.
|
||||
*/
|
||||
private final boolean transitionFinished;
|
||||
|
||||
/**
|
||||
* Creates a new TCSKernelStateEvent.
|
||||
*
|
||||
* @param leftState The previous state of the kernel.
|
||||
* @param enteredState The new state of the kernel.
|
||||
* @param transitionFinished Whether the transistion is finished, yet.
|
||||
*/
|
||||
public KernelStateTransitionEvent(
|
||||
Kernel.State leftState,
|
||||
Kernel.State enteredState,
|
||||
boolean transitionFinished
|
||||
) {
|
||||
this.leftState = leftState;
|
||||
this.enteredState = enteredState;
|
||||
this.transitionFinished = transitionFinished;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the state the kernel is leaving.
|
||||
*
|
||||
* @return The state the kernel is leaving.
|
||||
*/
|
||||
public Kernel.State getLeftState() {
|
||||
return leftState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the state for which this event was generated.
|
||||
*
|
||||
* @return The state for which this event was generated.
|
||||
*/
|
||||
public Kernel.State getEnteredState() {
|
||||
return enteredState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if, and only if, the transition to the new kernel
|
||||
* state is finished.
|
||||
*
|
||||
* @return <code>true</code> if, and only if, the transition to the new kernel
|
||||
* state is finished.
|
||||
*/
|
||||
public boolean isTransitionFinished() {
|
||||
return transitionFinished;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName()
|
||||
+ '{'
|
||||
+ "leftState=" + leftState
|
||||
+ ", enteredState=" + enteredState
|
||||
+ ", transitionFinished=" + transitionFinished
|
||||
+ '}';
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import org.opentcs.components.Lifecycle;
|
||||
import org.opentcs.components.kernel.KernelExtension;
|
||||
|
||||
/**
|
||||
* Declares the methods the openTCS kernel must provide which are not accessible
|
||||
* to remote peers.
|
||||
*/
|
||||
public interface LocalKernel
|
||||
extends
|
||||
Kernel,
|
||||
Lifecycle {
|
||||
|
||||
/**
|
||||
* Adds a <code>KernelExtension</code> to this kernel.
|
||||
*
|
||||
* @param newExtension The extension to be added.
|
||||
*/
|
||||
void addKernelExtension(KernelExtension newExtension);
|
||||
|
||||
/**
|
||||
* Removes a <code>KernelExtension</code> from this kernel.
|
||||
*
|
||||
* @param rmExtension The extension to be removed.
|
||||
*/
|
||||
void removeKernelExtension(KernelExtension rmExtension);
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Emitted when the kernel loads a model.
|
||||
*/
|
||||
public class ModelTransitionEvent
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* The old model the kernel is leaving.
|
||||
*/
|
||||
private final String oldModelName;
|
||||
/**
|
||||
* The new model the kernel is in transition to.
|
||||
*/
|
||||
private final String newModelName;
|
||||
/**
|
||||
* Whether the content of the model actually changed with the transition.
|
||||
*/
|
||||
private final boolean modelContentChanged;
|
||||
/**
|
||||
* Whether the transition to the entered state is finished or not.
|
||||
*/
|
||||
private final boolean transitionFinished;
|
||||
|
||||
/**
|
||||
* Creates a new TCSModelTransitionEvent.
|
||||
*
|
||||
* @param oldModelName The name of the previously loaded model.
|
||||
* @param newModelName The name of the new model.
|
||||
* @param modelContentChanged Whether the content of the model actually
|
||||
* changed with the transition.
|
||||
* @param transitionFinished Whether the transition to the new model is
|
||||
* finished, yet.
|
||||
*/
|
||||
public ModelTransitionEvent(
|
||||
String oldModelName,
|
||||
String newModelName,
|
||||
boolean modelContentChanged,
|
||||
boolean transitionFinished
|
||||
) {
|
||||
this.oldModelName = oldModelName;
|
||||
this.newModelName = newModelName;
|
||||
this.modelContentChanged = modelContentChanged;
|
||||
this.transitionFinished = transitionFinished;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the model name the kernel is leaving.
|
||||
*
|
||||
* @return The model the kernel is leaving.
|
||||
*/
|
||||
public String getOldModelName() {
|
||||
return oldModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the model for which this event was generated.
|
||||
*
|
||||
* @return The model for which this event was generated.
|
||||
*/
|
||||
public String getNewModelName() {
|
||||
return newModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if, and only if, the content of the model
|
||||
* actually changed with the transition.
|
||||
*
|
||||
* @return <code>true</code> if, and only if, the content of the model
|
||||
* actually changed with the transition.
|
||||
*/
|
||||
public boolean hasModelContentChanged() {
|
||||
return modelContentChanged;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if, and only if, the transition to the new kernel
|
||||
* state is finished.
|
||||
*
|
||||
* @return <code>true</code> if, and only if, the transition to the new kernel
|
||||
* state is finished.
|
||||
*/
|
||||
public boolean isTransitionFinished() {
|
||||
return transitionFinished;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName()
|
||||
+ '{'
|
||||
+ "oldModelName=" + oldModelName
|
||||
+ ", newModelName=" + newModelName
|
||||
+ ", modelContentChanged=" + modelContentChanged
|
||||
+ ", transitionFinished=" + transitionFinished
|
||||
+ '}';
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.opentcs.data.notification.UserNotification;
|
||||
|
||||
/**
|
||||
* Instances of this class represent events emitted by/for notifications being published.
|
||||
*/
|
||||
public class NotificationPublicationEvent
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* The published message.
|
||||
*/
|
||||
private final UserNotification notification;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param message The message being published.
|
||||
*/
|
||||
public NotificationPublicationEvent(UserNotification message) {
|
||||
this.notification = requireNonNull(message, "notification");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message being published.
|
||||
*
|
||||
* @return The message being published.
|
||||
*/
|
||||
public UserNotification getNotification() {
|
||||
return notification;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName()
|
||||
+ '{'
|
||||
+ "notification=" + notification
|
||||
+ '}';
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
/**
|
||||
* Provides access to a shared {@link KernelServicePortal} instance.
|
||||
*/
|
||||
public interface SharedKernelServicePortal
|
||||
extends
|
||||
AutoCloseable {
|
||||
|
||||
@Override
|
||||
void close();
|
||||
|
||||
/**
|
||||
* Indicates whether this instance is closed/unregistered from the shared portal pool.
|
||||
*
|
||||
* @return {@code true} if, and only if, this instance is closed.
|
||||
*/
|
||||
boolean isClosed();
|
||||
|
||||
/**
|
||||
* Returns the {@link KernelServicePortal} instance being shared.
|
||||
*
|
||||
* @return The portal instance being shared.
|
||||
* @throws IllegalStateException If this instance is closed.
|
||||
*/
|
||||
KernelServicePortal getPortal()
|
||||
throws IllegalStateException;
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import org.opentcs.components.kernel.services.ServiceUnavailableException;
|
||||
|
||||
/**
|
||||
* Pools access to a {@link KernelServicePortal} instance for multiple clients.
|
||||
*/
|
||||
public interface SharedKernelServicePortalProvider {
|
||||
|
||||
/**
|
||||
* Creates and registers a new client with this access pool.
|
||||
* This is a convenience method that supports try-with-ressources and does not require a
|
||||
* preexisting client.
|
||||
*
|
||||
* @return The {@link SharedKernelServicePortal}.
|
||||
* @throws ServiceUnavailableException in case of connection falure with the portal.
|
||||
*/
|
||||
SharedKernelServicePortal register()
|
||||
throws ServiceUnavailableException;
|
||||
|
||||
/**
|
||||
* Checks whether a kernel reference is currently being shared.
|
||||
*
|
||||
* @return {@code true} if, and only if, a portal reference is currently being shared, meaning
|
||||
* that at least one client is registered and a usable portal reference exists.
|
||||
*/
|
||||
boolean portalShared();
|
||||
|
||||
/**
|
||||
* Returns a description for the portal currently being shared.
|
||||
*
|
||||
* @return A description for the portal currently being shared, or the empty string, if none is
|
||||
* currently being shared.
|
||||
*/
|
||||
String getPortalDescription();
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import jakarta.annotation.Nonnull;
|
||||
import jakarta.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* A set of parameters to be used for SSL-encrypted socket connections.
|
||||
*/
|
||||
public class SslParameterSet
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* The default type used for truststore and keystore files.
|
||||
*/
|
||||
public static final String DEFAULT_KEYSTORE_TYPE = "PKCS12";
|
||||
|
||||
/**
|
||||
* The type used for keystore and truststore.
|
||||
*/
|
||||
private final String keystoreType;
|
||||
/**
|
||||
* The file path of the keystore.
|
||||
*/
|
||||
private final File keystoreFile;
|
||||
/**
|
||||
* The password for the keystore file.
|
||||
*/
|
||||
private final String keystorePassword;
|
||||
/**
|
||||
* The file path of the truststore.
|
||||
*/
|
||||
private final File truststoreFile;
|
||||
/**
|
||||
* The password for the truststore file.
|
||||
*/
|
||||
private final String truststorePassword;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param keystoreType The type used for keystore and truststore
|
||||
* @param keystoreFile The keystore file
|
||||
* @param truststoreFile The truststore file
|
||||
* @param keystorePassword The keystore file password
|
||||
* @param truststorePassword The truststore file password
|
||||
*/
|
||||
public SslParameterSet(
|
||||
@Nonnull
|
||||
String keystoreType,
|
||||
@Nullable
|
||||
File keystoreFile,
|
||||
@Nullable
|
||||
String keystorePassword,
|
||||
@Nullable
|
||||
File truststoreFile,
|
||||
@Nullable
|
||||
String truststorePassword
|
||||
) {
|
||||
this.keystoreType = requireNonNull(keystoreType, "keystoreType");
|
||||
this.keystoreFile = keystoreFile;
|
||||
this.keystorePassword = keystorePassword;
|
||||
this.truststoreFile = truststoreFile;
|
||||
this.truststorePassword = truststorePassword;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the keystoreType used to decrypt the keystore and truststore.
|
||||
*
|
||||
* @return The keystoreType used to decrypt the keystore and truststore
|
||||
*/
|
||||
@Nonnull
|
||||
public String getKeystoreType() {
|
||||
return keystoreType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the file path of the keystore file.
|
||||
*
|
||||
* @return The file path of the keystore file
|
||||
*/
|
||||
@Nullable
|
||||
public File getKeystoreFile() {
|
||||
return keystoreFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the password for the keystore file.
|
||||
*
|
||||
* @return The password for the keystore file
|
||||
*/
|
||||
@Nullable
|
||||
public String getKeystorePassword() {
|
||||
return keystorePassword;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the file path of the truststore file.
|
||||
*
|
||||
* @return The file path of the truststore file
|
||||
*/
|
||||
@Nullable
|
||||
public File getTruststoreFile() {
|
||||
return truststoreFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the password for the truststore file.
|
||||
*
|
||||
* @return The password for the truststore file
|
||||
*/
|
||||
@Nullable
|
||||
public String getTruststorePassword() {
|
||||
return truststorePassword;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
/**
|
||||
* Interfaces and classes for accessing the kernel from outside, for instance
|
||||
* from a remote client or a communication adapter.
|
||||
*/
|
||||
package org.opentcs.access;
|
@ -0,0 +1,77 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import jakarta.annotation.Nonnull;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Identifies a remote client unambiguously.
|
||||
*/
|
||||
public class ClientID
|
||||
implements
|
||||
Serializable {
|
||||
/**
|
||||
* The client's name.
|
||||
*/
|
||||
private final String clientName;
|
||||
/**
|
||||
* The client's UUID.
|
||||
*/
|
||||
private final UUID uuid;
|
||||
|
||||
/**
|
||||
* Creates a new ClientID.
|
||||
*
|
||||
* @param clientName The client's name.
|
||||
*/
|
||||
public ClientID(
|
||||
@Nonnull
|
||||
String clientName
|
||||
) {
|
||||
this.clientName = requireNonNull(clientName, "clientName");
|
||||
uuid = UUID.randomUUID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the client's name.
|
||||
*
|
||||
* @return The client's name.
|
||||
*/
|
||||
@Nonnull
|
||||
public String getClientName() {
|
||||
return clientName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this object equals another one.
|
||||
*
|
||||
* @param otherObject The other object to be compared with this object.
|
||||
* @return <code>true</code> if, and only if, the given object is also a
|
||||
* <code>ClientID</code> and contains the same name and the same UUID as this
|
||||
* one.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object otherObject) {
|
||||
if (otherObject instanceof ClientID) {
|
||||
ClientID otherID = (ClientID) otherObject;
|
||||
return clientName.equals(otherID.clientName) && uuid.equals(otherID.uuid);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return uuid.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return clientName + ":" + uuid;
|
||||
}
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import jakarta.annotation.Nonnull;
|
||||
import java.util.function.Predicate;
|
||||
import org.opentcs.access.CredentialsException;
|
||||
import org.opentcs.access.KernelServicePortal;
|
||||
import org.opentcs.access.rmi.factories.NullSocketFactoryProvider;
|
||||
import org.opentcs.access.rmi.factories.SocketFactoryProvider;
|
||||
import org.opentcs.access.rmi.services.RemoteKernelServicePortalProxy;
|
||||
import org.opentcs.components.kernel.services.ServiceUnavailableException;
|
||||
import org.opentcs.util.ClassMatcher;
|
||||
|
||||
/**
|
||||
* Builds {@link KernelServicePortal} instances for connections to remote portals.
|
||||
*/
|
||||
public class KernelServicePortalBuilder {
|
||||
|
||||
/**
|
||||
* Provides socket factories used for RMI.
|
||||
*/
|
||||
private SocketFactoryProvider socketFactoryProvider = new NullSocketFactoryProvider();
|
||||
/**
|
||||
* The user name for logging in.
|
||||
*/
|
||||
private final String userName;
|
||||
/**
|
||||
* The password for logging in.
|
||||
*/
|
||||
private final String password;
|
||||
/**
|
||||
* The event filter to be applied for the built portal.
|
||||
*/
|
||||
private Predicate<Object> eventFilter = new ClassMatcher(Object.class);
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param userName The user name to use for logging in.
|
||||
* @param password The password to use for logging in.
|
||||
*/
|
||||
public KernelServicePortalBuilder(String userName, String password) {
|
||||
this.userName = requireNonNull(userName, "userName");
|
||||
this.password = requireNonNull(password, "password");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the socket factory provider used for RMI.
|
||||
*
|
||||
* @return The socket factory provider used for RMI.
|
||||
*/
|
||||
public SocketFactoryProvider getSocketFactoryProvider() {
|
||||
return socketFactoryProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the socket factory provider used for RMI.
|
||||
*
|
||||
* @param socketFactoryProvider The socket factory provider.
|
||||
* @return This instance.
|
||||
*/
|
||||
public KernelServicePortalBuilder setSocketFactoryProvider(
|
||||
@Nonnull
|
||||
SocketFactoryProvider socketFactoryProvider
|
||||
) {
|
||||
this.socketFactoryProvider = requireNonNull(socketFactoryProvider, "socketFactoryProvider");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the user name used for logging in.
|
||||
*
|
||||
* @return The user name used for logging in.
|
||||
*/
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the password used for logging in.
|
||||
*
|
||||
* @return The password used for logging in.
|
||||
*/
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the event filter to be applied for the built portal.
|
||||
*
|
||||
* @return The event filter to be applied for the built portal.
|
||||
*/
|
||||
public Predicate<Object> getEventFilter() {
|
||||
return eventFilter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the event filter to be applied for the built portal.
|
||||
*
|
||||
* @param eventFilter The event filter.
|
||||
* @return This instance.
|
||||
*/
|
||||
public KernelServicePortalBuilder setEventFilter(
|
||||
@Nonnull
|
||||
Predicate<Object> eventFilter
|
||||
) {
|
||||
this.eventFilter = requireNonNull(eventFilter, "eventFilter");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds and returns a {@link KernelServicePortal} with the configured parameters.
|
||||
*
|
||||
* @return A {@link KernelServicePortal} instance.
|
||||
* @throws ServiceUnavailableException If the remote portal is not reachable for some reason.
|
||||
* @throws CredentialsException If the client login with the remote portal failed, e.g. because of
|
||||
* incorrect login data.
|
||||
*/
|
||||
public KernelServicePortal build()
|
||||
throws ServiceUnavailableException,
|
||||
CredentialsException {
|
||||
return new RemoteKernelServicePortalProxy(
|
||||
userName,
|
||||
password,
|
||||
socketFactoryProvider,
|
||||
eventFilter
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.factories;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.Socket;
|
||||
import java.rmi.server.RMIClientSocketFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLParameters;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.rmi.ssl.SslRMIClientSocketFactory;
|
||||
|
||||
/**
|
||||
* This implementation is similar to {@link SslRMIClientSocketFactory} but allows the use of a
|
||||
* custom SSLConext.
|
||||
*/
|
||||
class CustomSslRMIClientSocketFactory
|
||||
implements
|
||||
RMIClientSocketFactory,
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* Provides an instance of {@link SSLContext} used to get the actual socket factory.
|
||||
*/
|
||||
private final SecureSslContextFactory secureSslContextFactory;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param secureSslContextFactory Provides an instance of {@link SSLContext} used to get the
|
||||
* actual socket factory.
|
||||
*/
|
||||
CustomSslRMIClientSocketFactory(SecureSslContextFactory secureSslContextFactory) {
|
||||
this.secureSslContextFactory = requireNonNull(
|
||||
secureSslContextFactory,
|
||||
"secureSslContextFactory"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(String host, int port)
|
||||
throws IOException {
|
||||
SSLContext context = secureSslContextFactory.createClientContext();
|
||||
SSLSocketFactory sf = context.getSocketFactory();
|
||||
SSLSocket socket = (SSLSocket) sf.createSocket(host, port);
|
||||
SSLParameters param = context.getSupportedSSLParameters();
|
||||
socket.setEnabledCipherSuites(param.getCipherSuites());
|
||||
socket.setEnabledProtocols(param.getProtocols());
|
||||
return socket;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.factories;
|
||||
|
||||
import jakarta.inject.Inject;
|
||||
import java.rmi.registry.Registry;
|
||||
import java.rmi.server.RMIClientSocketFactory;
|
||||
import java.rmi.server.RMIServerSocketFactory;
|
||||
|
||||
/**
|
||||
* Provides {@code null} for both client and server socket factories.
|
||||
* By using this provider, the default client-side/server-side socket factory will be used in
|
||||
* {@link Registry} stubs.
|
||||
*/
|
||||
public class NullSocketFactoryProvider
|
||||
implements
|
||||
SocketFactoryProvider {
|
||||
|
||||
@Inject
|
||||
public NullSocketFactoryProvider() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public RMIClientSocketFactory getClientSocketFactory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RMIServerSocketFactory getServerSocketFactory() {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.factories;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import jakarta.inject.Inject;
|
||||
import java.rmi.server.RMIClientSocketFactory;
|
||||
import java.rmi.server.RMIServerSocketFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLParameters;
|
||||
import javax.rmi.ssl.SslRMIServerSocketFactory;
|
||||
import org.opentcs.access.SslParameterSet;
|
||||
|
||||
/**
|
||||
* Provides instances of {@link RMIClientSocketFactory} and {@link RMIServerSocketFactory} that are
|
||||
* implemented over the SSL or TLS protocols.
|
||||
* Since these factories don't support anonymous cipher suites a keystore on the server-side and a
|
||||
* truststore on the client-side is necessary.
|
||||
*/
|
||||
public class SecureSocketFactoryProvider
|
||||
implements
|
||||
SocketFactoryProvider {
|
||||
|
||||
/**
|
||||
* Provides methods for creating client-side and server-side {@link SSLContext} instances.
|
||||
*/
|
||||
private final SecureSslContextFactory secureSslContextFactory;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param sslParameterSet The SSL parameters to be used for creating socket factories.
|
||||
*/
|
||||
@Inject
|
||||
public SecureSocketFactoryProvider(SslParameterSet sslParameterSet) {
|
||||
requireNonNull(sslParameterSet, "sslParameterSet");
|
||||
this.secureSslContextFactory = new SecureSslContextFactory(sslParameterSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RMIClientSocketFactory getClientSocketFactory() {
|
||||
return new CustomSslRMIClientSocketFactory(secureSslContextFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RMIServerSocketFactory getServerSocketFactory() {
|
||||
SSLContext context = secureSslContextFactory.createServerContext();
|
||||
SSLParameters param = context.getSupportedSSLParameters();
|
||||
return new SslRMIServerSocketFactory(
|
||||
context,
|
||||
param.getCipherSuites(),
|
||||
param.getProtocols(),
|
||||
param.getWantClientAuth()
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.factories;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.KeyStore;
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.UnrecoverableKeyException;
|
||||
import java.security.cert.CertificateException;
|
||||
import javax.net.ssl.KeyManagerFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
import org.opentcs.access.SslParameterSet;
|
||||
|
||||
/**
|
||||
* Provides methods for creating client-side and server-side {@link SSLContext} instances.
|
||||
*/
|
||||
class SecureSslContextFactory
|
||||
implements
|
||||
Serializable {
|
||||
|
||||
/**
|
||||
* The name of the algorithm to use for the {@link KeyManagerFactory} and
|
||||
* {@link TrustManagerFactory}.
|
||||
*/
|
||||
private static final String KEY_TRUST_MANAGEMENT_ALGORITHM = "SunX509";
|
||||
/**
|
||||
* The protocol to use with the ssl context.
|
||||
*/
|
||||
private static final String SSL_CONTEXT_PROTOCOL = "TLSv1.2";
|
||||
/**
|
||||
* The ssl parameters to be used for creating the ssl context.
|
||||
*/
|
||||
private final SslParameterSet sslParameterSet;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param sslParameterSet The ssl parameters to be used for creating the ssl context.
|
||||
*/
|
||||
SecureSslContextFactory(SslParameterSet sslParameterSet) {
|
||||
this.sslParameterSet = requireNonNull(sslParameterSet, "sslParameterSet");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of {@link SSLContext} for the client.
|
||||
*
|
||||
* @return The ssl context.
|
||||
* @throws IllegalStateException If the creation of the ssl context fails.
|
||||
*/
|
||||
public SSLContext createClientContext()
|
||||
throws IllegalStateException {
|
||||
SSLContext context = null;
|
||||
|
||||
try {
|
||||
KeyStore ts = KeyStore.getInstance(sslParameterSet.getKeystoreType());
|
||||
ts.load(
|
||||
new FileInputStream(sslParameterSet.getTruststoreFile()),
|
||||
sslParameterSet.getTruststorePassword().toCharArray()
|
||||
);
|
||||
TrustManagerFactory tmf = TrustManagerFactory.getInstance(KEY_TRUST_MANAGEMENT_ALGORITHM);
|
||||
tmf.init(ts);
|
||||
|
||||
context = SSLContext.getInstance(SSL_CONTEXT_PROTOCOL);
|
||||
context.init(null, tmf.getTrustManagers(), null);
|
||||
}
|
||||
catch (NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException
|
||||
| KeyManagementException ex) {
|
||||
throw new IllegalStateException("Error creating the client's ssl context", ex);
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of {@link SSLContext} for the server.
|
||||
*
|
||||
* @return The ssl context.
|
||||
* @throws IllegalStateException If the creation of the ssl context fails.
|
||||
*/
|
||||
public SSLContext createServerContext()
|
||||
throws IllegalStateException {
|
||||
SSLContext context = null;
|
||||
|
||||
try {
|
||||
KeyStore ks = KeyStore.getInstance(sslParameterSet.getKeystoreType());
|
||||
ks.load(
|
||||
new FileInputStream(sslParameterSet.getKeystoreFile()),
|
||||
sslParameterSet.getKeystorePassword().toCharArray()
|
||||
);
|
||||
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KEY_TRUST_MANAGEMENT_ALGORITHM);
|
||||
kmf.init(ks, sslParameterSet.getKeystorePassword().toCharArray());
|
||||
|
||||
context = SSLContext.getInstance(SSL_CONTEXT_PROTOCOL);
|
||||
context.init(kmf.getKeyManagers(), null, null);
|
||||
|
||||
}
|
||||
catch (NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException
|
||||
| KeyManagementException | UnrecoverableKeyException ex) {
|
||||
throw new IllegalStateException("Error creating the server's ssl context", ex);
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.factories;
|
||||
|
||||
import jakarta.annotation.Nullable;
|
||||
import java.rmi.server.RMIClientSocketFactory;
|
||||
import java.rmi.server.RMIServerSocketFactory;
|
||||
|
||||
/**
|
||||
* A provider for instances of {@link RMIClientSocketFactory} and {@link RMIServerSocketFactory}.
|
||||
* Generally one provider should provide compatible factories for clients and servers.
|
||||
*/
|
||||
public interface SocketFactoryProvider {
|
||||
|
||||
/**
|
||||
* Returns a {@link RMIClientSocketFactory}.
|
||||
*
|
||||
* @return A {@link RMIClientSocketFactory}.
|
||||
* May be <code>null</code> to indicate that a default factory implementation is to be used.
|
||||
*/
|
||||
@Nullable
|
||||
RMIClientSocketFactory getClientSocketFactory();
|
||||
|
||||
/**
|
||||
* Returns a {@link RMIServerSocketFactory}.
|
||||
*
|
||||
* @return A {@link RMIServerSocketFactory}.
|
||||
* May be <code>null</code> to indicate that a default factory implementation is to be used.
|
||||
*/
|
||||
@Nullable
|
||||
RMIServerSocketFactory getServerSocketFactory();
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
/**
|
||||
* Interfaces and classes for configuration of the RMI runtime used by openTCS kernel and clients.
|
||||
*/
|
||||
package org.opentcs.access.rmi.factories;
|
@ -0,0 +1,7 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
/**
|
||||
* Interfaces and classes for transparently providing an openTCS kernel's
|
||||
* functionality via RMI.
|
||||
*/
|
||||
package org.opentcs.access.rmi;
|
@ -0,0 +1,141 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
import org.opentcs.components.kernel.services.ServiceUnavailableException;
|
||||
import org.opentcs.data.ObjectExistsException;
|
||||
import org.opentcs.data.ObjectUnknownException;
|
||||
|
||||
/**
|
||||
* A base class for remote service proxy implementations.
|
||||
*
|
||||
* @param <R> The remote service's type.
|
||||
*/
|
||||
abstract class AbstractRemoteServiceProxy<R extends Remote> {
|
||||
|
||||
/**
|
||||
* The message to log when a service is unavailable.
|
||||
*/
|
||||
private static final String SERVICE_UNAVAILABLE_MESSAGE = "Remote service unreachable";
|
||||
/**
|
||||
* The client using this service.
|
||||
*/
|
||||
private ClientID clientId;
|
||||
/**
|
||||
* The corresponding remote service.
|
||||
*/
|
||||
private R remoteService;
|
||||
/**
|
||||
* The listener that is interested in updates of this service.
|
||||
*/
|
||||
private ServiceListener serviceListener;
|
||||
|
||||
/**
|
||||
* Returns the client id using this service.
|
||||
*
|
||||
* @return The client id using this service.
|
||||
*/
|
||||
ClientID getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client id using this service.
|
||||
*
|
||||
* @param clientId The client id.
|
||||
* @return This remote service proxy.
|
||||
*/
|
||||
AbstractRemoteServiceProxy<R> setClientId(ClientID clientId) {
|
||||
this.clientId = clientId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the remote service to delegate method invocations to.
|
||||
*
|
||||
* @return The remote service to delegate method invocations to.
|
||||
*/
|
||||
R getRemoteService() {
|
||||
return remoteService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the remote service to delegate method invocations to.
|
||||
*
|
||||
* @param remoteService The remote service.
|
||||
* @return This remote service proxy.
|
||||
*/
|
||||
AbstractRemoteServiceProxy<R> setRemoteService(R remoteService) {
|
||||
this.remoteService = remoteService;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the listener that is interested in updates of this service.
|
||||
*
|
||||
* @return The listener that is interested in updates of this service.
|
||||
*/
|
||||
ServiceListener getServiceListener() {
|
||||
return serviceListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the listener that is interested in updates of this service.
|
||||
*
|
||||
* @param serviceListener The service listener.
|
||||
* @return This remote service proxy.
|
||||
*/
|
||||
public AbstractRemoteServiceProxy<R> setServiceListener(ServiceListener serviceListener) {
|
||||
this.serviceListener = serviceListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether this service is logged in or not.
|
||||
*
|
||||
* @return {@code true} if, and only if, this service has both a client id and a remote service
|
||||
* associated to it.
|
||||
*/
|
||||
boolean isLoggedIn() {
|
||||
return getClientId() != null && getRemoteService() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that this service is available to be used.
|
||||
*
|
||||
* @throws ServiceUnavailableException If the service is not available.
|
||||
*/
|
||||
void checkServiceAvailability()
|
||||
throws ServiceUnavailableException {
|
||||
if (!isLoggedIn()) {
|
||||
throw new ServiceUnavailableException(SERVICE_UNAVAILABLE_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a suitable {@link RuntimeException} for the given {@link RemoteException}.
|
||||
*
|
||||
* @param ex The exception to find a runtime exception for.
|
||||
* @return The runtime exception.
|
||||
*/
|
||||
RuntimeException findSuitableExceptionFor(RemoteException ex) {
|
||||
if (ex.getCause() instanceof ObjectUnknownException) {
|
||||
return (ObjectUnknownException) ex.getCause();
|
||||
}
|
||||
if (ex.getCause() instanceof ObjectExistsException) {
|
||||
return (ObjectExistsException) ex.getCause();
|
||||
}
|
||||
if (ex.getCause() instanceof IllegalArgumentException) {
|
||||
return (IllegalArgumentException) ex.getCause();
|
||||
}
|
||||
|
||||
if (getServiceListener() != null) {
|
||||
getServiceListener().onServiceUnavailable();
|
||||
}
|
||||
|
||||
return new ServiceUnavailableException(SERVICE_UNAVAILABLE_MESSAGE, ex);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import org.opentcs.access.Kernel;
|
||||
|
||||
/**
|
||||
* A listener for events concerning kernel state changes.
|
||||
*/
|
||||
interface KernelStateEventListener {
|
||||
|
||||
/**
|
||||
* Called when the kernel state changes to {@link Kernel.State#SHUTDOWN}.
|
||||
*/
|
||||
void onKernelShutdown();
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
/**
|
||||
* Defines the names used for binding the remote services in the RMI registry.
|
||||
*/
|
||||
public interface RegistrationName {
|
||||
|
||||
/**
|
||||
* The name the {@link RemoteKernelServicePortal} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_KERNEL_CLIENT_PORTAL = RemoteKernelServicePortal.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemotePlantModelService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_PLANT_MODEL_SERVICE = RemotePlantModelService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemoteTransportOrderService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_TRANSPORT_ORDER_SERVICE = RemoteTransportOrderService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemoteVehicleService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_VEHICLE_SERVICE = RemoteVehicleService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemoteNotificationService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_NOTIFICATION_SERVICE = RemoteNotificationService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemoteRouterService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_ROUTER_SERVICE = RemoteRouterService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemoteDispatcherService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_DISPATCHER_SERVICE = RemoteDispatcherService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemoteQueryService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_QUERY_SERVICE = RemoteQueryService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemotePeripheralService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_PERIPHERAL_SERVICE = RemotePeripheralService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemotePeripheralJobService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_PERIPHERAL_JOB_SERVICE = RemotePeripheralJobService.class.getCanonicalName();
|
||||
/**
|
||||
* The name the {@link RemotePeripheralDispatcherService} registers itself with a RMI registry.
|
||||
*/
|
||||
String REMOTE_PERIPHERAL_DISPATCHER_SERVICE
|
||||
= RemotePeripheralDispatcherService.class.getCanonicalName();
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
import org.opentcs.components.kernel.services.DispatcherService;
|
||||
import org.opentcs.data.TCSObjectReference;
|
||||
import org.opentcs.data.model.Vehicle;
|
||||
import org.opentcs.data.order.ReroutingType;
|
||||
import org.opentcs.data.order.TransportOrder;
|
||||
|
||||
/**
|
||||
* Declares the methods provided by the {@link DispatcherService} via RMI.
|
||||
*
|
||||
* <p>
|
||||
* The majority of the methods declared here have signatures analogous to their counterparts in
|
||||
* {@link DispatcherService}, with an additional {@link ClientID} parameter which serves the purpose
|
||||
* of identifying the calling client and determining its permissions.
|
||||
* </p>
|
||||
* <p>
|
||||
* To avoid redundancy, the semantics of methods that only pass through their arguments are not
|
||||
* explicitly documented here again. See the corresponding API documentation in
|
||||
* {@link DispatcherService} for these, instead.
|
||||
* </p>
|
||||
*/
|
||||
public interface RemoteDispatcherService
|
||||
extends
|
||||
Remote {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
void dispatch(ClientID clientId)
|
||||
throws RemoteException;
|
||||
|
||||
void withdrawByVehicle(
|
||||
ClientID clientId,
|
||||
TCSObjectReference<Vehicle> ref,
|
||||
boolean immediateAbort
|
||||
)
|
||||
throws RemoteException;
|
||||
|
||||
void withdrawByTransportOrder(
|
||||
ClientID clientId,
|
||||
TCSObjectReference<TransportOrder> ref,
|
||||
boolean immediateAbort
|
||||
)
|
||||
throws RemoteException;
|
||||
|
||||
void reroute(ClientID clientId, TCSObjectReference<Vehicle> ref, ReroutingType reroutingType)
|
||||
throws RemoteException;
|
||||
|
||||
void rerouteAll(ClientID clientId, ReroutingType reroutingType)
|
||||
throws RemoteException;
|
||||
|
||||
void assignNow(ClientID clientId, TCSObjectReference<TransportOrder> ref)
|
||||
throws RemoteException;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.KernelRuntimeException;
|
||||
import org.opentcs.components.kernel.services.DispatcherService;
|
||||
import org.opentcs.data.ObjectUnknownException;
|
||||
import org.opentcs.data.TCSObjectReference;
|
||||
import org.opentcs.data.model.Vehicle;
|
||||
import org.opentcs.data.order.ReroutingType;
|
||||
import org.opentcs.data.order.TransportOrder;
|
||||
|
||||
/**
|
||||
* The default implementation of the dispatcher service.
|
||||
* Delegates method invocations to the corresponding remote service.
|
||||
*/
|
||||
class RemoteDispatcherServiceProxy
|
||||
extends
|
||||
AbstractRemoteServiceProxy<RemoteDispatcherService>
|
||||
implements
|
||||
DispatcherService {
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*/
|
||||
RemoteDispatcherServiceProxy() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatch()
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().dispatch(getClientId());
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void withdrawByVehicle(
|
||||
TCSObjectReference<Vehicle> vehicleRef,
|
||||
boolean immediateAbort
|
||||
)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().withdrawByVehicle(
|
||||
getClientId(),
|
||||
vehicleRef,
|
||||
immediateAbort
|
||||
);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void withdrawByTransportOrder(
|
||||
TCSObjectReference<TransportOrder> ref,
|
||||
boolean immediateAbort
|
||||
)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().withdrawByTransportOrder(
|
||||
getClientId(),
|
||||
ref,
|
||||
immediateAbort
|
||||
);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reroute(TCSObjectReference<Vehicle> ref, ReroutingType reroutingType)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().reroute(getClientId(), ref, reroutingType);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rerouteAll(ReroutingType reroutingType) {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().rerouteAll(getClientId(), reroutingType);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void assignNow(TCSObjectReference<TransportOrder> ref)
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
try {
|
||||
getRemoteService().assignNow(getClientId(), ref);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import org.opentcs.access.CredentialsException;
|
||||
import org.opentcs.access.Kernel;
|
||||
import org.opentcs.access.KernelServicePortal;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
|
||||
/**
|
||||
* Declares the methods provided by the {@link KernelServicePortal} via RMI.
|
||||
*/
|
||||
public interface RemoteKernelServicePortal
|
||||
extends
|
||||
Remote {
|
||||
|
||||
/**
|
||||
* Introduce the calling client to the server and authenticate for operations.
|
||||
*
|
||||
* @param userName The user's name.
|
||||
* @param password The user's password.
|
||||
* @param eventFilter The event filter to be applied to events on the server side.
|
||||
* @return An identification object that is required for subsequent method calls.
|
||||
* @throws CredentialsException If authentication with the given username and password failed.
|
||||
* @throws RemoteException If there was an RMI-related problem.
|
||||
*/
|
||||
ClientID login(String userName, String password, Predicate<Object> eventFilter)
|
||||
throws CredentialsException,
|
||||
RemoteException;
|
||||
|
||||
void logout(ClientID clientId)
|
||||
throws RemoteException;
|
||||
|
||||
Kernel.State getState(ClientID clientId)
|
||||
throws RemoteException;
|
||||
|
||||
List<Object> fetchEvents(ClientID clientId, long timeout)
|
||||
throws RemoteException;
|
||||
|
||||
void publishEvent(ClientID clientId, Object event)
|
||||
throws RemoteException;
|
||||
}
|
@ -0,0 +1,388 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_DISPATCHER_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_KERNEL_CLIENT_PORTAL;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_NOTIFICATION_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PERIPHERAL_DISPATCHER_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PERIPHERAL_JOB_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PERIPHERAL_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PLANT_MODEL_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_QUERY_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_ROUTER_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_TRANSPORT_ORDER_SERVICE;
|
||||
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_VEHICLE_SERVICE;
|
||||
|
||||
import jakarta.annotation.Nonnull;
|
||||
import java.rmi.NotBoundException;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.registry.LocateRegistry;
|
||||
import java.rmi.registry.Registry;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import org.opentcs.access.CredentialsException;
|
||||
import org.opentcs.access.Kernel;
|
||||
import org.opentcs.access.KernelRuntimeException;
|
||||
import org.opentcs.access.KernelServicePortal;
|
||||
import org.opentcs.access.rmi.factories.SocketFactoryProvider;
|
||||
import org.opentcs.components.kernel.services.DispatcherService;
|
||||
import org.opentcs.components.kernel.services.NotificationService;
|
||||
import org.opentcs.components.kernel.services.PeripheralDispatcherService;
|
||||
import org.opentcs.components.kernel.services.PeripheralJobService;
|
||||
import org.opentcs.components.kernel.services.PeripheralService;
|
||||
import org.opentcs.components.kernel.services.PlantModelService;
|
||||
import org.opentcs.components.kernel.services.QueryService;
|
||||
import org.opentcs.components.kernel.services.RouterService;
|
||||
import org.opentcs.components.kernel.services.ServiceUnavailableException;
|
||||
import org.opentcs.components.kernel.services.TransportOrderService;
|
||||
import org.opentcs.components.kernel.services.VehicleService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* The default implementation for the {@link KernelServicePortal}.
|
||||
*/
|
||||
public class RemoteKernelServicePortalProxy
|
||||
extends
|
||||
AbstractRemoteServiceProxy<RemoteKernelServicePortal>
|
||||
implements
|
||||
KernelServicePortal,
|
||||
ServiceListener {
|
||||
|
||||
/**
|
||||
* This class' logger.
|
||||
*/
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RemoteKernelServicePortalProxy.class);
|
||||
/**
|
||||
* The user name used with the remote portal.
|
||||
*/
|
||||
private final String userName;
|
||||
/**
|
||||
* The password used with the remote portal.
|
||||
*/
|
||||
private final String password;
|
||||
/**
|
||||
* Provides socket factories used for RMI.
|
||||
*/
|
||||
private final SocketFactoryProvider socketFactoryProvider;
|
||||
/**
|
||||
* The event filter to be applied to events on the server side (before polling).
|
||||
*/
|
||||
private final Predicate<Object> eventFilter;
|
||||
/**
|
||||
* The plant model service.
|
||||
*/
|
||||
private final RemotePlantModelServiceProxy plantModelService
|
||||
= new RemotePlantModelServiceProxy();
|
||||
/**
|
||||
* The transport order service.
|
||||
*/
|
||||
private final RemoteTransportOrderServiceProxy transportOrderService
|
||||
= new RemoteTransportOrderServiceProxy();
|
||||
/**
|
||||
* The vehicle service.
|
||||
*/
|
||||
private final RemoteVehicleServiceProxy vehicleService = new RemoteVehicleServiceProxy();
|
||||
/**
|
||||
* The notification service.
|
||||
*/
|
||||
private final RemoteNotificationServiceProxy notificationService
|
||||
= new RemoteNotificationServiceProxy();
|
||||
/**
|
||||
* The dispatcher service.
|
||||
*/
|
||||
private final RemoteDispatcherServiceProxy dispatcherService
|
||||
= new RemoteDispatcherServiceProxy();
|
||||
/**
|
||||
* The router service.
|
||||
*/
|
||||
private final RemoteRouterServiceProxy routerService = new RemoteRouterServiceProxy();
|
||||
/**
|
||||
* The query service.
|
||||
*/
|
||||
private final RemoteQueryServiceProxy queryService = new RemoteQueryServiceProxy();
|
||||
/**
|
||||
* The peripheral service.
|
||||
*/
|
||||
private final RemotePeripheralServiceProxy peripheralService = new RemotePeripheralServiceProxy();
|
||||
/**
|
||||
* The peripheral job service.
|
||||
*/
|
||||
private final RemotePeripheralJobServiceProxy peripheralJobService
|
||||
= new RemotePeripheralJobServiceProxy();
|
||||
/**
|
||||
* The peripheral dispatcher service.
|
||||
*/
|
||||
private final RemotePeripheralDispatcherServiceProxy peripheralDispatcherService
|
||||
= new RemotePeripheralDispatcherServiceProxy();
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param userName The user name used with the remote portal.
|
||||
* @param password The password used with the remote portal.
|
||||
* @param socketFactoryProvider Provides socket factories used for RMI.
|
||||
* @param eventFilter The event filter to be applied to events on the server side.
|
||||
*/
|
||||
public RemoteKernelServicePortalProxy(
|
||||
@Nonnull
|
||||
String userName,
|
||||
@Nonnull
|
||||
String password,
|
||||
@Nonnull
|
||||
SocketFactoryProvider socketFactoryProvider,
|
||||
@Nonnull
|
||||
Predicate<Object> eventFilter
|
||||
) {
|
||||
this.userName = requireNonNull(userName, "userName");
|
||||
this.password = requireNonNull(password, "password");
|
||||
this.socketFactoryProvider = requireNonNull(socketFactoryProvider, "socketFactoryProvider");
|
||||
this.eventFilter = requireNonNull(eventFilter, "eventFilter");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServiceListener getServiceListener() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceUnavailable() {
|
||||
resetServiceLogins();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void login(
|
||||
@Nonnull
|
||||
String hostName,
|
||||
int port
|
||||
)
|
||||
throws CredentialsException,
|
||||
ServiceUnavailableException {
|
||||
requireNonNull(hostName, "hostName");
|
||||
|
||||
if (isLoggedIn()) {
|
||||
LOG.warn("Already logged in, doing nothing.");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Look up the remote portal with the RMI registry.
|
||||
Registry registry
|
||||
= LocateRegistry.getRegistry(
|
||||
hostName,
|
||||
port,
|
||||
socketFactoryProvider.getClientSocketFactory()
|
||||
);
|
||||
|
||||
setRemoteService((RemoteKernelServicePortal) registry.lookup(REMOTE_KERNEL_CLIENT_PORTAL));
|
||||
// Login and save the client ID.
|
||||
setClientId(getRemoteService().login(userName, password, eventFilter));
|
||||
// Get notified when a service call on us fails.
|
||||
setServiceListener(this);
|
||||
|
||||
// Look up the remote services with the RMI registry and update the other service logins.
|
||||
updateServiceLogins(registry);
|
||||
}
|
||||
catch (RemoteException | NotBoundException exc) {
|
||||
resetServiceLogins();
|
||||
throw new ServiceUnavailableException(
|
||||
"Exception logging in with remote kernel client portal",
|
||||
exc
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logout() {
|
||||
if (!isLoggedIn()) {
|
||||
LOG.warn("Not logged in, doing nothing.");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
getRemoteService().logout(getClientId());
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw new ServiceUnavailableException("Remote kernel client portal unavailable", ex);
|
||||
}
|
||||
|
||||
resetServiceLogins();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Kernel.State getState()
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().getState(getClientId());
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Object> fetchEvents(long timeout)
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().fetchEvents(getClientId(), timeout);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event)
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().publishEvent(getClientId(), event);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public PlantModelService getPlantModelService() {
|
||||
return plantModelService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public TransportOrderService getTransportOrderService() {
|
||||
return transportOrderService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public VehicleService getVehicleService() {
|
||||
return vehicleService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public NotificationService getNotificationService() {
|
||||
return notificationService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public DispatcherService getDispatcherService() {
|
||||
return dispatcherService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public RouterService getRouterService() {
|
||||
return routerService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public QueryService getQueryService() {
|
||||
return queryService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public PeripheralService getPeripheralService() {
|
||||
return peripheralService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public PeripheralJobService getPeripheralJobService() {
|
||||
return peripheralJobService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public PeripheralDispatcherService getPeripheralDispatcherService() {
|
||||
return peripheralDispatcherService;
|
||||
}
|
||||
|
||||
private void updateServiceLogins(Registry registry)
|
||||
throws RemoteException,
|
||||
NotBoundException {
|
||||
plantModelService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService((RemotePlantModelService) registry.lookup(REMOTE_PLANT_MODEL_SERVICE))
|
||||
.setServiceListener(this);
|
||||
|
||||
transportOrderService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService(
|
||||
(RemoteTransportOrderService) registry.lookup(REMOTE_TRANSPORT_ORDER_SERVICE)
|
||||
)
|
||||
.setServiceListener(this);
|
||||
|
||||
vehicleService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService((RemoteVehicleService) registry.lookup(REMOTE_VEHICLE_SERVICE))
|
||||
.setServiceListener(this);
|
||||
|
||||
notificationService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService((RemoteNotificationService) registry.lookup(REMOTE_NOTIFICATION_SERVICE))
|
||||
.setServiceListener(this);
|
||||
|
||||
dispatcherService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService((RemoteDispatcherService) registry.lookup(REMOTE_DISPATCHER_SERVICE))
|
||||
.setServiceListener(this);
|
||||
|
||||
routerService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService((RemoteRouterService) registry.lookup(REMOTE_ROUTER_SERVICE))
|
||||
.setServiceListener(this);
|
||||
|
||||
queryService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService((RemoteQueryService) registry.lookup(REMOTE_QUERY_SERVICE))
|
||||
.setServiceListener(this);
|
||||
|
||||
peripheralService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService((RemotePeripheralService) registry.lookup(REMOTE_PERIPHERAL_SERVICE))
|
||||
.setServiceListener(this);
|
||||
|
||||
peripheralJobService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService(
|
||||
(RemotePeripheralJobService) registry.lookup(REMOTE_PERIPHERAL_JOB_SERVICE)
|
||||
)
|
||||
.setServiceListener(this);
|
||||
|
||||
peripheralDispatcherService
|
||||
.setClientId(getClientId())
|
||||
.setRemoteService(
|
||||
(RemotePeripheralDispatcherService) registry.lookup(
|
||||
REMOTE_PERIPHERAL_DISPATCHER_SERVICE
|
||||
)
|
||||
)
|
||||
.setServiceListener(this);
|
||||
}
|
||||
|
||||
private void resetServiceLogins() {
|
||||
this.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
plantModelService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
transportOrderService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
vehicleService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
notificationService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
dispatcherService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
routerService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
queryService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
peripheralService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
peripheralJobService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
peripheralDispatcherService.setClientId(null).setRemoteService(null).setServiceListener(null);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
import org.opentcs.components.kernel.services.NotificationService;
|
||||
import org.opentcs.data.notification.UserNotification;
|
||||
|
||||
/**
|
||||
* Declares the methods provided by the {@link NotificationService} via RMI.
|
||||
*
|
||||
* <p>
|
||||
* The majority of the methods declared here have signatures analogous to their counterparts in
|
||||
* {@link NotificationService}, with an additional {@link ClientID} parameter which serves the
|
||||
* purpose of identifying the calling client and determining its permissions.
|
||||
* </p>
|
||||
* <p>
|
||||
* To avoid redundancy, the semantics of methods that only pass through their arguments are not
|
||||
* explicitly documented here again. See the corresponding API documentation in
|
||||
* {@link NotificationService} for these, instead.
|
||||
* </p>
|
||||
*/
|
||||
public interface RemoteNotificationService
|
||||
extends
|
||||
Remote {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
List<UserNotification> fetchUserNotifications(
|
||||
ClientID clientId,
|
||||
Predicate<UserNotification> predicate
|
||||
)
|
||||
throws RemoteException;
|
||||
|
||||
void publishUserNotification(ClientID clientId, UserNotification notification)
|
||||
throws RemoteException;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import org.opentcs.access.KernelRuntimeException;
|
||||
import org.opentcs.components.kernel.services.NotificationService;
|
||||
import org.opentcs.data.notification.UserNotification;
|
||||
|
||||
/**
|
||||
* The default implementation of the notification service.
|
||||
* Delegates method invocations to the corresponding remote service.
|
||||
*/
|
||||
class RemoteNotificationServiceProxy
|
||||
extends
|
||||
AbstractRemoteServiceProxy<RemoteNotificationService>
|
||||
implements
|
||||
NotificationService {
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*/
|
||||
RemoteNotificationServiceProxy() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserNotification> fetchUserNotifications(Predicate<UserNotification> predicate)
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().fetchUserNotifications(getClientId(), predicate);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishUserNotification(UserNotification notification)
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().publishUserNotification(getClientId(), notification);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
import org.opentcs.components.kernel.services.PeripheralDispatcherService;
|
||||
import org.opentcs.data.TCSObjectReference;
|
||||
import org.opentcs.data.model.Location;
|
||||
import org.opentcs.data.model.TCSResourceReference;
|
||||
import org.opentcs.data.peripherals.PeripheralJob;
|
||||
|
||||
/**
|
||||
* Declares the methods provided by the {@link PeripheralDispatcherService} via RMI.
|
||||
*
|
||||
* <p>
|
||||
* The majority of the methods declared here have signatures analogous to their counterparts in
|
||||
* {@link PeripheralDispatcherService}, with an additional {@link ClientID} parameter which serves
|
||||
* the purpose of identifying the calling client and determining its permissions.
|
||||
* </p>
|
||||
* <p>
|
||||
* To avoid redundancy, the semantics of methods that only pass through their arguments are not
|
||||
* explicitly documented here again. See the corresponding API documentation in
|
||||
* {@link PeripheralDispatcherService} for these, instead.
|
||||
* </p>
|
||||
*/
|
||||
public interface RemotePeripheralDispatcherService
|
||||
extends
|
||||
Remote {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
void dispatch(ClientID clientId)
|
||||
throws RemoteException;
|
||||
|
||||
void withdrawByLocation(ClientID clientId, TCSResourceReference<Location> ref)
|
||||
throws RemoteException;
|
||||
|
||||
void withdrawByPeripheralJob(ClientID clientId, TCSObjectReference<PeripheralJob> ref)
|
||||
throws RemoteException;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.KernelRuntimeException;
|
||||
import org.opentcs.components.kernel.services.PeripheralDispatcherService;
|
||||
import org.opentcs.data.ObjectUnknownException;
|
||||
import org.opentcs.data.TCSObjectReference;
|
||||
import org.opentcs.data.model.Location;
|
||||
import org.opentcs.data.model.TCSResourceReference;
|
||||
import org.opentcs.data.peripherals.PeripheralJob;
|
||||
|
||||
/**
|
||||
* The default implementation of the peripheral dispatcher service.
|
||||
* Delegates method invocations to the corresponding remote service.
|
||||
*/
|
||||
class RemotePeripheralDispatcherServiceProxy
|
||||
extends
|
||||
AbstractRemoteServiceProxy<RemotePeripheralDispatcherService>
|
||||
implements
|
||||
PeripheralDispatcherService {
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*/
|
||||
RemotePeripheralDispatcherServiceProxy() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatch()
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().dispatch(getClientId());
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void withdrawByLocation(TCSResourceReference<Location> locationRef)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().withdrawByLocation(getClientId(), locationRef);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void withdrawByPeripheralJob(TCSObjectReference<PeripheralJob> jobRef)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().withdrawByPeripheralJob(getClientId(), jobRef);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
import org.opentcs.access.to.peripherals.PeripheralJobCreationTO;
|
||||
import org.opentcs.components.kernel.services.PeripheralJobService;
|
||||
import org.opentcs.data.peripherals.PeripheralJob;
|
||||
|
||||
/**
|
||||
* Declares the methods provided by the {@link PeripheralJobService} via RMI.
|
||||
*
|
||||
* <p>
|
||||
* The majority of the methods declared here have signatures analogous to their counterparts in
|
||||
* {@link PeripheralJobService}, with an additional {@link ClientID} parameter which serves the
|
||||
* purpose of identifying the calling client and determining its permissions.
|
||||
* </p>
|
||||
* <p>
|
||||
* To avoid redundancy, the semantics of methods that only pass through their arguments are not
|
||||
* explicitly documented here again. See the corresponding API documentation in
|
||||
* {@link PeripheralJobService} for these, instead.
|
||||
* </p>
|
||||
*/
|
||||
public interface RemotePeripheralJobService
|
||||
extends
|
||||
RemoteTCSObjectService,
|
||||
Remote {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
PeripheralJob createPeripheralJob(ClientID clientId, PeripheralJobCreationTO to)
|
||||
throws RemoteException;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.KernelRuntimeException;
|
||||
import org.opentcs.access.to.peripherals.PeripheralJobCreationTO;
|
||||
import org.opentcs.components.kernel.services.PeripheralJobService;
|
||||
import org.opentcs.data.ObjectExistsException;
|
||||
import org.opentcs.data.ObjectUnknownException;
|
||||
import org.opentcs.data.peripherals.PeripheralJob;
|
||||
|
||||
/**
|
||||
* The default implementation of the peripheral job service.
|
||||
* Delegates method invocations to the corresponding remote service.
|
||||
*/
|
||||
class RemotePeripheralJobServiceProxy
|
||||
extends
|
||||
RemoteTCSObjectServiceProxy<RemotePeripheralJobService>
|
||||
implements
|
||||
PeripheralJobService {
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*/
|
||||
RemotePeripheralJobServiceProxy() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PeripheralJob createPeripheralJob(PeripheralJobCreationTO to)
|
||||
throws ObjectUnknownException,
|
||||
ObjectExistsException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().createPeripheralJob(getClientId(), to);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
import org.opentcs.components.kernel.services.PeripheralService;
|
||||
import org.opentcs.data.model.Location;
|
||||
import org.opentcs.data.model.TCSResourceReference;
|
||||
import org.opentcs.drivers.peripherals.PeripheralAdapterCommand;
|
||||
import org.opentcs.drivers.peripherals.PeripheralCommAdapterDescription;
|
||||
import org.opentcs.drivers.peripherals.PeripheralProcessModel;
|
||||
import org.opentcs.drivers.peripherals.management.PeripheralAttachmentInformation;
|
||||
|
||||
/**
|
||||
* Declares the methods provided by the {@link PeripheralService} via RMI.
|
||||
*
|
||||
* <p>
|
||||
* The majority of the methods declared here have signatures analogous to their counterparts in
|
||||
* {@link PeripheralService}, with an additional {@link ClientID} parameter which serves the purpose
|
||||
* of identifying the calling client and determining its permissions.
|
||||
* </p>
|
||||
* <p>
|
||||
* To avoid redundancy, the semantics of methods that only pass through their arguments are not
|
||||
* explicitly documented here again. See the corresponding API documentation in
|
||||
* {@link PeripheralService} for these, instead.
|
||||
* </p>
|
||||
*/
|
||||
public interface RemotePeripheralService
|
||||
extends
|
||||
RemoteTCSObjectService,
|
||||
Remote {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
void attachCommAdapter(
|
||||
ClientID clientId,
|
||||
TCSResourceReference<Location> ref,
|
||||
PeripheralCommAdapterDescription description
|
||||
)
|
||||
throws RemoteException;
|
||||
|
||||
void disableCommAdapter(ClientID clientId, TCSResourceReference<Location> ref)
|
||||
throws RemoteException;
|
||||
|
||||
void enableCommAdapter(ClientID clientId, TCSResourceReference<Location> ref)
|
||||
throws RemoteException;
|
||||
|
||||
PeripheralAttachmentInformation fetchAttachmentInformation(
|
||||
ClientID clientId,
|
||||
TCSResourceReference<Location> ref
|
||||
)
|
||||
throws RemoteException;
|
||||
|
||||
PeripheralProcessModel fetchProcessModel(ClientID clientId, TCSResourceReference<Location> ref)
|
||||
throws RemoteException;
|
||||
|
||||
void sendCommAdapterCommand(
|
||||
ClientID clientId,
|
||||
TCSResourceReference<Location> ref,
|
||||
PeripheralAdapterCommand command
|
||||
)
|
||||
throws RemoteException;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import org.opentcs.access.KernelRuntimeException;
|
||||
import org.opentcs.components.kernel.services.PeripheralService;
|
||||
import org.opentcs.data.ObjectUnknownException;
|
||||
import org.opentcs.data.model.Location;
|
||||
import org.opentcs.data.model.TCSResourceReference;
|
||||
import org.opentcs.drivers.peripherals.PeripheralAdapterCommand;
|
||||
import org.opentcs.drivers.peripherals.PeripheralCommAdapterDescription;
|
||||
import org.opentcs.drivers.peripherals.PeripheralProcessModel;
|
||||
import org.opentcs.drivers.peripherals.management.PeripheralAttachmentInformation;
|
||||
|
||||
/**
|
||||
* The default implementation of the vehicle service.
|
||||
* Delegates method invocations to the corresponding remote service.
|
||||
*/
|
||||
class RemotePeripheralServiceProxy
|
||||
extends
|
||||
RemoteTCSObjectServiceProxy<RemotePeripheralService>
|
||||
implements
|
||||
PeripheralService {
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*/
|
||||
RemotePeripheralServiceProxy() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachCommAdapter(
|
||||
TCSResourceReference<Location> ref,
|
||||
PeripheralCommAdapterDescription description
|
||||
)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().attachCommAdapter(getClientId(), ref, description);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableCommAdapter(TCSResourceReference<Location> ref)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().disableCommAdapter(getClientId(), ref);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableCommAdapter(TCSResourceReference<Location> ref)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().enableCommAdapter(getClientId(), ref);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PeripheralAttachmentInformation fetchAttachmentInformation(
|
||||
TCSResourceReference<Location> ref
|
||||
)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().fetchAttachmentInformation(getClientId(), ref);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PeripheralProcessModel fetchProcessModel(TCSResourceReference<Location> ref)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().fetchProcessModel(getClientId(), ref);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendCommAdapterCommand(
|
||||
TCSResourceReference<Location> ref,
|
||||
PeripheralAdapterCommand command
|
||||
)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().sendCommAdapterCommand(getClientId(), ref, command);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Map;
|
||||
import org.opentcs.access.rmi.ClientID;
|
||||
import org.opentcs.access.to.model.PlantModelCreationTO;
|
||||
import org.opentcs.components.kernel.services.PlantModelService;
|
||||
import org.opentcs.data.TCSObjectReference;
|
||||
import org.opentcs.data.model.Location;
|
||||
import org.opentcs.data.model.Path;
|
||||
import org.opentcs.data.model.PlantModel;
|
||||
|
||||
/**
|
||||
* Declares the methods provided by the {@link PlantModelService} via RMI.
|
||||
*
|
||||
* <p>
|
||||
* The majority of the methods declared here have signatures analogous to their counterparts in
|
||||
* {@link PlantModelService}, with an additional {@link ClientID} parameter which serves the purpose
|
||||
* of identifying the calling client and determining its permissions.
|
||||
* </p>
|
||||
* <p>
|
||||
* To avoid redundancy, the semantics of methods that only pass through their arguments are not
|
||||
* explicitly documented here again. See the corresponding API documentation in
|
||||
* {@link PlantModelService} for these, instead.
|
||||
* </p>
|
||||
*/
|
||||
public interface RemotePlantModelService
|
||||
extends
|
||||
RemoteTCSObjectService,
|
||||
Remote {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
PlantModel getPlantModel(ClientID clientId)
|
||||
throws RemoteException;
|
||||
|
||||
void createPlantModel(ClientID clientId, PlantModelCreationTO to)
|
||||
throws RemoteException;
|
||||
|
||||
String getModelName(ClientID clientId)
|
||||
throws RemoteException;
|
||||
|
||||
Map<String, String> getModelProperties(ClientID clientId)
|
||||
throws RemoteException;
|
||||
|
||||
void updateLocationLock(ClientID clientId, TCSObjectReference<Location> ref, boolean locked)
|
||||
throws RemoteException;
|
||||
|
||||
void updatePathLock(ClientID clientId, TCSObjectReference<Path> ref, boolean locked)
|
||||
throws RemoteException;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package org.opentcs.access.rmi.services;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Map;
|
||||
import org.opentcs.access.KernelRuntimeException;
|
||||
import org.opentcs.access.to.model.PlantModelCreationTO;
|
||||
import org.opentcs.components.kernel.services.PlantModelService;
|
||||
import org.opentcs.data.ObjectExistsException;
|
||||
import org.opentcs.data.ObjectUnknownException;
|
||||
import org.opentcs.data.TCSObjectReference;
|
||||
import org.opentcs.data.model.Location;
|
||||
import org.opentcs.data.model.Path;
|
||||
import org.opentcs.data.model.PlantModel;
|
||||
|
||||
/**
|
||||
* The default implementation of the plant model service.
|
||||
* Delegates method invocations to the corresponding remote service.
|
||||
*/
|
||||
class RemotePlantModelServiceProxy
|
||||
extends
|
||||
RemoteTCSObjectServiceProxy<RemotePlantModelService>
|
||||
implements
|
||||
PlantModelService {
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*/
|
||||
RemotePlantModelServiceProxy() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlantModel getPlantModel()
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().getPlantModel(getClientId());
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createPlantModel(PlantModelCreationTO to)
|
||||
throws ObjectUnknownException,
|
||||
ObjectExistsException,
|
||||
KernelRuntimeException,
|
||||
IllegalStateException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().createPlantModel(getClientId(), to);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelName()
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().getModelName(getClientId());
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getModelProperties()
|
||||
throws KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
return getRemoteService().getModelProperties(getClientId());
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLocationLock(TCSObjectReference<Location> ref, boolean locked)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().updateLocationLock(getClientId(), ref, locked);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePathLock(TCSObjectReference<Path> ref, boolean locked)
|
||||
throws ObjectUnknownException,
|
||||
KernelRuntimeException {
|
||||
checkServiceAvailability();
|
||||
|
||||
try {
|
||||
getRemoteService().updatePathLock(getClientId(), ref, locked);
|
||||
}
|
||||
catch (RemoteException ex) {
|
||||
throw findSuitableExceptionFor(ex);
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user