From cce7f268695eabdc86db60449ef3029cd4343c46 Mon Sep 17 00:00:00 2001 From: Joe Wilkinson <94834832+joewilko17@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:14:03 +0100 Subject: [PATCH] Delete Group10_TicketingSystem directory --- .../.github/ISSUE_TEMPLATE/BUG_REPORT.md | 28 -- .../.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 25 -- .../.github/ISSUE_TEMPLATE/TASK.md | 14 - .../.github/ISSUE_TEMPLATE/config.yml | 5 - .../.github/PULL_REQUEST_TEMPLATE.md | 10 - .../.github/workflows/CI.yaml | 19 -- Group10_TicketingSystem/.gitignore | 61 ---- Group10_TicketingSystem/.mvn/jvm.config | 1 - Group10_TicketingSystem/.tool-versions | 2 - Group10_TicketingSystem/LICENSE | 201 ------------- Group10_TicketingSystem/README.md | 106 ------- .../element-templates/template-connector.json | 143 --------- Group10_TicketingSystem/pom.xml | 282 ------------------ Group10_TicketingSystem/renovate.json | 12 - .../example/MyConnectorFunctionTest.java | 54 ---- .../java/io/camunda/example/createTicket.java | 53 ---- .../camunda/example/dto/Authentication.java | 11 - .../example/dto/MyConnectorRequest.java | 11 - .../example/dto/MyConnectorResult.java | 3 - .../example/ticketing_system/Ticket.java | 105 ------- .../ticketing_system/TicketManager.java | 29 -- .../ticketing_system/TicketStorage.java | 8 - ...tor.api.outbound.OutboundConnectorFunction | 1 - .../example/LocalConnectorRuntime.java | 12 - .../io/camunda/example/MyFunctionTest.java | 57 ---- .../io/camunda/example/MyRequestTest.java | 97 ------ .../src/test/resources/application.properties | 7 - .../src/test/resources/icon.svg | 1 - 28 files changed, 1358 deletions(-) delete mode 100644 Group10_TicketingSystem/.github/ISSUE_TEMPLATE/BUG_REPORT.md delete mode 100644 Group10_TicketingSystem/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md delete mode 100644 Group10_TicketingSystem/.github/ISSUE_TEMPLATE/TASK.md delete mode 100644 Group10_TicketingSystem/.github/ISSUE_TEMPLATE/config.yml delete mode 100644 Group10_TicketingSystem/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 Group10_TicketingSystem/.github/workflows/CI.yaml delete mode 100644 Group10_TicketingSystem/.gitignore delete mode 100644 Group10_TicketingSystem/.mvn/jvm.config delete mode 100644 Group10_TicketingSystem/.tool-versions delete mode 100644 Group10_TicketingSystem/LICENSE delete mode 100644 Group10_TicketingSystem/README.md delete mode 100644 Group10_TicketingSystem/element-templates/template-connector.json delete mode 100644 Group10_TicketingSystem/pom.xml delete mode 100644 Group10_TicketingSystem/renovate.json delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/MyConnectorFunctionTest.java delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/createTicket.java delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/dto/Authentication.java delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorRequest.java delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorResult.java delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/Ticket.java delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketManager.java delete mode 100644 Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketStorage.java delete mode 100644 Group10_TicketingSystem/src/main/resources/META-INF/services/io.camunda.connector.api.outbound.OutboundConnectorFunction delete mode 100644 Group10_TicketingSystem/src/test/java/io/camunda/example/LocalConnectorRuntime.java delete mode 100644 Group10_TicketingSystem/src/test/java/io/camunda/example/MyFunctionTest.java delete mode 100644 Group10_TicketingSystem/src/test/java/io/camunda/example/MyRequestTest.java delete mode 100644 Group10_TicketingSystem/src/test/resources/application.properties delete mode 100644 Group10_TicketingSystem/src/test/resources/icon.svg diff --git a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/BUG_REPORT.md deleted file mode 100644 index f6c730c..0000000 --- a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Report a problem and help us fix it. -labels: "bug" ---- - - -__Describe the Bug__ - -<!-- A clear and concise description of what the bug is. --> - - -__Steps to Reproduce__ - -1. do this -2. do that - - -__Expected Behavior__ - -<!-- A clear and concise description of what you expected to happen. --> - - -__Environment__ - -- OS: [e.g. Windows 7] -- Library version: [e.g. 2.0.0] -- Camunda Cloud Environment: [e.g. staging / prod, cluster] diff --git a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md deleted file mode 100644 index 480f505..0000000 --- a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Feature request -about: Suggest an idea or general improvement. -labels: "enhancement" ---- - - -__Is your feature request related to a problem? Please describe.__ - -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - - -__Describe the solution you'd like__ - -A clear and concise description of what you want to happen. - - -__Describe alternatives you've considered__ - -A clear and concise description of any alternative solutions or features you've considered. - - -__Additional context__ - -Add any other context or screenshots about the feature request here. diff --git a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/TASK.md b/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/TASK.md deleted file mode 100644 index 759e0f9..0000000 --- a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/TASK.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Task -about: Describe a generic activity we should carry out. ---- - - -__What should we do?__ - -<!-- Clearly describe the activity we should carry out. --> - - -__Why should we do it?__ - -<!-- Argue why doing it is a healthy investment of our time. --> \ No newline at end of file diff --git a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/config.yml b/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index fc195b2..0000000 --- a/Group10_TicketingSystem/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask a question - url: https://camunda-platform.slack.com/archives/C0497FR8XML - about: Head over to our slack channel to ask questions and get answers. \ No newline at end of file diff --git a/Group10_TicketingSystem/.github/PULL_REQUEST_TEMPLATE.md b/Group10_TicketingSystem/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 2f25199..0000000 --- a/Group10_TicketingSystem/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,10 +0,0 @@ -## Description - -<!-- Please explain the changes you made here. --> - -## Related issues - -<!-- Which issues are closed by this PR or are related --> - -closes # - diff --git a/Group10_TicketingSystem/.github/workflows/CI.yaml b/Group10_TicketingSystem/.github/workflows/CI.yaml deleted file mode 100644 index d00c07e..0000000 --- a/Group10_TicketingSystem/.github/workflows/CI.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: CI - -on: - push: - branches: - - '**' - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '21' - cache: 'maven' - - name: Build Artifact - run: mvn --batch-mode clean verify diff --git a/Group10_TicketingSystem/.gitignore b/Group10_TicketingSystem/.gitignore deleted file mode 100644 index 84e2d69..0000000 --- a/Group10_TicketingSystem/.gitignore +++ /dev/null @@ -1,61 +0,0 @@ -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ - -# environment -.env -request*.json diff --git a/Group10_TicketingSystem/.mvn/jvm.config b/Group10_TicketingSystem/.mvn/jvm.config deleted file mode 100644 index 79ecf92..0000000 --- a/Group10_TicketingSystem/.mvn/jvm.config +++ /dev/null @@ -1 +0,0 @@ ---add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED diff --git a/Group10_TicketingSystem/.tool-versions b/Group10_TicketingSystem/.tool-versions deleted file mode 100644 index e417568..0000000 --- a/Group10_TicketingSystem/.tool-versions +++ /dev/null @@ -1,2 +0,0 @@ -java temurin-21.0.1+12 -maven 3.8.4 diff --git a/Group10_TicketingSystem/LICENSE b/Group10_TicketingSystem/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Group10_TicketingSystem/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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. diff --git a/Group10_TicketingSystem/README.md b/Group10_TicketingSystem/README.md deleted file mode 100644 index 400a064..0000000 --- a/Group10_TicketingSystem/README.md +++ /dev/null @@ -1,106 +0,0 @@ -> A Connector template for new C8 outbound connector -> -> To use this template update the following resources to match the name of your connector: -> -> * [README](./README.md) (title, description) -> * [Element Template](./element-templates/template-connector.json) -> * [POM](./pom.xml) (artifact name, id, description) -> * [Connector Function](src/main/java/io/camunda/example/MyConnectorFunction.java) (rename, implement, update `OutboundConnector` annotation) -> * [Service Provider Interface (SPI)](./src/main/resources/META-INF/services/io.camunda.connector.api.outbound.OutboundConnectorFunction) (rename) -> -> ...and delete this hint. -> -> Read more about [creating Connectors](https://docs.camunda.io/docs/components/connectors/custom-built-connectors/connector-sdk/#creating-a-custom-connector) -> -> Check out the [Connectors SDK](https://github.com/camunda/connector-sdk) - - -# Connector Template - -Camunda Outbound Connector Template - -Emulates a simple outbound connector function that takes a message and echoes it back. - -The function will throw an exception if your message starts with `fail`. This can be used to test error handling. - -## Build - -You can package the Connector by running the following command: - -```bash -mvn clean package -``` - -This will create the following artifacts: - -- A thin JAR without dependencies. -- An fat JAR containing all dependencies, potentially shaded to avoid classpath conflicts. This will not include the SDK artifacts since those are in scope `provided` and will be brought along by the respective Connector Runtime executing the Connector. - -### Shading dependencies - -You can use the `maven-shade-plugin` defined in the [Maven configuration](./pom.xml) to relocate common dependencies -that are used in other Connectors and the [Connector Runtime](https://github.com/camunda-community-hub/spring-zeebe/tree/master/connector-runtime#building-connector-runtime-bundles). -This helps to avoid classpath conflicts when the Connector is executed. - -Use the `relocations` configuration in the Maven Shade plugin to define the dependencies that should be shaded. -The [Maven Shade documentation](https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html) -provides more details on relocations. - -## API - -### Input - -| Name | Description | Example | Notes | -|----------|------------------|-------------------|----------------------------------------------------------------------------| -| username | Mock username | `alice` | Has no effect on the function call outcome. | -| token | Mock token value | `my-secret-token` | Has no effect on the function call outcome. | -| message | Mock message | `Hello World` | Echoed back in the output. If starts with 'fail', an error will be thrown. | - -### Output - -```json -{ - "result": { - "myProperty": "Message received: ..." - } -} -``` - -### Error codes - -| Code | Description | -|------|--------------------------------------------| -| FAIL | Message starts with 'fail' (ignoring case) | - -## Test locally - -Run unit tests - -```bash -mvn clean verify -``` - -### Test with local runtime - -Use the [Camunda Connector Runtime](https://github.com/camunda-community-hub/spring-zeebe/tree/master/connector-runtime#building-connector-runtime-bundles) to run your function as a local Java application. - -In your IDE you can also simply navigate to the `LocalContainerRuntime` class in test scope and run it via your IDE. -If necessary, you can adjust `application.properties` in test scope. - -## Element Template - -The element template for this sample connector is generated automatically based on the connector -input class using the [Element Template Generator](https://github.com/camunda/connectors/tree/main/element-template-generator/core). -The generation is embedded in the Maven build and can be triggered by running `mvn clean package`. - -It is not mandatory to generate the element template for your connector and you can also create it manually. -However, the generator provides a convenient way to create the template and keep it in sync with the connector input class -and empowers you to prototype and iterate quickly. - -The generated element template can be found in [element-templates/template-connector.json](./element-templates/template-connector.json). - - -zeebe.client.cloud.region=jfk-1 -zeebe.client.cloud.clusterId=c31853d1-8836-462a-aa3a-567d91462308 -zeebe.client.cloud.clientId=itMBO_zVxqKVOy5qqfKQyJpWgjuwfYaP -zeebe.client.cloud.clientSecret=CbF7fw.nEY3mTIYt9jDM9fuKgwLHho1KnoYpq60Pi710NQJu1B1uA7dquq8b.-T1 \ No newline at end of file diff --git a/Group10_TicketingSystem/element-templates/template-connector.json b/Group10_TicketingSystem/element-templates/template-connector.json deleted file mode 100644 index f5ea08e..0000000 --- a/Group10_TicketingSystem/element-templates/template-connector.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "$schema" : "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name" : "Template connector", - "id" : "io.camunda.connector.Template.v1", - "description" : "Describe this connector", - "documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/available-connectors-overview/", - "version" : 1, - "category" : { - "id" : "connectors", - "name" : "Connectors" - }, - "appliesTo" : [ "bpmn:Task" ], - "elementType" : { - "value" : "bpmn:ServiceTask" - }, - "groups" : [ { - "id" : "authentication", - "label" : "Authentication" - }, { - "id" : "compose", - "label" : "Compose" - }, { - "id" : "output", - "label" : "Output mapping" - }, { - "id" : "error", - "label" : "Error handling" - }, { - "id" : "retries", - "label" : "Retries" - } ], - "properties" : [ { - "value" : "io.camunda:template:1", - "binding" : { - "property" : "type", - "type" : "zeebe:taskDefinition" - }, - "type" : "Hidden" - }, { - "id" : "authentication.user", - "label" : "Username", - "description" : "The username for authentication", - "optional" : false, - "constraints" : { - "notEmpty" : true - }, - "feel" : "optional", - "group" : "authentication", - "binding" : { - "name" : "authentication.user", - "type" : "zeebe:input" - }, - "type" : "String" - }, { - "id" : "authentication.token", - "label" : "Token", - "description" : "The token for authentication", - "optional" : false, - "constraints" : { - "notEmpty" : true - }, - "feel" : "optional", - "group" : "authentication", - "binding" : { - "name" : "authentication.token", - "type" : "zeebe:input" - }, - "type" : "String" - }, { - "id" : "message", - "label" : "Message", - "optional" : false, - "constraints" : { - "notEmpty" : true - }, - "feel" : "optional", - "group" : "compose", - "binding" : { - "name" : "message", - "type" : "zeebe:input" - }, - "type" : "Text" - }, { - "id" : "resultVariable", - "label" : "Result variable", - "description" : "Name of variable to store the response in", - "group" : "output", - "binding" : { - "key" : "resultVariable", - "type" : "zeebe:taskHeader" - }, - "type" : "String" - }, { - "id" : "resultExpression", - "label" : "Result expression", - "description" : "Expression to map the response into process variables", - "feel" : "required", - "group" : "output", - "binding" : { - "key" : "resultExpression", - "type" : "zeebe:taskHeader" - }, - "type" : "Text" - }, { - "id" : "errorExpression", - "label" : "Error expression", - "description" : "Expression to handle errors. Details in the <a href=\"https://docs.camunda.io/docs/components/connectors/use-connectors/\" target=\"_blank\">documentation</a>.", - "feel" : "required", - "group" : "error", - "binding" : { - "key" : "errorExpression", - "type" : "zeebe:taskHeader" - }, - "type" : "Text" - }, { - "id" : "retryCount", - "label" : "Retries", - "description" : "Number of retries", - "value" : "3", - "feel" : "optional", - "group" : "retries", - "binding" : { - "property" : "retries", - "type" : "zeebe:taskDefinition" - }, - "type" : "String" - }, { - "id" : "retryBackoff", - "label" : "Retry backoff", - "description" : "ISO-8601 duration to wait between retries", - "value" : "PT0S", - "feel" : "optional", - "group" : "retries", - "binding" : { - "key" : "retryBackoff", - "type" : "zeebe:taskHeader" - }, - "type" : "String" - } ], - "icon" : { - "contents" : "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTgiIHdpZHRoPSIxOCIgdmlld0JveD0iMCAwIDEwIDEwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+PHRpdGxlPlNsYWNrPC90aXRsZT48ZyBmaWxsPSJub25lIj48cGF0aCBkPSJNMCwwIEwwLDEwIEwxMCwxMCBMMTAsMCB6IiBmaWxsPSIjZWNiMTJmIi8+PC9nPjwvc3ZnPg==" - } -} \ No newline at end of file diff --git a/Group10_TicketingSystem/pom.xml b/Group10_TicketingSystem/pom.xml deleted file mode 100644 index 177335d..0000000 --- a/Group10_TicketingSystem/pom.xml +++ /dev/null @@ -1,282 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <name>connector-template</name> - <description>Camunda Connector Template</description> - <groupId>io.camunda.connector</groupId> - <artifactId>connector-template</artifactId> - <packaging>jar</packaging> - <version>0.1.0-SNAPSHOT</version> - - <properties> - <maven.compiler.release>21</maven.compiler.release> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - - <!-- connector SDK version --> - <version.connectors>8.4.4</version.connectors> - - <!-- external libraries --> - <version.assertj>3.24.2</version.assertj> - <version.junit-jupiter>5.10.1</version.junit-jupiter> - <version.mockito>5.8.0</version.mockito> - <version.slf4j>2.0.9</version.slf4j> - - <!-- maven plugins --> - <plugin.version.maven-clean-plugin>3.3.2</plugin.version.maven-clean-plugin> - <plugin.version.maven-compiler-plugin>3.11.0</plugin.version.maven-compiler-plugin> - <plugin.version.maven-dependency-plugin>3.6.1</plugin.version.maven-dependency-plugin> - <plugin.version.maven-install-plugin>3.1.1</plugin.version.maven-install-plugin> - <plugin.version.maven-jar-plugin>3.3.0</plugin.version.maven-jar-plugin> - <plugin.version.maven-resources-plugin>3.3.1</plugin.version.maven-resources-plugin> - <plugin.version.maven-shade-plugin>3.5.1</plugin.version.maven-shade-plugin> - <plugin.version.maven-surefire-plugin>3.2.2</plugin.version.maven-surefire-plugin> - </properties> - - <dependencies> - <dependency> - <groupId>io.camunda.connector</groupId> - <artifactId>connector-core</artifactId> - <version>${version.connectors}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>io.camunda.connector</groupId> - <artifactId>connector-validation</artifactId> - <version>${version.connectors}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${version.slf4j}</version> - </dependency> - - <!-- Element template generator annotations (compile-time only) --> - <dependency> - <groupId>io.camunda.connector</groupId> - <artifactId>element-template-generator-core</artifactId> - <version>${version.connectors}</version> - <optional>true</optional> - </dependency> - - <!-- test dependencies --> - <dependency> - <groupId>io.camunda.connector</groupId> - <artifactId>connector-test</artifactId> - <version>${version.connectors}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter</artifactId> - <version>${version.junit-jupiter}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-junit-jupiter</artifactId> - <version>${version.mockito}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <version>${version.assertj}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-jdk14</artifactId> - <version>${version.slf4j}</version> - <scope>test</scope> - </dependency> - - <!-- for testing connectors locally in bundle with runtime --> - <dependency> - <groupId>io.camunda.connector</groupId> - <artifactId>spring-boot-starter-camunda-connectors</artifactId> - <version>${version.connectors}</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - - <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clean-plugin</artifactId> - <version>${plugin.version.maven-clean-plugin}</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>${plugin.version.maven-dependency-plugin}</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>${plugin.version.maven-resources-plugin}</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>${plugin.version.maven-compiler-plugin}</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>${plugin.version.maven-jar-plugin}</version> - <configuration> - <useDefaultManifestFile>false</useDefaultManifestFile> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>${plugin.version.maven-install-plugin}</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>${plugin.version.maven-shade-plugin}</version> - <configuration> - <shadedArtifactAttached>true</shadedArtifactAttached> - <shadedClassifierName>with-dependencies</shadedClassifierName> - <!-- no need for this since we are not consuming this artifact downstream --> - <createDependencyReducedPom>false</createDependencyReducedPom> - <filters> - <filter> - <artifact>*:*</artifact> - <excludes> - <exclude>module-info.class</exclude> - <exclude>META-INF/MANIFEST.MF</exclude> - <exclude>META-INF/*.SF</exclude> - <exclude>META-INF/*.DSA</exclude> - <exclude>META-INF/*.RSA</exclude> - </excludes> - </filter> - </filters> - <transformers> - <!-- This is needed if you have dependencies that use Service Loader. Most Google Cloud client libraries does. --> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> - <!-- This is needed to not repeat licenses in the META-INF directory --> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> - <!-- This is needed to merge existing NOTICE files and keep them downstream --> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"> - <addHeader>false</addHeader> - </transformer> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/> - </transformers> - <!-- Uncomment and adjust to use relocations inside your JAR --> - <!--<relocations> - <relocation> - <pattern>com.fasterxml.jackson</pattern> - <shadedPattern>myconnector.com.fasterxml.jackson</shadedPattern> - </relocation> - </relocations>--> - </configuration> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>io.camunda.connector</groupId> - <artifactId>element-template-generator-maven-plugin</artifactId> - <version>${version.connectors}</version> - <executions> - <execution> - <goals> - <goal>generate-templates</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${plugin.version.maven-surefire-plugin}</version> - </plugin> - </plugins> - </pluginManagement> - - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - </plugin> - <plugin> - <groupId>io.camunda.connector</groupId> - <artifactId>element-template-generator-maven-plugin</artifactId> - <configuration> - <connectorClasses> - <connectorClass>io.camunda.example.MyConnectorFunction</connectorClass> - </connectorClasses> - </configuration> - </plugin> - </plugins> - </build> - - <repositories> - <repository> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - <id>connectors</id> - <name>Connectors Repository</name> - <url>https://artifacts.camunda.com/artifactory/connectors/</url> - </repository> - - <repository> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - <id>connectors-snapshots</id> - <name>Connectors Snapshot Repository</name> - <url>https://artifacts.camunda.com/artifactory/connectors-snapshots/</url> - </repository> - </repositories> - - <pluginRepositories> - <pluginRepository> - <id>connectors</id> - <name>Connectors Repository</name> - <url>https://artifacts.camunda.com/artifactory/connectors/</url> - </pluginRepository> - - <pluginRepository> - <id>connectors-snapshots</id> - <name>Connectors Snapshot Repository</name> - <url>https://artifacts.camunda.com/artifactory/connectors-snapshots/</url> - </pluginRepository> - </pluginRepositories> - -</project> diff --git a/Group10_TicketingSystem/renovate.json b/Group10_TicketingSystem/renovate.json deleted file mode 100644 index 9e232a6..0000000 --- a/Group10_TicketingSystem/renovate.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": [ - "config:base" - ], - "labels": ["dependencies"], - "packageRules": [ - { - "matchUpdateTypes": ["minor", "patch", "pin", "digest"], - "automerge": true - } - ] -} diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/MyConnectorFunctionTest.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/MyConnectorFunctionTest.java deleted file mode 100644 index 9c78692..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/MyConnectorFunctionTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.camunda.example; - -import io.camunda.connector.api.annotation.OutboundConnector; -import io.camunda.connector.api.error.ConnectorException; -import io.camunda.connector.api.outbound.OutboundConnectorContext; -import io.camunda.connector.api.outbound.OutboundConnectorFunction; -import io.camunda.connector.generator.java.annotation.ElementTemplate; -import io.camunda.example.dto.MyConnectorRequest; -import io.camunda.example.dto.MyConnectorResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@OutboundConnector( - name = "MYCONNECTOR", - inputVariables = {"authentication", "message"}, - type = "welcomeUser") -@ElementTemplate( - id = "io.camunda.connector.Template.v1", - name = "Template connector", - version = 1, - description = "Describe this connector", - icon = "icon.svg", - documentationRef = "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/available-connectors-overview/", - propertyGroups = { - @ElementTemplate.PropertyGroup(id = "authentication", label = "Authentication"), - @ElementTemplate.PropertyGroup(id = "compose", label = "Compose") - }, - inputDataClass = MyConnectorRequest.class) -public class MyConnectorFunctionTest implements OutboundConnectorFunction { - - private static final Logger LOGGER = LoggerFactory.getLogger(MyConnectorFunctionTest.class); - - @Override - public Object execute(OutboundConnectorContext context) { - final var connectorRequest = context.bindVariables(MyConnectorRequest.class); - return executeConnector(connectorRequest); - } - - private MyConnectorResult executeConnector(final MyConnectorRequest connectorRequest) { - // TODO: implement connector logic - System.out.println("TestFunction"); - - - LOGGER.info("Executing my connector with request {}", connectorRequest); - String message = connectorRequest.message(); - if (message != null && message.toLowerCase().startsWith("fail")) { - throw new ConnectorException("FAIL", "My property started with 'fail', was: " + message); - } - return new MyConnectorResult("Message received: " + message); - } -} - - -//{"message":"hello there", "authentication":{"user":"Joe","token":"JoeToken"}} \ No newline at end of file diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/createTicket.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/createTicket.java deleted file mode 100644 index 055885b..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/createTicket.java +++ /dev/null @@ -1,53 +0,0 @@ -package io.camunda.example; - -import io.camunda.connector.api.annotation.OutboundConnector; -import io.camunda.connector.api.error.ConnectorException; -import io.camunda.connector.api.outbound.OutboundConnectorContext; -import io.camunda.connector.api.outbound.OutboundConnectorFunction; -import io.camunda.connector.generator.java.annotation.ElementTemplate; -import io.camunda.example.dto.MyConnectorRequest; -import io.camunda.example.dto.MyConnectorResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@OutboundConnector( - name = "createTicket", - inputVariables = {"authentication", "message"}, - type = "createTicket") -@ElementTemplate( - id = "io.camunda.connector.Template.v1", - name = "createTicket", - version = 1, - description = "Will create a ticket using previous form variables, and store it within database", - icon = "icon.svg", - documentationRef = "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/available-connectors-overview/", - propertyGroups = { - @ElementTemplate.PropertyGroup(id = "authentication", label = "Authentication"), - @ElementTemplate.PropertyGroup(id = "compose", label = "Compose") - }, - inputDataClass = MyConnectorRequest.class) -public class createTicket implements OutboundConnectorFunction { - - private static final Logger LOGGER = LoggerFactory.getLogger(createTicket.class); - - @Override - public Object execute(OutboundConnectorContext context) throws ConnectorException { - final var connectorRequest = context.bindVariables(MyConnectorRequest.class); - - return executeConnector(connectorRequest); - } - - private MyConnectorResult executeConnector(final MyConnectorRequest connectorRequest) { - // implement creation of ticket - // add ticket to database of tickets - System.out.println(connectorRequest.getClass()); - - - LOGGER.info("Executing my connector with request {}", connectorRequest); - String message = connectorRequest.message(); - if (message != null && message.toLowerCase().startsWith("fail")) { - throw new ConnectorException("FAIL", "My property started with 'fail', was: " + message); - } - return new MyConnectorResult("Message received: " + message); - } -} diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/Authentication.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/Authentication.java deleted file mode 100644 index c26690f..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/Authentication.java +++ /dev/null @@ -1,11 +0,0 @@ -package io.camunda.example.dto; - -import io.camunda.connector.generator.java.annotation.TemplateProperty; -import jakarta.validation.constraints.NotEmpty; - -public record Authentication( - @NotEmpty - @TemplateProperty(group = "authentication", label = "Username", description = "The username for authentication") - String user, - @NotEmpty @TemplateProperty(group = "authentication", description = "The token for authentication") - String token) { } diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorRequest.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorRequest.java deleted file mode 100644 index ba7fc6e..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorRequest.java +++ /dev/null @@ -1,11 +0,0 @@ -package io.camunda.example.dto; - -import io.camunda.connector.generator.java.annotation.TemplateProperty; -import io.camunda.connector.generator.java.annotation.TemplateProperty.PropertyType; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; - -public record MyConnectorRequest( - @NotEmpty @TemplateProperty(group = "compose", type = PropertyType.Text) String message, - @Valid @NotNull Authentication authentication) {} diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorResult.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorResult.java deleted file mode 100644 index bd04e6f..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/dto/MyConnectorResult.java +++ /dev/null @@ -1,3 +0,0 @@ -package io.camunda.example.dto; - -public record MyConnectorResult(String myProperty) {} diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/Ticket.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/Ticket.java deleted file mode 100644 index 8ec9ece..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/Ticket.java +++ /dev/null @@ -1,105 +0,0 @@ -package io.camunda.example.ticketing_system; - -//import javax.annotation.processing.Generated; - - -public class Ticket { - - //private int id; - - //ticket creators details - private String name; - private String contactNumber; - private String department; - private String ticketTitle; - private String ticketDescription; - - //IT department details - private String status; - private String assignedEmployee; - private String serviceLevelAgreement; - - //default constructor - public Ticket(){ - this.name = null; - this.contactNumber = null; - this.department = null; - this.ticketTitle = null; - this.ticketDescription = null; - this.status = null; - this.assignedEmployee = null; - this.serviceLevelAgreement = null; - } - - public Ticket(String name, String contactNumber, String department, String ticketTitle, String ticketDescription) { - this.name = name; - this.contactNumber = contactNumber; - this.department = department; - this.ticketTitle = ticketTitle; - this.ticketDescription = ticketDescription; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getContactNumber() { - return contactNumber; - } - - public void setContactNumber(String contactNumber) { - this.contactNumber = contactNumber; - } - - public String getDepartment() { - return department; - } - - public void setDepartment(String department) { - this.department = department; - } - - public String getTicketTitle() { - return ticketTitle; - } - - public void setTicketTitle(String ticketTitle) { - this.ticketTitle = ticketTitle; - } - - public String getTicketDescription() { - return ticketDescription; - } - - public void setTicketDescription(String ticketDescription) { - this.ticketDescription = ticketDescription; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getAssignedEmployee() { - return assignedEmployee; - } - - public void setAssignedEmployee(String assignedEmployee) { - this.assignedEmployee = assignedEmployee; - } - - public String getServiceLevelAgreement() { - return serviceLevelAgreement; - } - - public void setServiceLevelAgreement(String serviceLevelAgreement) { - this.serviceLevelAgreement = serviceLevelAgreement; - } -} diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketManager.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketManager.java deleted file mode 100644 index 7638c53..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketManager.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.camunda.example.ticketing_system; -import java.util.ArrayList; -import java.util.List; - -public class TicketManager implements TicketStorage { - - private List<Ticket> ticketList; - - public TicketManager() { - this.ticketList = new ArrayList<>(); - } - - @Override - public void addTicket(Ticket ticket) { - ticketList.add(ticket); - } - - @Override - public void removeTicket(Ticket ticket) { - ticketList.remove(ticket); - } - - @Override - public List<Ticket> getAllTickets() { - return ticketList; - } - -} - diff --git a/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketStorage.java b/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketStorage.java deleted file mode 100644 index b673ce3..0000000 --- a/Group10_TicketingSystem/src/main/java/io/camunda/example/ticketing_system/TicketStorage.java +++ /dev/null @@ -1,8 +0,0 @@ -package io.camunda.example.ticketing_system; -import java.util.List; - -public interface TicketStorage { - void addTicket(Ticket ticket); - void removeTicket(Ticket ticket); - List<Ticket> getAllTickets(); -} diff --git a/Group10_TicketingSystem/src/main/resources/META-INF/services/io.camunda.connector.api.outbound.OutboundConnectorFunction b/Group10_TicketingSystem/src/main/resources/META-INF/services/io.camunda.connector.api.outbound.OutboundConnectorFunction deleted file mode 100644 index c32fe79..0000000 --- a/Group10_TicketingSystem/src/main/resources/META-INF/services/io.camunda.connector.api.outbound.OutboundConnectorFunction +++ /dev/null @@ -1 +0,0 @@ -io.camunda.example.MyConnectorFunction \ No newline at end of file diff --git a/Group10_TicketingSystem/src/test/java/io/camunda/example/LocalConnectorRuntime.java b/Group10_TicketingSystem/src/test/java/io/camunda/example/LocalConnectorRuntime.java deleted file mode 100644 index 45e0bd3..0000000 --- a/Group10_TicketingSystem/src/test/java/io/camunda/example/LocalConnectorRuntime.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.camunda.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class LocalConnectorRuntime { - - public static void main(String[] args) { - SpringApplication.run(LocalConnectorRuntime.class, args); - } -} diff --git a/Group10_TicketingSystem/src/test/java/io/camunda/example/MyFunctionTest.java b/Group10_TicketingSystem/src/test/java/io/camunda/example/MyFunctionTest.java deleted file mode 100644 index 6ee61ca..0000000 --- a/Group10_TicketingSystem/src/test/java/io/camunda/example/MyFunctionTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.camunda.example; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; - -import com.fasterxml.jackson.databind.ObjectMapper; -import io.camunda.connector.api.error.ConnectorException; -import io.camunda.connector.test.outbound.OutboundConnectorContextBuilder; -import io.camunda.example.dto.Authentication; -import io.camunda.example.dto.MyConnectorRequest; -import io.camunda.example.dto.MyConnectorResult; -import org.junit.jupiter.api.Test; - -public class MyFunctionTest { - - ObjectMapper objectMapper = new ObjectMapper(); - - @Test - void shouldReturnReceivedMessageWhenExecute() throws Exception { - // given - var input = new MyConnectorRequest( - "Hello World!", - new Authentication("testUser", "testToken") - ); - var function = new MyConnectorFunctionTest(); - var context = OutboundConnectorContextBuilder.create() - .variables(objectMapper.writeValueAsString(input)) - .build(); - // when - var result = function.execute(context); - // then - assertThat(result) - .isInstanceOf(MyConnectorResult.class) - .extracting("myProperty") - .isEqualTo("Message received: Hello World!"); - } - - @Test - void shouldThrowWithErrorCodeWhenMessageStartsWithFail() throws Exception { - // given - var input = new MyConnectorRequest( - "Fail: unauthorized", - new Authentication("testUser", "testToken") - ); - var function = new MyConnectorFunctionTest(); - var context = OutboundConnectorContextBuilder.create() - .variables(objectMapper.writeValueAsString(input)) - .build(); - // when - var result = catchThrowable(() -> function.execute(context)); - // then - assertThat(result) - .isInstanceOf(ConnectorException.class) - .hasMessageContaining("started with 'fail'") - .extracting("errorCode").isEqualTo("FAIL"); - } -} \ No newline at end of file diff --git a/Group10_TicketingSystem/src/test/java/io/camunda/example/MyRequestTest.java b/Group10_TicketingSystem/src/test/java/io/camunda/example/MyRequestTest.java deleted file mode 100644 index e8b77a3..0000000 --- a/Group10_TicketingSystem/src/test/java/io/camunda/example/MyRequestTest.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.camunda.example; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.camunda.connector.api.error.ConnectorInputException; -import io.camunda.connector.test.outbound.OutboundConnectorContextBuilder; -import io.camunda.example.dto.Authentication; -import io.camunda.example.dto.MyConnectorRequest; -import org.junit.jupiter.api.Test; - -public class MyRequestTest { - - ObjectMapper objectMapper = new ObjectMapper(); - - @Test - void shouldReplaceTokenSecretWhenReplaceSecrets() throws JsonProcessingException { - // given - var input = new MyConnectorRequest( - "Hello World!", - new Authentication("testUser", "secrets.MY_TOKEN") - ); - var context = OutboundConnectorContextBuilder.create() - .secret("MY_TOKEN", "token value") - .variables(objectMapper.writeValueAsString(input)) - .build(); - // when - final var connectorRequest = context.bindVariables(MyConnectorRequest.class); - // then - assertThat(connectorRequest) - .extracting("authentication") - .extracting("token") - .isEqualTo("token value"); - } - - @Test - void shouldFailWhenValidate_NoAuthentication() throws JsonProcessingException { - // given - var input = new MyConnectorRequest( - "Hello World!", - null - ); - var context = OutboundConnectorContextBuilder.create().variables(objectMapper.writeValueAsString(input)).build(); - // when - assertThatThrownBy(() -> context.bindVariables(MyConnectorRequest.class)) - // then - .isInstanceOf(ConnectorInputException.class) - .hasMessageContaining("authentication"); - } - - @Test - void shouldFailWhenValidate_NoToken() throws JsonProcessingException { - // given - var input = new MyConnectorRequest( - "Hello World!", - new Authentication("testUser", null) - ); - var context = OutboundConnectorContextBuilder.create().variables(objectMapper.writeValueAsString(input)).build(); - // when - assertThatThrownBy(() -> context.bindVariables(MyConnectorRequest.class)) - // then - .isInstanceOf(ConnectorInputException.class) - .hasMessageContaining("token"); - } - - @Test - void shouldFailWhenValidate_NoMesage() throws JsonProcessingException { - // given - var input = new MyConnectorRequest( - null, - new Authentication("testUser", "testToken") - ); - var context = OutboundConnectorContextBuilder.create().variables(objectMapper.writeValueAsString(input)).build(); - // when - assertThatThrownBy(() -> context.bindVariables(MyConnectorRequest.class)) - // then - .isInstanceOf(ConnectorInputException.class) - .hasMessageContaining("message"); - } - - @Test - void shouldFailWhenValidate_TokenEmpty() throws JsonProcessingException { - // given - var input = new MyConnectorRequest( - "foo", - new Authentication("testUser", "") - ); - var context = OutboundConnectorContextBuilder.create().variables(objectMapper.writeValueAsString(input)).build(); - // when - assertThatThrownBy(() -> context.bindVariables(MyConnectorRequest.class)) - // then - .isInstanceOf(ConnectorInputException.class) - .hasMessageContaining("authentication.token: Validation failed"); - } -} \ No newline at end of file diff --git a/Group10_TicketingSystem/src/test/resources/application.properties b/Group10_TicketingSystem/src/test/resources/application.properties deleted file mode 100644 index fe64e24..0000000 --- a/Group10_TicketingSystem/src/test/resources/application.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for running connectors locally in bundle with connector-runtime -zeebe.client.cloud.region=jfk-1 -zeebe.client.cloud.clusterId=c31853d1-8836-462a-aa3a-567d91462308 -zeebe.client.cloud.clientId=itMBO_zVxqKVOy5qqfKQyJpWgjuwfYaP -zeebe.client.cloud.clientSecret=CbF7fw.nEY3mTIYt9jDM9fuKgwLHho1KnoYpq60Pi710NQJu1B1uA7dquq8b.-T1 - -camunda.connector.polling.enabled=false \ No newline at end of file diff --git a/Group10_TicketingSystem/src/test/resources/icon.svg b/Group10_TicketingSystem/src/test/resources/icon.svg deleted file mode 100644 index 736934a..0000000 --- a/Group10_TicketingSystem/src/test/resources/icon.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 10 10" shape-rendering="geometricPrecision"><title>Slack</title><g fill="none"><path d="M0,0 L0,10 L10,10 L10,0 z" fill="#ecb12f"/></g></svg> \ No newline at end of file -- GitLab