Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #71

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e86b16f
[Feature] Dynamic state parent group (#48)
Pjiesco May 19, 2022
dbc0a35
core: Upgrade dependencies
ChristopheCVB May 23, 2022
821de02
core: Upgrade Gradle version to 7.5.1
ChristopheCVB Sep 15, 2022
038c178
core: Upgrade Gradle version to 7.5.1
ChristopheCVB Sep 15, 2022
d0432b5
core: Upgrade Gradle version to 7.5.1
ChristopheCVB Sep 15, 2022
03ca14a
core: Upgrade Gradle version to 7.5.1
ChristopheCVB Sep 15, 2022
324fb2e
core: Upgrade Gradle version to 7.5.1
ChristopheCVB Sep 15, 2022
a07fdd2
Merge branch 'master' into develop
ChristopheCVB Sep 15, 2022
25da331
core: Dependencies management
ChristopheCVB Nov 1, 2022
8f92768
core: ActionTranslation annotation
ChristopheCVB Nov 1, 2022
0af69e1
fix: Github Workflow
ChristopheCVB Nov 1, 2022
531bcb1
fix: Github Workflows
ChristopheCVB Nov 1, 2022
7bdbf11
fix: Github Workflows
ChristopheCVB Nov 1, 2022
b2bb0a4
fix: Github Workflows
ChristopheCVB Nov 1, 2022
336b35a
fix: Tests wait time
ChristopheCVB Nov 1, 2022
93b8668
fix: Packager SNAPSHOT publication
ChristopheCVB Nov 1, 2022
dbaa8cc
fix: Packager SNAPSHOT publication
ChristopheCVB Nov 1, 2022
7b6f062
fix: Packager SNAPSHOT publication
ChristopheCVB Nov 1, 2022
925e94f
fix: Packager SNAPSHOT publication
ChristopheCVB Nov 1, 2022
8be5356
fix: Packager SNAPSHOT publication
ChristopheCVB Nov 1, 2022
9a5dc18
Merge branch 'master' into develop
ChristopheCVB Nov 1, 2022
c073d83
feat: Plugin ParentCategory
ChristopheCVB Nov 1, 2022
829133b
feat: TouchPortalPlugin.getBase64ImageFromUrl closes #38
ChristopheCVB Nov 2, 2022
e7f9a6e
fix: Set encoding to UTF-8
ChristopheCVB Nov 14, 2022
14abfe7
feat: TP Plugin API 7 Platform start command
ChristopheCVB Nov 14, 2022
c39594b
core: Refactor Annotations Processor
ChristopheCVB Nov 27, 2022
ed082fa
fix: JavaDoc
ChristopheCVB Nov 27, 2022
a7f8bcc
fix: JavaDoc
ChristopheCVB Nov 27, 2022
2f4cec1
fix: JavaDoc
ChristopheCVB Nov 27, 2022
f47e49f
core: Refactor Annotations Processor
ChristopheCVB Nov 27, 2022
89f49fd
core: Add logs in tests
ChristopheCVB Nov 27, 2022
bfd7e4a
core: (WIP) Modularization closes #54
ChristopheCVB Dec 4, 2022
00ca01d
doc: Update Samples and README.md
ChristopheCVB Dec 15, 2022
e775dce
core: Call TPInvokable.onInvoke from callbacksExecutor
ChristopheCVB Dec 16, 2022
d7f8526
core: TPInvokable.onListChanged
ChristopheCVB Dec 20, 2022
2135ebb
core: Revert to System Java instalation
ChristopheCVB Dec 20, 2022
5c77140
core: Revert to System Java instalation
ChristopheCVB Dec 20, 2022
ee1d089
core: 9.0.0
ChristopheCVB Dec 20, 2022
170d483
Feat: TriggerEvent (#63)
Pjiesco Oct 6, 2023
1964ce0
Feat: forceUpdate (#64)
Pjiesco Oct 6, 2023
cc5c915
Change `sdk` to `api` (#66)
Pjiesco Oct 6, 2023
ca95a1f
Add CodeQL workflow for GitHub code scanning (#53)
lgtm-com[bot] Oct 6, 2023
b034dd9
[API 7] Setting Tooltip (#65)
Pjiesco Oct 26, 2023
bd3073a
[API 7] SubCategories (#68)
Pjiesco Nov 18, 2024
f3de736
[API 7] Event valueType text (#67)
Pjiesco Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "28 7 * * 6"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ java ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
32 changes: 20 additions & 12 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,35 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-package: jdk
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Gradle Plugin Publish Local
run: |
./gradlew :Packager:publishToMavenLocal
env:
PGP_KEY: ${{ secrets.PGP_KEY }}
PGP_PWD: ${{ secrets.PGP_PWD }}

build:

needs: prepare-maven-local
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew build

Expand All @@ -45,9 +50,12 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Gradle Maven Publish
run: |
./gradlew publishMavenJavaPublicationToMavenRepository
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew build
- name: JaCoco Test Report
Expand All @@ -33,11 +33,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Gradle Maven Publish
run: |
./gradlew publishMavenJavaPublicationToMavenRepository
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run unit tests
run: ./gradlew Library:test
- name: Upload Failing Unit Test Results
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Unit and Int Test Failure Results
path: ./Library/build/reports/tests/**
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,30 @@
/**
* Action Annotation
* <p>
* Target is a Method
* </p>
* <p>
* <b>If your method only has @Data annotated parameters, it will be called automatically by the SDK.</b>
* <i>If it is not the case, the SDK will call the TouchPortalPluginListener.onReceive(JsonObject jsonMessage) instead.</i>
* Target is a Method or a Class extending TPAction
* </p>
* <ul>
* <li>
* If used on a Method
* <ul>
* <li>If the method only has @Data annotated parameters, it will be called automatically by the SDK.</li>
* <li>If it is not the case, the SDK will call the TouchPortalPluginListener.onReceive(JsonObject jsonMessage) instead.</li>
* </ul>
* </li>
* <li>
* If used on a Class, the SDK will
* <ul>
* <li>Create a new instance of the Class</li>
* <li>Set the instance's {@link Data} annotated fields</li>
* <li>Call the onInvoke method</li>
* </ul>
* </li>
* </ul>
*
* @see <a href="https://www.touch-portal.com/sdk/index.php?section=dynamic-actions">TP Documentation: Dynamic Actions</a>
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface Action {
/**
* Action id
Expand Down Expand Up @@ -107,6 +120,13 @@
*/
String categoryId();

/**
* Action subCategoryId
*
* @return String subCategoryId
*/
String subCategoryId() default "";

/**
* Action hasHoldFunctionality
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Touch Portal Plugin SDK
*
* Copyright 2020 Christophe Carvalho Vilas-Boas
* [email protected]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.christophecvb.touchportal.annotations;

import java.lang.annotation.*;

/**
* ActionTranslation Annotation
* <p>
* Target is a Method
* </p>
*/
@Repeatable(ActionTranslations.class)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface ActionTranslation {
/**
* ActionTranslation Language
*
* @return Language language
*/
Language language();

/**
* ActionTranslation name
* <p>
* Default is ""
* </p>
*
* @return String name
*/
String name() default "";

/**
* ActionTranslation prefix
* <p>
* Default is ""
* </p>
*
* @return String prefix
*/
String prefix() default "";

/**
* ActionTranslation description
* <p>
* Default is ""
* </p>
*
* @return String description
*/
String description() default "";

/**
* ActionTranslation format
* <p>
* Default is ""
* </p>
*
* @return String format
*/
String format() default "";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.christophecvb.touchportal.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Target({ElementType.METHOD, ElementType.TYPE})
public @interface ActionTranslations {
ActionTranslation[] value();
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,12 @@
* @return String imagePath
*/
String imagePath() default "";

SubCategory[] subCategories() default {};

@interface SubCategory {
String id();
String name();
String imagePath() default "";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,30 @@
/**
* Connector Annotation
* <p>
* Target is a Method
* </p>
* <p>
* <b>If your method only has @Data annotated parameters, it will be called automatically by the SDK.</b>
* <i>If it is not the case, the SDK will call the TouchPortalPluginListener.onReceive(JsonObject jsonMessage) instead.</i>
* Target is a Method or a Class extending TPConnector
* </p>
* <ul>
* <li>
* If used on a Method
* <ul>
* <li>If the method only has @Data annotated parameters, it will be called automatically by the SDK.</li>
* <li>If it is not the case, the SDK will call the TouchPortalPluginListener.onReceive(JsonObject jsonMessage) instead.</li>
* </ul>
* </li>
* <li>
* If used on a Class, the SDK will
* <ul>
* <li>Create a new instance of the Class</li>
* <li>Set the instance's {@link Data} annotated fields</li>
* <li>Call the onInvoke method</li>
* </ul>
* </li>
* </ul>
*
* @see <a href="https://www.touch-portal.com/api/index.php?section=connectors">TP Documentation: Connectors</a>
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface Connector {
/**
* Connector id
Expand Down Expand Up @@ -73,4 +86,11 @@
* @return String categoryId
*/
String categoryId();

/**
* Connector subConnectorId
*
* @return String subConnectorId
*/
String subCategoryId() default "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
* @see <a href="https://www.touch-portal.com/api/index.php?section=connectors">TP Documentation: Connectors</a>
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@Target({ElementType.PARAMETER, ElementType.FIELD})
public @interface ConnectorValue {
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @see <a href="https://www.touch-portal.com/sdk/index.php?section=action-data">TP Documentation: Action Data</a>
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@Target({ElementType.PARAMETER, ElementType.FIELD})
public @interface Data {
/**
* Data id
Expand Down
Loading
Loading