diff --git a/ocpp-v2_0-test/build.gradle b/ocpp-v2_0-test/build.gradle deleted file mode 100644 index 49ad182b..00000000 --- a/ocpp-v2_0-test/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file was generated by the Gradle 'init' task. - */ - -plugins { - id 'groovy' -} - -dependencies { - compile project(':common') - compile project(':v2_0') - testCompile 'junit:junit:4.13.2' - testCompile 'org.codehaus.groovy:groovy-all:2.4.11' - testCompile 'org.spockframework:spock-core:1.0-groovy-2.4' - testCompile 'org.hamcrest:hamcrest-core:3.0' - testCompile 'ch.qos.logback:logback-core:1.3.16' - testCompile 'ch.qos.logback:logback-classic:1.3.16' - testCompile 'org.slf4j:jul-to-slf4j:2.0.17' -} - -description = 'Java-OCA-OCPP v2.0 - Integration test' diff --git a/ocpp-v2_0-test/pom.xml b/ocpp-v2_0-test/pom.xml deleted file mode 100644 index ab6576d2..00000000 --- a/ocpp-v2_0-test/pom.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - 4.0.0 - - eu.chargetime.ocpp - v2_0-test - 1.2.0 - jar - - Java-OCA-OCPP v2.0 - Integration test - Integration test of OCA OCPP version 2.0 - https://github.com/ChargeTimeEU/Java-OCA-OCPP - - - - MIT License - http://www.opensource.org/licenses/mit-license.php - - - - - - Thomas Volden - tv@chargetime.eu - chargetime.eu - http://www.chargetime.eu - - - - - scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git - scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git - https://github.com/ChargeTimeEU/Java-OCA-OCPP.git - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 - - - - - - eu.chargetime.ocpp - common - 1.2.0 - - - eu.chargetime.ocpp - v2_0 - 1.2.0 - - - junit - junit - 4.13.2 - test - - - org.spockframework - spock-core - 2.3-groovy-4.0 - test - - - org.hamcrest - hamcrest-core - 3.0 - test - - - ch.qos.logback - logback-core - 1.3.16 - test - - - ch.qos.logback - logback-classic - 1.3.16 - test - - - org.slf4j - jul-to-slf4j - 2.0.17 - test - - - - - - - org.codehaus.gmavenplus - gmavenplus-plugin - 4.2.1 - - - - addTestSources - compileTests - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.14.1 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.5.4 - - true - - **/*Test.java - - - - - integration-test - - test - - integration-test - - - **/*Spec.java - - - - - - - - - diff --git a/ocpp-v2_0/build.gradle b/ocpp-v2_0/build.gradle deleted file mode 100644 index a9fb6469..00000000 --- a/ocpp-v2_0/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * This file was generated by the Gradle 'init' task. - */ - -dependencies { - compile project(':common') - compile project(':OCPP-J') - compile 'org.java-websocket:Java-WebSocket:1.6.0' - testCompile 'junit:junit:4.13.2' - testCompile 'org.mockito:mockito-core:4.11.0' - testCompile 'org.hamcrest:hamcrest-core:3.0' -} - -task javadocJar(type: Jar) { - classifier = 'javadoc' - from(javadoc.destinationDir) -} - -description = 'Java-OCA-OCPP v2.0' -publishing.publications.maven.artifact(javadocJar) diff --git a/ocpp-v2_0/pom.xml b/ocpp-v2_0/pom.xml deleted file mode 100644 index 80114aa4..00000000 --- a/ocpp-v2_0/pom.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - 4.0.0 - - eu.chargetime.ocpp - v2_0 - 1.2.0 - jar - - Java-OCA-OCPP v2.0 - Implementation of Open Charge-Point Protocol version 2.0. - https://github.com/ChargeTimeEU/Java-OCA-OCPP - - - - MIT License - http://www.opensource.org/licenses/mit-license.php - - - - - - Thomas Volden - tv@chargetime.eu - chargetime.eu - http://www.chargetime.eu - - - - - scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git - scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git - https://github.com/ChargeTimeEU/Java-OCA-OCPP.git - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 - - - - - - eu.chargetime.ocpp - common - 1.2.0 - - - eu.chargetime.ocpp - OCPP-J - 1.2.0 - - - org.java-websocket - Java-WebSocket - 1.6.0 - - - junit - junit - 4.13.2 - test - - - org.mockito - mockito-core - 4.11.0 - test - - - org.hamcrest - hamcrest-core - 3.0 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - 3.14.1 - - - org.apache.maven.plugins - maven-source-plugin - 3.4.0 - - - attach-sources - verify - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.12.0 - - - attach-javadocs - - jar - - - - - - - - - \ No newline at end of file diff --git a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/validation/IdentifierStringValidationRule.java b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/validation/IdentifierStringValidationRule.java deleted file mode 100644 index 747e5d29..00000000 --- a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/validation/IdentifierStringValidationRule.java +++ /dev/null @@ -1,46 +0,0 @@ -package eu.chargetime.ocpp.model.validation; -/* - ChargeTime.eu - Java-OCA-OCPP - - MIT License - - Copyright (C) 2018 Thomas Volden - - 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. -*/ - -import eu.chargetime.ocpp.PropertyConstraintException; -import java.util.regex.Pattern; - -public class IdentifierStringValidationRule implements IValidationRule { - private final String ERROR_MESSAGE = "Illegal character(s) in IdentifierString."; - private final String PATTERN = "^[\\w\\Q*-=:+|@.\\E]{0,255}$"; - - @Override - public void validate(String value) throws PropertyConstraintException { - if (!match(value)) { - throw new PropertyConstraintException(value, ERROR_MESSAGE); - } - } - - private boolean match(String value) { - Pattern pattern = Pattern.compile(PATTERN); - return pattern.matcher(value).matches(); - } -}