base_project

This commit is contained in:
risadmin_prod 2025-02-18 03:15:28 +00:00
commit eacef5f9cd
1639 changed files with 101891 additions and 0 deletions

View File

@ -0,0 +1,5 @@
.DS_Store
backend/.DS_Store
backend/.DS_Store
backend/.DS_Store

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1,152 @@
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-mail/2.2.5.RELEASE/spring-boot-starter-mail-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/2.2.5.RELEASE/spring-boot-starter-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/2.2.5.RELEASE/spring-boot-starter-logging-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-to-slf4j/2.12.1/log4j-to-slf4j-2.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.12.1/log4j-api-2.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.25/snakeyaml-1.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/5.2.4.RELEASE/spring-context-support-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/5.2.4.RELEASE/spring-context-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/mail/jakarta.mail/1.6.4/jakarta.mail-1.6.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/2.2.5.RELEASE/spring-boot-starter-web-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-json/2.2.5.RELEASE/spring-boot-starter-json-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.2/jackson-datatype-jdk8-2.10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-parameter-names/2.10.2/jackson-module-parameter-names-2.10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/5.2.4.RELEASE/spring-web-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/5.2.4.RELEASE/spring-webmvc-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/5.2.4.RELEASE/spring-expression-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/2.2.5.RELEASE/spring-boot-starter-aop-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/5.2.4.RELEASE/spring-aop-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.5/aspectjweaver-1.9.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/2.2.5.RELEASE/spring-boot-starter-tomcat-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/9.0.31/tomcat-embed-core-9.0.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-el/9.0.31/tomcat-embed-el-9.0.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.31/tomcat-embed-websocket-9.0.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-actuator/2.2.5.RELEASE/spring-boot-starter-actuator-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator-autoconfigure/2.2.5.RELEASE/spring-boot-actuator-autoconfigure-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator/2.2.5.RELEASE/spring-boot-actuator-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-core/1.3.5/micrometer-core-1.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger2/2.9.2/springfox-swagger2-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-core/2.9.2/springfox-core-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-schema/2.9.2/springfox-schema-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger-common/2.9.2/springfox-swagger-common-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-metadata/1.2.0.RELEASE/spring-plugin-metadata-1.2.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mapstruct/mapstruct/1.2.0.Final/mapstruct-1.2.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.12/junit-4.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/2.1/hamcrest-core-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest/2.1/hamcrest-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-annotations/1.5.22/swagger-annotations-1.5.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-models/1.5.22/swagger-models-1.5.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.10.2/jackson-annotations-2.10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger-ui/2.9.2/springfox-swagger-ui-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-jpa/2.2.5.RELEASE/spring-boot-starter-data-jpa-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-core/5.4.12.Final/hibernate-core-5.4.12.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.24.0-GA/javassist-3.24.0-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.10.8/byte-buddy-1.10.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/jandex/2.1.1.Final/jandex-2.1.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/dom4j/dom4j/2.1.1/dom4j-2.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/common/hibernate-commons-annotations/5.1.0.Final/hibernate-commons-annotations-5.1.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xml/fastinfoset/FastInfoset/1.2.16/FastInfoset-1.2.16.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-jpa/2.2.5.RELEASE/spring-data-jpa-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/2.2.5.RELEASE/spring-data-commons-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-orm/5.2.4.RELEASE/spring-orm-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/5.2.4.RELEASE/spring-tx-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aspects/5.2.4.RELEASE/spring-aspects-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-validation/2.2.5.RELEASE/spring-boot-starter-validation-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/validator/hibernate-validator/6.0.18.Final/hibernate-validator-6.0.18.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/2.2.5.RELEASE/spring-boot-starter-jdbc-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/3.4.2/HikariCP-3.4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/5.2.4.RELEASE/spring-jdbc-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/postgresql/postgresql/42.2.10/postgresql-42.2.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/microsoft/sqlserver/mssql-jdbc/7.4.1.jre8/mssql-jdbc-7.4.1.jre8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-websocket/2.2.5.RELEASE/spring-boot-starter-websocket-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-websocket/5.2.4.RELEASE/spring-websocket-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-messaging/5.2.4.RELEASE/spring-messaging-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/5.2.4.RELEASE/spring-beans-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.2.4.RELEASE/spring-core-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/5.2.4.RELEASE/spring-jcl-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-cache/2.2.5.RELEASE/spring-boot-starter-cache-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/caffeine/2.8.1/caffeine-2.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/3.1.0/checker-qual-3.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/h2database/h2/1.4.200/h2-1.4.200.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/social/spring-social-google/1.0.0.RELEASE/spring-social-google-1.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/social/spring-social-config/1.1.0.RELEASE/spring-social-config-1.1.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/social/spring-social-web/1.1.0.RELEASE/spring-social-web-1.1.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.10.2/jackson-databind-2.10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/social/spring-social-core/1.1.0.RELEASE/spring-social-core-1.1.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/social/spring-social-linkedin/1.0.2.RELEASE/spring-social-linkedin-1.0.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/jsonwebtoken/jjwt/0.9.0/jjwt-0.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/23.5-jre/guava-23.5-jre.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.12.1/jackson-core-2.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.10.2/jackson-datatype-jsr310-2.10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/modelmapper/modelmapper/2.3.0/modelmapper-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.7/commons-io-2.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/lingala/zip4j/zip4j/2.6.1/zip4j-2.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/json/json/20171018/json-20171018.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-devtools/2.2.5.RELEASE/spring-boot-devtools-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/2.2.5.RELEASE/spring-boot-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/2.2.5.RELEASE/spring-boot-autoconfigure-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/clerezza/ext/org.json.simple/0.4/org.json.simple-0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-webflux/2.2.5.RELEASE/spring-boot-starter-webflux-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-reactor-netty/2.2.5.RELEASE/spring-boot-starter-reactor-netty-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/netty/reactor-netty/0.9.5.RELEASE/reactor-netty-0.9.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-codec-http/4.1.45.Final/netty-codec-http-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-common/4.1.45.Final/netty-common-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-buffer/4.1.45.Final/netty-buffer-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-transport/4.1.45.Final/netty-transport-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-resolver/4.1.45.Final/netty-resolver-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-codec/4.1.45.Final/netty-codec-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-codec-http2/4.1.45.Final/netty-codec-http2-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-handler/4.1.45.Final/netty-handler-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-handler-proxy/4.1.45.Final/netty-handler-proxy-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-codec-socks/4.1.45.Final/netty-codec-socks-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-transport-native-epoll/4.1.45.Final/netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-transport-native-unix-common/4.1.45.Final/netty-transport-native-unix-common-4.1.45.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webflux/5.2.4.RELEASE/spring-webflux-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/reactor-core/3.3.3.RELEASE/reactor-core-3.3.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/synchronoss/cloud/nio-multipart-parser/1.1.0/nio-multipart-parser-1.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/synchronoss/cloud/nio-stream-storage/1.1.3/nio-stream-storage-1.1.3.jar" enabled="true" runInBatchMode="false"/>
</factorypath>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>app</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations
org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations

View File

@ -0,0 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -0,0 +1,2 @@
boot.validation.initialized=true
eclipse.preferences.version=1

View File

@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,857 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 258998272 bytes for G1 virtual space
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (./open/src/hotspot/os/windows/os_windows.cpp:3321), pid=6816, tid=7380
#
# JRE version: OpenJDK Runtime Environment (15.0.2+7) (build 15.0.2+7-27)
# Java VM: OpenJDK 64-Bit Server VM (15.0.2+7-27, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
--------------- S U M M A R Y ------------
Command Line: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=52447 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.jmx.enabled=true -Dspring.application.admin.enabled=true -XX:TieredStopAtLevel=1 -Dspring.boot.project.name=backend -Dfile.encoding=UTF-8 -XX:+ShowCodeDetailsInExceptionMessages com.realnet.RealNetApp --spring.output.ansi.enabled=always
Host: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 8 cores, 7G, Windows 10 , 64 bit Build 19041 (10.0.19041.1889)
Time: Sat Oct 1 12:47:37 2022 India Standard Time elapsed time: 7190.426722 seconds (0d 1h 59m 50s)
--------------- T H R E A D ---------------
Current thread (0x0000022579a517b0): VMThread "VM Thread" [stack: 0x0000005178000000,0x0000005178100000] [id=7380]
Stack: [0x0000005178000000,0x0000005178100000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000225000010ad]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x62ae9a]
V [jvm.dll+0x7817a9]
V [jvm.dll+0x782f03]
V [jvm.dll+0x7834c5]
V [jvm.dll+0x78347b]
V [jvm.dll+0x62a2b9]
V [jvm.dll+0x62aa88]
C [ntdll.dll+0xa235f]
C [ntdll.dll+0x514a4]
C [ntdll.dll+0xa0e8e]
C 0x00000225000010ad
VM_Operation (0x000000517a7fe270): G1CollectForAllocation, mode: safepoint, requested by thread 0x000002250f7af090
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x0000022511157d10, length=35, elements={
0x0000022579a59180, 0x000002257a295010, 0x000002257a282db0, 0x000002257a283770,
0x000002257a2c27b0, 0x000002257a2c59e0, 0x000002257a2b1240, 0x00000225799ec0f0,
0x000002257a525cf0, 0x000002257ae597c0, 0x000002257ae64180, 0x000002257ae61b20,
0x000002257aed5cb0, 0x000002257d9eeff0, 0x000002257d9efe60, 0x000002257d9ece40,
0x000002257d9ed310, 0x000002257d9ee180, 0x000002257d9ed7e0, 0x000002250f7af090,
0x000002250f7b1710, 0x000002250f7afa30, 0x000002250f7b0d70, 0x000002250f7aff00,
0x000002250f7b1be0, 0x000002250f7b03d0, 0x000002250f7ad3b0, 0x000002250f7ac070,
0x000002250f7b20b0, 0x000002250f7b2580, 0x000002250f7ac540, 0x000002250f7b1240,
0x000002250f7b2f20, 0x000002250f7b08a0, 0x00000225798d3150
}
Java Threads: ( => current thread )
0x0000022579a59180 JavaThread "Reference Handler" daemon [_thread_blocked, id=13212, stack(0x0000005178100000,0x0000005178200000)]
0x000002257a295010 JavaThread "Finalizer" daemon [_thread_blocked, id=2780, stack(0x0000005178200000,0x0000005178300000)]
0x000002257a282db0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2844, stack(0x0000005178300000,0x0000005178400000)]
0x000002257a283770 JavaThread "Attach Listener" daemon [_thread_blocked, id=5488, stack(0x0000005178400000,0x0000005178500000)]
0x000002257a2c27b0 JavaThread "Service Thread" daemon [_thread_blocked, id=4264, stack(0x0000005178500000,0x0000005178600000)]
0x000002257a2c59e0 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=15236, stack(0x0000005178600000,0x0000005178700000)]
0x000002257a2b1240 JavaThread "Sweeper thread" daemon [_thread_blocked, id=17268, stack(0x0000005178700000,0x0000005178800000)]
0x00000225799ec0f0 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=4196, stack(0x0000005178800000,0x0000005178900000)]
0x000002257a525cf0 JavaThread "Notification Thread" daemon [_thread_blocked, id=12716, stack(0x0000005178900000,0x0000005178a00000)]
0x000002257ae597c0 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=5236, stack(0x0000005178a00000,0x0000005178b00000)]
0x000002257ae64180 JavaThread "RMI TCP Accept-52447" daemon [_thread_in_native, id=14720, stack(0x0000005178b00000,0x0000005178c00000)]
0x000002257ae61b20 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=9868, stack(0x0000005178c00000,0x0000005178d00000)]
0x000002257aed5cb0 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=10268, stack(0x0000005178f00000,0x0000005179000000)]
0x000002257d9eeff0 JavaThread "mysql-cj-abandoned-connection-cleanup" daemon [_thread_blocked, id=4324, stack(0x0000005179900000,0x0000005179a00000)]
0x000002257d9efe60 JavaThread "HikariPool-1 housekeeper" daemon [_thread_blocked, id=14616, stack(0x000000517a300000,0x000000517a400000)]
0x000002257d9ece40 JavaThread "Catalina-utility-1" [_thread_blocked, id=16064, stack(0x000000517a400000,0x000000517a500000)]
0x000002257d9ed310 JavaThread "Catalina-utility-2" [_thread_blocked, id=5460, stack(0x000000517a500000,0x000000517a600000)]
0x000002257d9ee180 JavaThread "container-0" [_thread_blocked, id=9248, stack(0x000000517a600000,0x000000517a700000)]
0x000002257d9ed7e0 JavaThread "Live Reload Server" daemon [_thread_in_native, id=1116, stack(0x000000517a800000,0x000000517a900000)]
0x000002250f7af090 JavaThread "File Watcher" daemon [_thread_blocked, id=16340, stack(0x000000517a700000,0x000000517a800000)]
0x000002250f7b1710 JavaThread "http-nio-9191-BlockPoller" daemon [_thread_blocked, id=16692, stack(0x000000517a900000,0x000000517aa00000)]
0x000002250f7afa30 JavaThread "http-nio-9191-exec-1" daemon [_thread_blocked, id=5556, stack(0x000000517aa00000,0x000000517ab00000)]
0x000002250f7b0d70 JavaThread "http-nio-9191-exec-2" daemon [_thread_blocked, id=14708, stack(0x000000517ab00000,0x000000517ac00000)]
0x000002250f7aff00 JavaThread "http-nio-9191-exec-3" daemon [_thread_blocked, id=13008, stack(0x000000517ac00000,0x000000517ad00000)]
0x000002250f7b1be0 JavaThread "http-nio-9191-exec-4" daemon [_thread_blocked, id=13096, stack(0x000000517ad00000,0x000000517ae00000)]
0x000002250f7b03d0 JavaThread "http-nio-9191-exec-5" daemon [_thread_blocked, id=14108, stack(0x000000517ae00000,0x000000517af00000)]
0x000002250f7ad3b0 JavaThread "http-nio-9191-exec-6" daemon [_thread_blocked, id=8704, stack(0x000000517af00000,0x000000517b000000)]
0x000002250f7ac070 JavaThread "http-nio-9191-exec-7" daemon [_thread_blocked, id=4628, stack(0x000000517b000000,0x000000517b100000)]
0x000002250f7b20b0 JavaThread "http-nio-9191-exec-8" daemon [_thread_blocked, id=5404, stack(0x000000517b100000,0x000000517b200000)]
0x000002250f7b2580 JavaThread "http-nio-9191-exec-9" daemon [_thread_blocked, id=10000, stack(0x000000517b200000,0x000000517b300000)]
0x000002250f7ac540 JavaThread "http-nio-9191-exec-10" daemon [_thread_blocked, id=4308, stack(0x000000517b300000,0x000000517b400000)]
0x000002250f7b1240 JavaThread "http-nio-9191-ClientPoller" daemon [_thread_blocked, id=13388, stack(0x000000517b400000,0x000000517b500000)]
0x000002250f7b2f20 JavaThread "http-nio-9191-Acceptor" daemon [_thread_in_native, id=13888, stack(0x000000517b500000,0x000000517b600000)]
0x000002250f7b08a0 JavaThread "DestroyJavaVM" [_thread_blocked, id=6624, stack(0x0000005177a00000,0x0000005177b00000)]
0x00000225798d3150 JavaThread "HikariPool-1 connection closer" daemon [_thread_blocked, id=4052, stack(0x0000005178e00000,0x0000005178f00000)]
Other Threads:
=>0x0000022579a517b0 VMThread "VM Thread" [stack: 0x0000005178000000,0x0000005178100000] [id=7380]
0x000002256e840090 WatcherThread [stack: 0x0000005178d00000,0x0000005178e00000] [id=3596]
0x000002256e87e610 GCTaskThread "GC Thread#0" [stack: 0x0000005177b00000,0x0000005177c00000] [id=14008]
0x000002257af52e90 GCTaskThread "GC Thread#1" [stack: 0x0000005179200000,0x0000005179300000] [id=9240]
0x000002257af554d0 GCTaskThread "GC Thread#2" [stack: 0x0000005179300000,0x0000005179400000] [id=5240]
0x000002257af51b70 GCTaskThread "GC Thread#3" [stack: 0x0000005179a00000,0x0000005179b00000] [id=1644]
0x000002257af531c0 GCTaskThread "GC Thread#4" [stack: 0x0000005179b00000,0x0000005179c00000] [id=16524]
0x000002257af551a0 GCTaskThread "GC Thread#5" [stack: 0x0000005179c00000,0x0000005179d00000] [id=3664]
0x000002257af51ea0 GCTaskThread "GC Thread#6" [stack: 0x0000005179d00000,0x0000005179e00000] [id=16160]
0x000002257af534f0 GCTaskThread "GC Thread#7" [stack: 0x0000005179e00000,0x0000005179f00000] [id=14136]
0x000002256e88fa80 ConcurrentGCThread "G1 Main Marker" [stack: 0x0000005177c00000,0x0000005177d00000] [id=2952]
0x000002256e8906f0 ConcurrentGCThread "G1 Conc#0" [stack: 0x0000005177d00000,0x0000005177e00000] [id=6148]
0x000002257af54b40 ConcurrentGCThread "G1 Conc#1" [stack: 0x0000005179f00000,0x000000517a000000] [id=8824]
0x000002256e8f8c60 ConcurrentGCThread "G1 Refine#0" [stack: 0x0000005177e00000,0x0000005177f00000] [id=2460]
0x000002257b6ef9f0 ConcurrentGCThread "G1 Refine#1" [stack: 0x0000005179400000,0x0000005179500000] [id=2916]
0x000002257b6efd50 ConcurrentGCThread "G1 Refine#2" [stack: 0x0000005179500000,0x0000005179600000] [id=15184]
0x000002257b6f00b0 ConcurrentGCThread "G1 Refine#3" [stack: 0x0000005179600000,0x0000005179700000] [id=10480]
0x000002250f535480 ConcurrentGCThread "G1 Refine#4" [stack: 0x0000005177700000,0x0000005177800000] [id=8708]
0x000002250f536200 ConcurrentGCThread "G1 Refine#5" [stack: 0x0000005177800000,0x0000005177900000] [id=2300]
0x000002250f534dc0 ConcurrentGCThread "G1 Refine#6" [stack: 0x0000005177900000,0x0000005177a00000] [id=7800]
0x000002256e8f98e0 ConcurrentGCThread "G1 Young RemSet Sampling" [stack: 0x0000005177f00000,0x0000005178000000] [id=6548]
Threads with active compile tasks:
VM state: at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x000002256e83a3b0] Threads_lock - owner thread: 0x0000022579a517b0
[0x000002256e839ab0] Heap_lock - owner thread: 0x000002250f7af090
Heap address: 0x0000000083000000, size: 2000 MB, Compressed Oops mode: 32-bit
CDS disabled.
Compressed class space mapped at: 0x0000000100000000-0x0000000140000000, size: 1073741824
Narrow klass base: 0x0000000000000000, Narrow klass shift: 3, Narrow klass range: 0x140000000
GC Precious Log:
CPUs: 8 total, 8 available
Memory: 7995M
Large Page Support: Disabled
NUMA Support: Disabled
Compressed Oops: Enabled (32-bit)
Heap Region Size: 1M
Heap Min Capacity: 8M
Heap Initial Capacity: 126M
Heap Max Capacity: 2000M
Pre-touch: Disabled
Parallel Workers: 8
Concurrent Workers: 2
Concurrent Refinement Workers: 8
Periodic GC: Disabled
Heap:
garbage-first heap total 505856K, used 109623K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next)
| 0|0x0000000083000000, 0x0000000083100000, 0x0000000083100000|100%|HS| |TAMS 0x0000000083100000, 0x0000000083000000| Complete
| 1|0x0000000083100000, 0x0000000083200000, 0x0000000083200000|100%| O| |TAMS 0x0000000083200000, 0x0000000083100000| Untracked
| 2|0x0000000083200000, 0x0000000083300000, 0x0000000083300000|100%| O| |TAMS 0x0000000083300000, 0x0000000083200000| Untracked
| 3|0x0000000083300000, 0x0000000083400000, 0x0000000083400000|100%| O| |TAMS 0x0000000083400000, 0x0000000083300000| Untracked
| 4|0x0000000083400000, 0x0000000083500000, 0x0000000083500000|100%| O| |TAMS 0x0000000083500000, 0x0000000083400000| Untracked
| 5|0x0000000083500000, 0x0000000083600000, 0x0000000083600000|100%| O| |TAMS 0x0000000083600000, 0x0000000083500000| Untracked
| 6|0x0000000083600000, 0x0000000083700000, 0x0000000083700000|100%| O| |TAMS 0x0000000083700000, 0x0000000083600000| Untracked
| 7|0x0000000083700000, 0x0000000083800000, 0x0000000083800000|100%| O| |TAMS 0x0000000083800000, 0x0000000083700000| Untracked
| 8|0x0000000083800000, 0x0000000083900000, 0x0000000083900000|100%| O| |TAMS 0x0000000083900000, 0x0000000083800000| Untracked
| 9|0x0000000083900000, 0x00000000839ffff8, 0x0000000083a00000| 99%| O| |TAMS 0x0000000083900000, 0x0000000083900000| Untracked
| 10|0x0000000083a00000, 0x0000000083b00000, 0x0000000083b00000|100%| O| |TAMS 0x0000000083b00000, 0x0000000083a00000| Untracked
| 11|0x0000000083b00000, 0x0000000083c00000, 0x0000000083c00000|100%| O| |TAMS 0x0000000083c00000, 0x0000000083b00000| Untracked
| 12|0x0000000083c00000, 0x0000000083d00000, 0x0000000083d00000|100%| O| |TAMS 0x0000000083d00000, 0x0000000083c00000| Untracked
| 13|0x0000000083d00000, 0x0000000083e00000, 0x0000000083e00000|100%| O| |TAMS 0x0000000083e00000, 0x0000000083d00000| Untracked
| 14|0x0000000083e00000, 0x0000000083f00000, 0x0000000083f00000|100%| O| |TAMS 0x0000000083f00000, 0x0000000083e00000| Untracked
| 15|0x0000000083f00000, 0x0000000084000000, 0x0000000084000000|100%| O| |TAMS 0x0000000083f00000, 0x0000000083f00000| Untracked
| 16|0x0000000084000000, 0x0000000084100000, 0x0000000084100000|100%| O| |TAMS 0x0000000084000000, 0x0000000084000000| Untracked
| 17|0x0000000084100000, 0x0000000084200000, 0x0000000084200000|100%| O| |TAMS 0x0000000084100000, 0x0000000084100000| Untracked
| 18|0x0000000084200000, 0x0000000084201800, 0x0000000084300000| 0%| O| |TAMS 0x0000000084200000, 0x0000000084200000| Untracked
| 19|0x0000000084300000, 0x0000000084300000, 0x0000000084400000| 0%| F| |TAMS 0x0000000084300000, 0x0000000084300000| Untracked
| 20|0x0000000084400000, 0x0000000084400000, 0x0000000084500000| 0%| F| |TAMS 0x0000000084400000, 0x0000000084400000| Untracked
| 21|0x0000000084500000, 0x0000000084500000, 0x0000000084600000| 0%| F| |TAMS 0x0000000084500000, 0x0000000084500000| Untracked
| 22|0x0000000084600000, 0x0000000084700000, 0x0000000084700000|100%| O| |TAMS 0x0000000084700000, 0x0000000084600000| Untracked
| 23|0x0000000084700000, 0x0000000084800000, 0x0000000084800000|100%| O| |TAMS 0x0000000084800000, 0x0000000084700000| Untracked
| 24|0x0000000084800000, 0x0000000084800000, 0x0000000084900000| 0%| F| |TAMS 0x0000000084800000, 0x0000000084800000| Untracked
| 25|0x0000000084900000, 0x0000000084900000, 0x0000000084a00000| 0%| F| |TAMS 0x0000000084900000, 0x0000000084900000| Untracked
| 26|0x0000000084a00000, 0x0000000084b00000, 0x0000000084b00000|100%| O| |TAMS 0x0000000084b00000, 0x0000000084a00000| Untracked
| 27|0x0000000084b00000, 0x0000000084b00000, 0x0000000084c00000| 0%| F| |TAMS 0x0000000084b00000, 0x0000000084b00000| Untracked
| 28|0x0000000084c00000, 0x0000000084d00000, 0x0000000084d00000|100%| O| |TAMS 0x0000000084d00000, 0x0000000084c00000| Untracked
| 29|0x0000000084d00000, 0x0000000084d00000, 0x0000000084e00000| 0%| F| |TAMS 0x0000000084d00000, 0x0000000084d00000| Untracked
| 30|0x0000000084e00000, 0x0000000084f00000, 0x0000000084f00000|100%| O| |TAMS 0x0000000084f00000, 0x0000000084e00000| Untracked
| 31|0x0000000084f00000, 0x0000000084f00000, 0x0000000085000000| 0%| F| |TAMS 0x0000000084f00000, 0x0000000084f00000| Untracked
| 32|0x0000000085000000, 0x0000000085100000, 0x0000000085100000|100%| O| |TAMS 0x0000000085100000, 0x0000000085000000| Untracked
| 33|0x0000000085100000, 0x0000000085200000, 0x0000000085200000|100%| O| |TAMS 0x0000000085200000, 0x0000000085100000| Untracked
| 34|0x0000000085200000, 0x0000000085300000, 0x0000000085300000|100%| O| |TAMS 0x0000000085300000, 0x0000000085200000| Untracked
| 35|0x0000000085300000, 0x0000000085400000, 0x0000000085400000|100%| O| |TAMS 0x0000000085400000, 0x0000000085300000| Untracked
| 36|0x0000000085400000, 0x0000000085500000, 0x0000000085500000|100%| O| |TAMS 0x0000000085500000, 0x0000000085400000| Untracked
| 37|0x0000000085500000, 0x0000000085600000, 0x0000000085600000|100%| O| |TAMS 0x0000000085600000, 0x0000000085500000| Untracked
| 38|0x0000000085600000, 0x0000000085700000, 0x0000000085700000|100%| O| |TAMS 0x0000000085700000, 0x0000000085600000| Untracked
| 39|0x0000000085700000, 0x0000000085800000, 0x0000000085800000|100%| O| |TAMS 0x0000000085800000, 0x0000000085700000| Untracked
| 40|0x0000000085800000, 0x0000000085900000, 0x0000000085900000|100%| O| |TAMS 0x0000000085900000, 0x0000000085800000| Untracked
| 41|0x0000000085900000, 0x0000000085a00000, 0x0000000085a00000|100%| O| |TAMS 0x0000000085a00000, 0x0000000085900000| Untracked
| 42|0x0000000085a00000, 0x0000000085b00000, 0x0000000085b00000|100%| O| |TAMS 0x0000000085b00000, 0x0000000085a00000| Untracked
| 43|0x0000000085b00000, 0x0000000085c00000, 0x0000000085c00000|100%| O| |TAMS 0x0000000085c00000, 0x0000000085b00000| Untracked
| 44|0x0000000085c00000, 0x0000000085d00000, 0x0000000085d00000|100%| O| |TAMS 0x0000000085d00000, 0x0000000085c00000| Untracked
| 45|0x0000000085d00000, 0x0000000085d00000, 0x0000000085e00000| 0%| F| |TAMS 0x0000000085d00000, 0x0000000085d00000| Untracked
| 46|0x0000000085e00000, 0x0000000085e00000, 0x0000000085f00000| 0%| F| |TAMS 0x0000000085e00000, 0x0000000085e00000| Untracked
| 47|0x0000000085f00000, 0x0000000086000000, 0x0000000086000000|100%| O| |TAMS 0x0000000086000000, 0x0000000085f00000| Untracked
| 48|0x0000000086000000, 0x0000000086100000, 0x0000000086100000|100%| O| |TAMS 0x0000000086100000, 0x0000000086000000| Untracked
| 49|0x0000000086100000, 0x0000000086200000, 0x0000000086200000|100%| O| |TAMS 0x0000000086200000, 0x0000000086100000| Untracked
| 50|0x0000000086200000, 0x0000000086300000, 0x0000000086300000|100%| O| |TAMS 0x0000000086300000, 0x0000000086200000| Untracked
| 51|0x0000000086300000, 0x0000000086400000, 0x0000000086400000|100%| O| |TAMS 0x0000000086400000, 0x0000000086300000| Untracked
| 52|0x0000000086400000, 0x0000000086500000, 0x0000000086500000|100%| O| |TAMS 0x0000000086500000, 0x0000000086400000| Untracked
| 53|0x0000000086500000, 0x0000000086600000, 0x0000000086600000|100%| O| |TAMS 0x0000000086600000, 0x0000000086500000| Untracked
| 54|0x0000000086600000, 0x0000000086700000, 0x0000000086700000|100%| O| |TAMS 0x0000000086700000, 0x0000000086600000| Untracked
| 55|0x0000000086700000, 0x0000000086800000, 0x0000000086800000|100%| O| |TAMS 0x0000000086800000, 0x0000000086700000| Untracked
| 56|0x0000000086800000, 0x0000000086900000, 0x0000000086900000|100%| O| |TAMS 0x0000000086900000, 0x0000000086800000| Untracked
| 57|0x0000000086900000, 0x0000000086a00000, 0x0000000086a00000|100%| O| |TAMS 0x0000000086a00000, 0x0000000086900000| Untracked
| 58|0x0000000086a00000, 0x0000000086a00000, 0x0000000086b00000| 0%| F| |TAMS 0x0000000086a00000, 0x0000000086a00000| Untracked
| 59|0x0000000086b00000, 0x0000000086c00000, 0x0000000086c00000|100%| O| |TAMS 0x0000000086c00000, 0x0000000086b00000| Untracked
| 60|0x0000000086c00000, 0x0000000086d00000, 0x0000000086d00000|100%| O| |TAMS 0x0000000086d00000, 0x0000000086c00000| Untracked
| 61|0x0000000086d00000, 0x0000000086e00000, 0x0000000086e00000|100%| O| |TAMS 0x0000000086e00000, 0x0000000086d00000| Untracked
| 62|0x0000000086e00000, 0x0000000086f00000, 0x0000000086f00000|100%| O| |TAMS 0x0000000086f00000, 0x0000000086e00000| Untracked
| 63|0x0000000086f00000, 0x0000000086f00000, 0x0000000087000000| 0%| F| |TAMS 0x0000000086f00000, 0x0000000086f00000| Untracked
| 64|0x0000000087000000, 0x0000000087100000, 0x0000000087100000|100%| O| |TAMS 0x0000000087100000, 0x0000000087000000| Untracked
| 65|0x0000000087100000, 0x0000000087200000, 0x0000000087200000|100%| O| |TAMS 0x0000000087200000, 0x0000000087100000| Untracked
| 66|0x0000000087200000, 0x0000000087200000, 0x0000000087300000| 0%| F| |TAMS 0x0000000087200000, 0x0000000087200000| Untracked
| 67|0x0000000087300000, 0x0000000087300000, 0x0000000087400000| 0%| F| |TAMS 0x0000000087300000, 0x0000000087300000| Untracked
| 68|0x0000000087400000, 0x0000000087500000, 0x0000000087500000|100%| O| |TAMS 0x0000000087500000, 0x0000000087400000| Untracked
| 69|0x0000000087500000, 0x0000000087600000, 0x0000000087600000|100%| O| |TAMS 0x0000000087600000, 0x0000000087500000| Untracked
| 70|0x0000000087600000, 0x0000000087600000, 0x0000000087700000| 0%| F| |TAMS 0x0000000087600000, 0x0000000087600000| Untracked
| 71|0x0000000087700000, 0x0000000087800000, 0x0000000087800000|100%| O| |TAMS 0x0000000087800000, 0x0000000087700000| Untracked
| 72|0x0000000087800000, 0x0000000087900000, 0x0000000087900000|100%| O| |TAMS 0x0000000087900000, 0x0000000087800000| Untracked
| 73|0x0000000087900000, 0x0000000087a00000, 0x0000000087a00000|100%| O| |TAMS 0x0000000087a00000, 0x0000000087900000| Untracked
| 74|0x0000000087a00000, 0x0000000087b00000, 0x0000000087b00000|100%| O| |TAMS 0x0000000087b00000, 0x0000000087a00000| Untracked
| 75|0x0000000087b00000, 0x0000000087c00000, 0x0000000087c00000|100%| O| |TAMS 0x0000000087c00000, 0x0000000087b00000| Untracked
| 76|0x0000000087c00000, 0x0000000087d00000, 0x0000000087d00000|100%| O| |TAMS 0x0000000087d00000, 0x0000000087c00000| Untracked
| 77|0x0000000087d00000, 0x0000000087e00000, 0x0000000087e00000|100%| O| |TAMS 0x0000000087e00000, 0x0000000087d00000| Untracked
| 78|0x0000000087e00000, 0x0000000087e00000, 0x0000000087f00000| 0%| F| |TAMS 0x0000000087e00000, 0x0000000087e00000| Untracked
| 79|0x0000000087f00000, 0x0000000088000000, 0x0000000088000000|100%| O| |TAMS 0x0000000088000000, 0x0000000087f00000| Untracked
| 80|0x0000000088000000, 0x0000000088100000, 0x0000000088100000|100%| O| |TAMS 0x0000000088100000, 0x0000000088000000| Untracked
| 81|0x0000000088100000, 0x0000000088200000, 0x0000000088200000|100%| O| |TAMS 0x0000000088200000, 0x0000000088100000| Untracked
| 82|0x0000000088200000, 0x0000000088300000, 0x0000000088300000|100%| O| |TAMS 0x0000000088300000, 0x0000000088200000| Untracked
| 83|0x0000000088300000, 0x0000000088400000, 0x0000000088400000|100%| O| |TAMS 0x0000000088400000, 0x0000000088300000| Untracked
| 84|0x0000000088400000, 0x0000000088400000, 0x0000000088500000| 0%| F| |TAMS 0x0000000088400000, 0x0000000088400000| Untracked
| 85|0x0000000088500000, 0x0000000088600000, 0x0000000088600000|100%| O| |TAMS 0x0000000088600000, 0x0000000088500000| Untracked
| 86|0x0000000088600000, 0x0000000088700000, 0x0000000088700000|100%| O| |TAMS 0x0000000088700000, 0x0000000088600000| Untracked
| 87|0x0000000088700000, 0x0000000088700000, 0x0000000088800000| 0%| F| |TAMS 0x0000000088700000, 0x0000000088700000| Untracked
| 88|0x0000000088800000, 0x0000000088900000, 0x0000000088900000|100%| O| |TAMS 0x0000000088900000, 0x0000000088800000| Untracked
| 89|0x0000000088900000, 0x0000000088a00000, 0x0000000088a00000|100%| O| |TAMS 0x0000000088a00000, 0x0000000088900000| Untracked
| 90|0x0000000088a00000, 0x0000000088b00000, 0x0000000088b00000|100%| O| |TAMS 0x0000000088b00000, 0x0000000088a00000| Untracked
| 91|0x0000000088b00000, 0x0000000088c00000, 0x0000000088c00000|100%| O| |TAMS 0x0000000088c00000, 0x0000000088b00000| Untracked
| 92|0x0000000088c00000, 0x0000000088d00000, 0x0000000088d00000|100%| O| |TAMS 0x0000000088d00000, 0x0000000088c00000| Untracked
| 93|0x0000000088d00000, 0x0000000088e00000, 0x0000000088e00000|100%| O| |TAMS 0x0000000088e00000, 0x0000000088d00000| Untracked
| 94|0x0000000088e00000, 0x0000000088f00000, 0x0000000088f00000|100%| O| |TAMS 0x0000000088f00000, 0x0000000088e00000| Untracked
| 95|0x0000000088f00000, 0x0000000089000000, 0x0000000089000000|100%| O| |TAMS 0x0000000089000000, 0x0000000088f00000| Untracked
| 96|0x0000000089000000, 0x0000000089100000, 0x0000000089100000|100%| O| |TAMS 0x0000000089100000, 0x0000000089000000| Untracked
| 97|0x0000000089100000, 0x0000000089200000, 0x0000000089200000|100%| O| |TAMS 0x0000000089200000, 0x0000000089100000| Untracked
| 98|0x0000000089200000, 0x0000000089300000, 0x0000000089300000|100%| O| |TAMS 0x0000000089300000, 0x0000000089200000| Untracked
| 99|0x0000000089300000, 0x0000000089400000, 0x0000000089400000|100%| O| |TAMS 0x0000000089400000, 0x0000000089300000| Untracked
| 100|0x0000000089400000, 0x0000000089500000, 0x0000000089500000|100%| O| |TAMS 0x0000000089500000, 0x0000000089400000| Untracked
| 101|0x0000000089500000, 0x0000000089600000, 0x0000000089600000|100%| O| |TAMS 0x0000000089600000, 0x0000000089500000| Untracked
| 102|0x0000000089600000, 0x0000000089700000, 0x0000000089700000|100%| O| |TAMS 0x0000000089700000, 0x0000000089600000| Untracked
| 103|0x0000000089700000, 0x0000000089800000, 0x0000000089800000|100%| O| |TAMS 0x0000000089800000, 0x0000000089700000| Untracked
| 104|0x0000000089800000, 0x0000000089900000, 0x0000000089900000|100%| O| |TAMS 0x0000000089900000, 0x0000000089800000| Untracked
| 105|0x0000000089900000, 0x0000000089a00000, 0x0000000089a00000|100%| O| |TAMS 0x0000000089a00000, 0x0000000089900000| Untracked
| 106|0x0000000089a00000, 0x0000000089a00000, 0x0000000089b00000| 0%| F| |TAMS 0x0000000089a00000, 0x0000000089a00000| Untracked
| 107|0x0000000089b00000, 0x0000000089b00000, 0x0000000089c00000| 0%| F| |TAMS 0x0000000089b00000, 0x0000000089b00000| Untracked
| 108|0x0000000089c00000, 0x0000000089d00000, 0x0000000089d00000|100%| O| |TAMS 0x0000000089d00000, 0x0000000089c00000| Untracked
| 109|0x0000000089d00000, 0x0000000089e00000, 0x0000000089e00000|100%| O| |TAMS 0x0000000089e00000, 0x0000000089d00000| Untracked
| 110|0x0000000089e00000, 0x0000000089f00000, 0x0000000089f00000|100%| O| |TAMS 0x0000000089f00000, 0x0000000089e00000| Untracked
| 111|0x0000000089f00000, 0x000000008a000000, 0x000000008a000000|100%| O| |TAMS 0x000000008a000000, 0x0000000089f00000| Untracked
| 112|0x000000008a000000, 0x000000008a100000, 0x000000008a100000|100%| O| |TAMS 0x000000008a0d5800, 0x000000008a000000| Untracked
| 113|0x000000008a100000, 0x000000008a200000, 0x000000008a200000|100%| O| |TAMS 0x000000008a100000, 0x000000008a100000| Untracked
| 114|0x000000008a200000, 0x000000008a300000, 0x000000008a300000|100%| O| |TAMS 0x000000008a200000, 0x000000008a200000| Untracked
| 115|0x000000008a300000, 0x000000008a400000, 0x000000008a400000|100%| O| |TAMS 0x000000008a300000, 0x000000008a300000| Untracked
| 116|0x000000008a400000, 0x000000008a500000, 0x000000008a500000|100%| O| |TAMS 0x000000008a400000, 0x000000008a400000| Untracked
| 117|0x000000008a500000, 0x000000008a600000, 0x000000008a600000|100%| O| |TAMS 0x000000008a500000, 0x000000008a500000| Untracked
| 118|0x000000008a600000, 0x000000008a700000, 0x000000008a700000|100%| O| |TAMS 0x000000008a600000, 0x000000008a600000| Untracked
| 119|0x000000008a700000, 0x000000008a800000, 0x000000008a800000|100%| O| |TAMS 0x000000008a700000, 0x000000008a700000| Untracked
| 120|0x000000008a800000, 0x000000008a900000, 0x000000008a900000|100%| O| |TAMS 0x000000008a800000, 0x000000008a800000| Untracked
| 121|0x000000008a900000, 0x000000008aa00000, 0x000000008aa00000|100%| O| |TAMS 0x000000008a900000, 0x000000008a900000| Untracked
| 122|0x000000008aa00000, 0x000000008ab00000, 0x000000008ab00000|100%| O| |TAMS 0x000000008aa00000, 0x000000008aa00000| Untracked
| 123|0x000000008ab00000, 0x000000008ac00000, 0x000000008ac00000|100%| O| |TAMS 0x000000008ab00000, 0x000000008ab00000| Untracked
| 124|0x000000008ac00000, 0x000000008ad00000, 0x000000008ad00000|100%| O| |TAMS 0x000000008ac00000, 0x000000008ac00000| Untracked
| 125|0x000000008ad00000, 0x000000008ae00000, 0x000000008ae00000|100%| O| |TAMS 0x000000008ad00000, 0x000000008ad00000| Untracked
| 126|0x000000008ae00000, 0x000000008af00000, 0x000000008af00000|100%| O| |TAMS 0x000000008ae00000, 0x000000008ae00000| Untracked
| 127|0x000000008af00000, 0x000000008b000000, 0x000000008b000000|100%| O| |TAMS 0x000000008af00000, 0x000000008af00000| Untracked
| 128|0x000000008b000000, 0x000000008b000000, 0x000000008b100000| 0%| F| |TAMS 0x000000008b000000, 0x000000008b000000| Untracked
| 129|0x000000008b100000, 0x000000008b100000, 0x000000008b200000| 0%| F| |TAMS 0x000000008b100000, 0x000000008b100000| Untracked
| 130|0x000000008b200000, 0x000000008b200000, 0x000000008b300000| 0%| F| |TAMS 0x000000008b200000, 0x000000008b200000| Untracked
| 131|0x000000008b300000, 0x000000008b300000, 0x000000008b400000| 0%| F| |TAMS 0x000000008b300000, 0x000000008b300000| Untracked
| 132|0x000000008b400000, 0x000000008b400000, 0x000000008b500000| 0%| F| |TAMS 0x000000008b400000, 0x000000008b400000| Untracked
| 133|0x000000008b500000, 0x000000008b500000, 0x000000008b600000| 0%| F| |TAMS 0x000000008b500000, 0x000000008b500000| Untracked
| 134|0x000000008b600000, 0x000000008b600000, 0x000000008b700000| 0%| F| |TAMS 0x000000008b600000, 0x000000008b600000| Untracked
| 135|0x000000008b700000, 0x000000008b700000, 0x000000008b800000| 0%| F| |TAMS 0x000000008b700000, 0x000000008b700000| Untracked
| 136|0x000000008b800000, 0x000000008b800000, 0x000000008b900000| 0%| F| |TAMS 0x000000008b800000, 0x000000008b800000| Untracked
| 137|0x000000008b900000, 0x000000008b900000, 0x000000008ba00000| 0%| F| |TAMS 0x000000008b900000, 0x000000008b900000| Untracked
| 138|0x000000008ba00000, 0x000000008ba00000, 0x000000008bb00000| 0%| F| |TAMS 0x000000008ba00000, 0x000000008ba00000| Untracked
| 139|0x000000008bb00000, 0x000000008bb00000, 0x000000008bc00000| 0%| F| |TAMS 0x000000008bb00000, 0x000000008bb00000| Untracked
| 140|0x000000008bc00000, 0x000000008bc00000, 0x000000008bd00000| 0%| F| |TAMS 0x000000008bc00000, 0x000000008bc00000| Untracked
| 141|0x000000008bd00000, 0x000000008bd00000, 0x000000008be00000| 0%| F| |TAMS 0x000000008bd00000, 0x000000008bd00000| Untracked
| 142|0x000000008be00000, 0x000000008be00000, 0x000000008bf00000| 0%| F| |TAMS 0x000000008be00000, 0x000000008be00000| Untracked
| 143|0x000000008bf00000, 0x000000008bf00000, 0x000000008c000000| 0%| F| |TAMS 0x000000008bf00000, 0x000000008bf00000| Untracked
| 144|0x000000008c000000, 0x000000008c000000, 0x000000008c100000| 0%| F| |TAMS 0x000000008c000000, 0x000000008c000000| Untracked
| 145|0x000000008c100000, 0x000000008c100000, 0x000000008c200000| 0%| F| |TAMS 0x000000008c100000, 0x000000008c100000| Untracked
| 146|0x000000008c200000, 0x000000008c200000, 0x000000008c300000| 0%| F| |TAMS 0x000000008c200000, 0x000000008c200000| Untracked
| 147|0x000000008c300000, 0x000000008c300000, 0x000000008c400000| 0%| F| |TAMS 0x000000008c300000, 0x000000008c300000| Untracked
| 148|0x000000008c400000, 0x000000008c400000, 0x000000008c500000| 0%| F| |TAMS 0x000000008c400000, 0x000000008c400000| Untracked
| 149|0x000000008c500000, 0x000000008c500000, 0x000000008c600000| 0%| F| |TAMS 0x000000008c500000, 0x000000008c500000| Untracked
| 150|0x000000008c600000, 0x000000008c600000, 0x000000008c700000| 0%| F| |TAMS 0x000000008c600000, 0x000000008c600000| Untracked
| 151|0x000000008c700000, 0x000000008c700000, 0x000000008c800000| 0%| F| |TAMS 0x000000008c700000, 0x000000008c700000| Untracked
| 152|0x000000008c800000, 0x000000008c800000, 0x000000008c900000| 0%| F| |TAMS 0x000000008c800000, 0x000000008c800000| Untracked
| 153|0x000000008c900000, 0x000000008c900000, 0x000000008ca00000| 0%| F| |TAMS 0x000000008c900000, 0x000000008c900000| Untracked
| 154|0x000000008ca00000, 0x000000008ca00000, 0x000000008cb00000| 0%| F| |TAMS 0x000000008ca00000, 0x000000008ca00000| Untracked
| 155|0x000000008cb00000, 0x000000008cb00000, 0x000000008cc00000| 0%| F| |TAMS 0x000000008cb00000, 0x000000008cb00000| Untracked
| 156|0x000000008cc00000, 0x000000008cc00000, 0x000000008cd00000| 0%| F| |TAMS 0x000000008cc00000, 0x000000008cc00000| Untracked
| 157|0x000000008cd00000, 0x000000008cd00000, 0x000000008ce00000| 0%| F| |TAMS 0x000000008cd00000, 0x000000008cd00000| Untracked
| 158|0x000000008ce00000, 0x000000008ce00000, 0x000000008cf00000| 0%| F| |TAMS 0x000000008ce00000, 0x000000008ce00000| Untracked
| 159|0x000000008cf00000, 0x000000008cf00000, 0x000000008d000000| 0%| F| |TAMS 0x000000008cf00000, 0x000000008cf00000| Untracked
| 160|0x000000008d000000, 0x000000008d000000, 0x000000008d100000| 0%| F| |TAMS 0x000000008d000000, 0x000000008d000000| Untracked
| 161|0x000000008d100000, 0x000000008d100000, 0x000000008d200000| 0%| F| |TAMS 0x000000008d100000, 0x000000008d100000| Untracked
| 162|0x000000008d200000, 0x000000008d200000, 0x000000008d300000| 0%| F| |TAMS 0x000000008d200000, 0x000000008d200000| Untracked
| 163|0x000000008d300000, 0x000000008d300000, 0x000000008d400000| 0%| F| |TAMS 0x000000008d300000, 0x000000008d300000| Untracked
| 164|0x000000008d400000, 0x000000008d400000, 0x000000008d500000| 0%| F| |TAMS 0x000000008d400000, 0x000000008d400000| Untracked
| 165|0x000000008d500000, 0x000000008d500000, 0x000000008d600000| 0%| F| |TAMS 0x000000008d500000, 0x000000008d500000| Untracked
| 166|0x000000008d600000, 0x000000008d600000, 0x000000008d700000| 0%| F| |TAMS 0x000000008d600000, 0x000000008d600000| Untracked
| 167|0x000000008d700000, 0x000000008d700000, 0x000000008d800000| 0%| F| |TAMS 0x000000008d700000, 0x000000008d700000| Untracked
| 168|0x000000008d800000, 0x000000008d800000, 0x000000008d900000| 0%| F| |TAMS 0x000000008d800000, 0x000000008d800000| Untracked
| 169|0x000000008d900000, 0x000000008d900000, 0x000000008da00000| 0%| F| |TAMS 0x000000008d900000, 0x000000008d900000| Untracked
| 170|0x000000008da00000, 0x000000008da00000, 0x000000008db00000| 0%| F| |TAMS 0x000000008da00000, 0x000000008da00000| Untracked
| 171|0x000000008db00000, 0x000000008db00000, 0x000000008dc00000| 0%| F| |TAMS 0x000000008db00000, 0x000000008db00000| Untracked
| 172|0x000000008dc00000, 0x000000008dc00000, 0x000000008dd00000| 0%| F| |TAMS 0x000000008dc00000, 0x000000008dc00000| Untracked
| 173|0x000000008dd00000, 0x000000008dd00000, 0x000000008de00000| 0%| F| |TAMS 0x000000008dd00000, 0x000000008dd00000| Untracked
| 174|0x000000008de00000, 0x000000008de00000, 0x000000008df00000| 0%| F| |TAMS 0x000000008de00000, 0x000000008de00000| Untracked
| 175|0x000000008df00000, 0x000000008df00000, 0x000000008e000000| 0%| F| |TAMS 0x000000008df00000, 0x000000008df00000| Untracked
| 176|0x000000008e000000, 0x000000008e000000, 0x000000008e100000| 0%| F| |TAMS 0x000000008e000000, 0x000000008e000000| Untracked
| 177|0x000000008e100000, 0x000000008e100000, 0x000000008e200000| 0%| F| |TAMS 0x000000008e100000, 0x000000008e100000| Untracked
| 178|0x000000008e200000, 0x000000008e200000, 0x000000008e300000| 0%| F| |TAMS 0x000000008e200000, 0x000000008e200000| Untracked
| 179|0x000000008e300000, 0x000000008e300000, 0x000000008e400000| 0%| F| |TAMS 0x000000008e300000, 0x000000008e300000| Untracked
| 180|0x000000008e400000, 0x000000008e400000, 0x000000008e500000| 0%| F| |TAMS 0x000000008e400000, 0x000000008e400000| Untracked
| 181|0x000000008e500000, 0x000000008e500000, 0x000000008e600000| 0%| F| |TAMS 0x000000008e500000, 0x000000008e500000| Untracked
| 182|0x000000008e600000, 0x000000008e600000, 0x000000008e700000| 0%| F| |TAMS 0x000000008e600000, 0x000000008e600000| Untracked
| 183|0x000000008e700000, 0x000000008e700000, 0x000000008e800000| 0%| F| |TAMS 0x000000008e700000, 0x000000008e700000| Untracked
| 184|0x000000008e800000, 0x000000008e800000, 0x000000008e900000| 0%| F| |TAMS 0x000000008e800000, 0x000000008e800000| Untracked
| 185|0x000000008e900000, 0x000000008e900000, 0x000000008ea00000| 0%| F| |TAMS 0x000000008e900000, 0x000000008e900000| Untracked
| 186|0x000000008ea00000, 0x000000008ea00000, 0x000000008eb00000| 0%| F| |TAMS 0x000000008ea00000, 0x000000008ea00000| Untracked
| 187|0x000000008eb00000, 0x000000008eb00000, 0x000000008ec00000| 0%| F| |TAMS 0x000000008eb00000, 0x000000008eb00000| Untracked
| 188|0x000000008ec00000, 0x000000008ec00000, 0x000000008ed00000| 0%| F| |TAMS 0x000000008ec00000, 0x000000008ec00000| Untracked
| 189|0x000000008ed00000, 0x000000008ed00000, 0x000000008ee00000| 0%| F| |TAMS 0x000000008ed00000, 0x000000008ed00000| Untracked
| 190|0x000000008ee00000, 0x000000008ee00000, 0x000000008ef00000| 0%| F| |TAMS 0x000000008ee00000, 0x000000008ee00000| Untracked
| 191|0x000000008ef00000, 0x000000008ef00000, 0x000000008f000000| 0%| F| |TAMS 0x000000008ef00000, 0x000000008ef00000| Untracked
| 192|0x000000008f000000, 0x000000008f000000, 0x000000008f100000| 0%| F| |TAMS 0x000000008f000000, 0x000000008f000000| Untracked
| 193|0x000000008f100000, 0x000000008f100000, 0x000000008f200000| 0%| F| |TAMS 0x000000008f100000, 0x000000008f100000| Untracked
| 194|0x000000008f200000, 0x000000008f200000, 0x000000008f300000| 0%| F| |TAMS 0x000000008f200000, 0x000000008f200000| Untracked
| 195|0x000000008f300000, 0x000000008f300000, 0x000000008f400000| 0%| F| |TAMS 0x000000008f300000, 0x000000008f300000| Untracked
| 196|0x000000008f400000, 0x000000008f400000, 0x000000008f500000| 0%| F| |TAMS 0x000000008f400000, 0x000000008f400000| Untracked
| 197|0x000000008f500000, 0x000000008f500000, 0x000000008f600000| 0%| F| |TAMS 0x000000008f500000, 0x000000008f500000| Untracked
| 198|0x000000008f600000, 0x000000008f600000, 0x000000008f700000| 0%| F| |TAMS 0x000000008f600000, 0x000000008f600000| Untracked
| 199|0x000000008f700000, 0x000000008f700000, 0x000000008f800000| 0%| F| |TAMS 0x000000008f700000, 0x000000008f700000| Untracked
| 200|0x000000008f800000, 0x000000008f800000, 0x000000008f900000| 0%| F| |TAMS 0x000000008f800000, 0x000000008f800000| Untracked
| 201|0x000000008f900000, 0x000000008f900000, 0x000000008fa00000| 0%| F| |TAMS 0x000000008f900000, 0x000000008f900000| Untracked
| 202|0x000000008fa00000, 0x000000008fa00000, 0x000000008fb00000| 0%| F| |TAMS 0x000000008fa00000, 0x000000008fa00000| Untracked
| 203|0x000000008fb00000, 0x000000008fb00000, 0x000000008fc00000| 0%| F| |TAMS 0x000000008fb00000, 0x000000008fb00000| Untracked
| 204|0x000000008fc00000, 0x000000008fc00000, 0x000000008fd00000| 0%| F| |TAMS 0x000000008fc00000, 0x000000008fc00000| Untracked
| 205|0x000000008fd00000, 0x000000008fd00000, 0x000000008fe00000| 0%| F| |TAMS 0x000000008fd00000, 0x000000008fd00000| Untracked
| 206|0x000000008fe00000, 0x000000008fe00000, 0x000000008ff00000| 0%| F| |TAMS 0x000000008fe00000, 0x000000008fe00000| Untracked
| 207|0x000000008ff00000, 0x000000008ff00000, 0x0000000090000000| 0%| F| |TAMS 0x000000008ff00000, 0x000000008ff00000| Untracked
| 208|0x0000000090000000, 0x0000000090000000, 0x0000000090100000| 0%| F| |TAMS 0x0000000090000000, 0x0000000090000000| Untracked
| 209|0x0000000090100000, 0x0000000090100000, 0x0000000090200000| 0%| F| |TAMS 0x0000000090100000, 0x0000000090100000| Untracked
| 210|0x0000000090200000, 0x0000000090200000, 0x0000000090300000| 0%| F| |TAMS 0x0000000090200000, 0x0000000090200000| Untracked
| 211|0x0000000090300000, 0x0000000090300000, 0x0000000090400000| 0%| F| |TAMS 0x0000000090300000, 0x0000000090300000| Untracked
| 212|0x0000000090400000, 0x0000000090400000, 0x0000000090500000| 0%| F| |TAMS 0x0000000090400000, 0x0000000090400000| Untracked
| 213|0x0000000090500000, 0x0000000090500000, 0x0000000090600000| 0%| F| |TAMS 0x0000000090500000, 0x0000000090500000| Untracked
| 214|0x0000000090600000, 0x0000000090600000, 0x0000000090700000| 0%| F| |TAMS 0x0000000090600000, 0x0000000090600000| Untracked
| 215|0x0000000090700000, 0x0000000090700000, 0x0000000090800000| 0%| F| |TAMS 0x0000000090700000, 0x0000000090700000| Untracked
| 216|0x0000000090800000, 0x0000000090800000, 0x0000000090900000| 0%| F| |TAMS 0x0000000090800000, 0x0000000090800000| Untracked
| 217|0x0000000090900000, 0x0000000090900000, 0x0000000090a00000| 0%| F| |TAMS 0x0000000090900000, 0x0000000090900000| Untracked
| 218|0x0000000090a00000, 0x0000000090a00000, 0x0000000090b00000| 0%| F| |TAMS 0x0000000090a00000, 0x0000000090a00000| Untracked
| 219|0x0000000090b00000, 0x0000000090b00000, 0x0000000090c00000| 0%| F| |TAMS 0x0000000090b00000, 0x0000000090b00000| Untracked
| 220|0x0000000090c00000, 0x0000000090c00000, 0x0000000090d00000| 0%| F| |TAMS 0x0000000090c00000, 0x0000000090c00000| Untracked
| 221|0x0000000090d00000, 0x0000000090d00000, 0x0000000090e00000| 0%| F| |TAMS 0x0000000090d00000, 0x0000000090d00000| Untracked
| 222|0x0000000090e00000, 0x0000000090e00000, 0x0000000090f00000| 0%| F| |TAMS 0x0000000090e00000, 0x0000000090e00000| Untracked
| 223|0x0000000090f00000, 0x0000000090f00000, 0x0000000091000000| 0%| F| |TAMS 0x0000000090f00000, 0x0000000090f00000| Untracked
| 224|0x0000000091000000, 0x0000000091000000, 0x0000000091100000| 0%| F| |TAMS 0x0000000091000000, 0x0000000091000000| Untracked
| 225|0x0000000091100000, 0x0000000091100000, 0x0000000091200000| 0%| F| |TAMS 0x0000000091100000, 0x0000000091100000| Untracked
| 226|0x0000000091200000, 0x0000000091200000, 0x0000000091300000| 0%| F| |TAMS 0x0000000091200000, 0x0000000091200000| Untracked
| 227|0x0000000091300000, 0x0000000091300000, 0x0000000091400000| 0%| F| |TAMS 0x0000000091300000, 0x0000000091300000| Untracked
| 228|0x0000000091400000, 0x0000000091400000, 0x0000000091500000| 0%| F| |TAMS 0x0000000091400000, 0x0000000091400000| Untracked
| 229|0x0000000091500000, 0x0000000091500000, 0x0000000091600000| 0%| F| |TAMS 0x0000000091500000, 0x0000000091500000| Untracked
| 230|0x0000000091600000, 0x0000000091600000, 0x0000000091700000| 0%| F| |TAMS 0x0000000091600000, 0x0000000091600000| Untracked
| 231|0x0000000091700000, 0x0000000091700000, 0x0000000091800000| 0%| F| |TAMS 0x0000000091700000, 0x0000000091700000| Untracked
| 232|0x0000000091800000, 0x0000000091800000, 0x0000000091900000| 0%| F| |TAMS 0x0000000091800000, 0x0000000091800000| Untracked
| 233|0x0000000091900000, 0x0000000091900000, 0x0000000091a00000| 0%| F| |TAMS 0x0000000091900000, 0x0000000091900000| Untracked
| 234|0x0000000091a00000, 0x0000000091a00000, 0x0000000091b00000| 0%| F| |TAMS 0x0000000091a00000, 0x0000000091a00000| Untracked
| 235|0x0000000091b00000, 0x0000000091b0c6f0, 0x0000000091c00000| 4%| S|CS|TAMS 0x0000000091b00000, 0x0000000091b00000| Complete
| 236|0x0000000091c00000, 0x0000000091c00000, 0x0000000091d00000| 0%| F| |TAMS 0x0000000091c00000, 0x0000000091c00000| Untracked
| 237|0x0000000091d00000, 0x0000000091d00000, 0x0000000091e00000| 0%| F| |TAMS 0x0000000091d00000, 0x0000000091d00000| Untracked
| 238|0x0000000091e00000, 0x0000000091e00000, 0x0000000091f00000| 0%| F| |TAMS 0x0000000091e00000, 0x0000000091e00000| Untracked
| 239|0x0000000091f00000, 0x0000000091f00000, 0x0000000092000000| 0%| F| |TAMS 0x0000000091f00000, 0x0000000091f00000| Untracked
| 240|0x0000000092000000, 0x0000000092000000, 0x0000000092100000| 0%| F| |TAMS 0x0000000092000000, 0x0000000092000000| Untracked
| 241|0x0000000092100000, 0x0000000092100000, 0x0000000092200000| 0%| F| |TAMS 0x0000000092100000, 0x0000000092100000| Untracked
| 242|0x0000000092200000, 0x0000000092200000, 0x0000000092300000| 0%| F| |TAMS 0x0000000092200000, 0x0000000092200000| Untracked
| 243|0x0000000092300000, 0x0000000092300000, 0x0000000092400000| 0%| F| |TAMS 0x0000000092300000, 0x0000000092300000| Untracked
| 244|0x0000000092400000, 0x0000000092400000, 0x0000000092500000| 0%| F| |TAMS 0x0000000092400000, 0x0000000092400000| Untracked
| 245|0x0000000092500000, 0x0000000092500000, 0x0000000092600000| 0%| F| |TAMS 0x0000000092500000, 0x0000000092500000| Untracked
| 246|0x0000000092600000, 0x0000000092600000, 0x0000000092700000| 0%| F| |TAMS 0x0000000092600000, 0x0000000092600000| Untracked
Card table byte_map: [0x0000022572960000,0x0000022572d50000] _byte_map_base: 0x0000022572548000
Marking Bits (Prev, Next): (CMBitMap*) 0x000002256e87eec0, (CMBitMap*) 0x000002256e87ee80
Prev Bits: [0x0000022575080000, 0x0000022576fc0000)
Next Bits: [0x0000022573140000, 0x0000022575080000)
Polling page: 0x000002256e000000
Metaspace:
Usage:
Non-class: 90.02 MB capacity, 89.02 MB ( 99%) used, 826.88 KB ( <1%) free+waste, 193.69 KB ( <1%) overhead.
Class: 13.68 MB capacity, 13.16 MB ( 96%) used, 446.24 KB ( 3%) free+waste, 79.12 KB ( <1%) overhead.
Both: 103.70 MB capacity, 102.19 MB ( 99%) used, 1.24 MB ( 1%) free+waste, 272.81 KB ( <1%) overhead.
Virtual space:
Non-class space: 92.00 MB reserved, 90.17 MB ( 98%) committed
Class space: 1.00 GB reserved, 13.75 MB ( 1%) committed
Both: 1.09 GB reserved, 103.92 MB ( 9%) committed
Chunk freelists:
Non-Class: 26.00 KB
Class: 12.00 KB
Both: 38.00 KB
MaxMetaspaceSize: 17179869184.00 GB
CompressedClassSpaceSize: 1.00 GB
CodeHeap 'non-profiled nmethods': size=238336Kb used=29635Kb max_used=29635Kb free=208700Kb
bounds [0x0000022500740000, 0x0000022502440000, 0x000002250f000000]
CodeHeap 'non-nmethods': size=7424Kb used=1403Kb max_used=1403Kb free=6020Kb
bounds [0x0000022500000000, 0x0000022500270000, 0x0000022500740000]
total_blobs=18391 nmethods=17678 adapters=639
compilation: enabled
stopped_count=0, restarted_count=0
full_count=0
Compilation events (20 events):
Event: 5890.706 Thread 0x000002257a2c59e0 18301 ! 1 sun.rmi.transport.Transport::serviceCall (349 bytes)
Event: 5891.217 Thread 0x000002257a2c59e0 nmethod 18301 0x0000022502426710 code [0x0000022502426ce0, 0x0000022502428b28]
Event: 5950.695 Thread 0x000002257a2c59e0 18309 1 sun.rmi.server.UnicastServerRef::unmarshalCustomCallData (31 bytes)
Event: 5950.702 Thread 0x000002257a2c59e0 nmethod 18309 0x000002250242ae10 code [0x000002250242afe0, 0x000002250242b288]
Event: 5950.702 Thread 0x000002257a2c59e0 18310 1 sun.rmi.transport.ConnectionInputStream::registerRefs (71 bytes)
Event: 5950.716 Thread 0x000002257a2c59e0 nmethod 18310 0x000002250242b410 code [0x000002250242b620, 0x000002250242b938]
Event: 5950.716 Thread 0x000002257a2c59e0 18311 ! 1 sun.rmi.transport.ConnectionInputStream::done (145 bytes)
Event: 5950.737 Thread 0x000002257a2c59e0 nmethod 18311 0x000002250242bb10 code [0x000002250242bde0, 0x000002250242d028]
Event: 6010.700 Thread 0x000002257a2c59e0 18312 1 java.net.InetSocketAddress::getAddress (8 bytes)
Event: 6010.700 Thread 0x000002257a2c59e0 nmethod 18312 0x000002250242db10 code [0x000002250242dca0, 0x000002250242dd58]
Event: 6265.740 Thread 0x000002257a2c59e0 18313 s! 1 java.net.Socket::close (47 bytes)
Event: 6265.740 Thread 0x000002257a2c59e0 nmethod 18313 0x000002250242de10 code [0x000002250242dfc0, 0x000002250242e2f8]
Event: 6360.856 Thread 0x000002257a2c59e0 18314 1 java.util.Collections::reverse (125 bytes)
Event: 6360.862 Thread 0x000002257a2c59e0 nmethod 18314 0x000002250242e490 code [0x000002250242e6c0, 0x000002250242ea48]
Event: 6490.769 Thread 0x000002257a2c59e0 18315 1 java.net.ServerSocket::isBound (5 bytes)
Event: 6490.769 Thread 0x000002257a2c59e0 nmethod 18315 0x000002250242ec90 code [0x000002250242ee20, 0x000002250242eed8]
Event: 6747.010 Thread 0x000002257a2c59e0 18316 1 java.util.concurrent.SynchronousQueue$TransferStack::awaitFulfill (169 bytes)
Event: 6747.383 Thread 0x000002257a2c59e0 nmethod 18316 0x000002250242ef90 code [0x000002250242f220, 0x000002250242ff98]
Event: 6793.452 Thread 0x000002257a2c59e0 18317 s 1 com.zaxxer.hikari.pool.HikariPool::fillPool (78 bytes)
Event: 6793.697 Thread 0x000002257a2c59e0 nmethod 18317 0x0000022502430590 code [0x0000022502430760, 0x0000022502430a28]
GC Heap History (20 events):
Event: 6175.390 GC heap after
{Heap after GC invocations=162 (full 0):
garbage-first heap total 252928K, used 109784K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6315.685 GC heap before
{Heap before GC invocations=162 (full 0):
garbage-first heap total 252928K, used 225496K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 114 young (116736K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6315.691 GC heap after
{Heap after GC invocations=163 (full 0):
garbage-first heap total 252928K, used 109802K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6452.947 GC heap before
{Heap before GC invocations=163 (full 0):
garbage-first heap total 252928K, used 225514K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 114 young (116736K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6452.951 GC heap after
{Heap after GC invocations=164 (full 0):
garbage-first heap total 252928K, used 109747K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6584.252 GC heap before
{Heap before GC invocations=164 (full 0):
garbage-first heap total 252928K, used 225459K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 114 young (116736K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6584.353 GC heap after
{Heap after GC invocations=165 (full 0):
garbage-first heap total 252928K, used 109779K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6724.122 GC heap before
{Heap before GC invocations=165 (full 0):
garbage-first heap total 252928K, used 225491K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 114 young (116736K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6724.302 GC heap after
{Heap after GC invocations=166 (full 0):
garbage-first heap total 252928K, used 109770K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6893.026 GC heap before
{Heap before GC invocations=166 (full 0):
garbage-first heap total 252928K, used 225482K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 114 young (116736K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6919.432 GC heap after
{Heap after GC invocations=167 (full 0):
garbage-first heap total 252928K, used 109731K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 6984.248 GC heap before
{Heap before GC invocations=167 (full 0):
garbage-first heap total 252928K, used 120995K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 12 young (12288K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7027.223 GC heap after
{Heap after GC invocations=168 (full 0):
garbage-first heap total 252928K, used 109826K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7084.006 GC heap before
{Heap before GC invocations=168 (full 0):
garbage-first heap total 252928K, used 121090K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 12 young (12288K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7087.733 GC heap after
{Heap after GC invocations=169 (full 0):
garbage-first heap total 252928K, used 109663K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7100.806 GC heap before
{Heap before GC invocations=169 (full 0):
garbage-first heap total 252928K, used 120927K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 12 young (12288K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7101.906 GC heap after
{Heap after GC invocations=170 (full 0):
garbage-first heap total 252928K, used 109704K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7117.151 GC heap before
{Heap before GC invocations=170 (full 0):
garbage-first heap total 252928K, used 120968K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 12 young (12288K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7120.742 GC heap after
{Heap after GC invocations=171 (full 0):
garbage-first heap total 252928K, used 109844K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 1 young (1024K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Event: 7174.869 GC heap before
{Heap before GC invocations=171 (full 0):
garbage-first heap total 252928K, used 121108K [0x0000000083000000, 0x0000000100000000)
region size 1024K, 12 young (12288K), 1 survivors (1024K)
Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K
class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K
}
Deoptimization events (18 events):
Event: 34.247 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a1433c sp=0x00000051798fccf0
Event: 34.247 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fc248 mode 0
Event: 41.141 Thread 0x000002257b705830 DEOPT PACKING pc=0x00000225011fa5dc sp=0x00000051798f5ec0
Event: 41.141 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f5360 mode 0
Event: 46.535 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a2d6d2 sp=0x00000051798f7600
Event: 46.535 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f6b08 mode 3
Event: 46.535 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a29b25 sp=0x00000051798f75c0
Event: 46.535 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f6b08 mode 3
Event: 53.173 Thread 0x000002257b705830 DEOPT PACKING pc=0x000002250188e47c sp=0x00000051798fbbd0
Event: 53.173 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fb128 mode 0
Event: 53.173 Thread 0x000002257b705830 DEOPT PACKING pc=0x000002250188e47c sp=0x00000051798fd390
Event: 53.173 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fc8e8 mode 0
Event: 53.710 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500cf2fa4 sp=0x00000051798fe0a0
Event: 53.710 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fd720 mode 0
Event: 55.827 Thread 0x000002257b705830 DEOPT PACKING pc=0x00000225008b00cc sp=0x00000051798fbeb0
Event: 55.827 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fb3d8 mode 0
Event: 534.201 Thread 0x000002250f7ac070 DEOPT PACKING pc=0x0000022501c44398 sp=0x000000517b0fe110
Event: 534.205 Thread 0x000002250f7ac070 DEOPT UNPACKING pc=0x000002250004e23f sp=0x000000517b0fd6b0 mode 3
Classes unloaded (14 events):
Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8dc40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor38'
Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8e040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor37'
Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8ec40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor36'
Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a88440 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor35'
Event: 50.471 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8a040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor39'
Event: 51.854 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor41'
Event: 51.854 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor40'
Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13440 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor48'
Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor47'
Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor46'
Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor45'
Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b14840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor44'
Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b15040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor43'
Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b15840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor42'
Classes redefined (0 events):
No events
Internal exceptions (20 events):
Event: 59.740 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x00000000907e7e00}: > (0x00000000907e7e00)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 59.792 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x00000000903c29d8}: > (0x00000000903c29d8)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 59.793 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x00000000903f4b48}: > (0x00000000903f4b48)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 59.921 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008fb7cc10}: > (0x000000008fb7cc10)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 59.922 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008fbaefc8}: > (0x000000008fbaefc8)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 59.946 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008faafc28}: > (0x000000008faafc28)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 59.946 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008fae1dd8}: > (0x000000008fae1dd8)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 60.015 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008f6728c8}: > (0x000000008f6728c8)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 60.016 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008f6a4c48}: > (0x000000008f6a4c48)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 60.169 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008ea5b1e0}: > (0x000000008ea5b1e0)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 60.170 Thread 0x000002257b705830 Exception <a 'java/lang/ClassNotFoundException'{0x000000008ea8d560}: > (0x000000008ea8d560)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Event: 72.831 Thread 0x000002250f7aff00 Exception <a 'java/lang/NoSuchMethodError'{0x0000000091460a98}: 'void java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, java.lang.Object, java.lang.Object)'> (0x0000000091460a98)
thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782]
Event: 1811.543 Thread 0x0000022511086690 Exception <a 'java/io/IOException'{0x000000008f781fa0}> (0x000000008f781fa0)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 578]
Event: 1963.220 Thread 0x000002250f7ac070 Exception <a 'java/lang/NoSuchMethodError'{0x0000000091f6b860}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.newInvokeSpecial(java.lang.Object, long)'> (0x0000000091f6b860)
thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782]
Event: 1963.220 Thread 0x000002250f7b1be0 Exception <a 'java/lang/NoSuchMethodError'{0x0000000091f6d478}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.newInvokeSpecial(java.lang.Object, long)'> (0x0000000091f6d478)
thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782]
Event: 1985.373 Thread 0x000002250f7ad3b0 Exception <a 'java/lang/ClassNotFoundException'{0x000000008cefe048}: java/lang/ObjectCustomizer> (0x000000008cefe048)
thrown [./open/src/hotspot/share/classfile/systemDictionary.cpp, line 295]
Event: 1985.382 Thread 0x000002250f7ad3b0 Exception <a 'java/lang/ClassNotFoundException'{0x000000008cd8d1a0}: com/realnet/entitybuilder/entity/frontendtableCustomizer> (0x000000008cd8d1a0)
thrown [./open/src/hotspot/share/classfile/systemDictionary.cpp, line 295]
Event: 3580.488 Thread 0x000002257c546460 Exception <a 'java/io/IOException'{0x000000008edaf398}> (0x000000008edaf398)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 578]
Event: 5368.631 Thread 0x000002257a461050 Exception <a 'java/io/IOException'{0x000000008ed82a20}> (0x000000008ed82a20)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 578]
Event: 5399.027 Thread 0x000002257a4646d0 Exception <a 'sun/net/ConnectionResetException'{0x000000008c1018d0}: Connection reset> (0x000000008c1018d0)
thrown [./open/src/hotspot/share/prims/jni.cpp, line 599]
Events (20 events):
Event: 6724.058 Executing VM operation: G1CollectForAllocation
Event: 6724.310 Executing VM operation: G1CollectForAllocation done
Event: 6888.343 Thread 0x000002250f7aca10 Thread exited: 0x000002250f7aca10
Event: 6892.528 Executing VM operation: G1CollectForAllocation
Event: 6919.698 Executing VM operation: G1CollectForAllocation done
Event: 6919.738 Executing VM operation: HandshakeAllThreads
Event: 6920.191 Executing VM operation: HandshakeAllThreads done
Event: 6973.947 Executing VM operation: G1CollectForAllocation
Event: 7028.276 Executing VM operation: G1CollectForAllocation done
Event: 7028.310 Executing VM operation: HandshakeAllThreads
Event: 7030.417 Executing VM operation: HandshakeAllThreads done
Event: 7035.662 Thread 0x000002257aed8660 Thread exited: 0x000002257aed8660
Event: 7083.953 Executing VM operation: G1CollectForAllocation
Event: 7087.733 Executing VM operation: G1CollectForAllocation done
Event: 7100.593 Executing VM operation: G1CollectForAllocation
Event: 7101.953 Executing VM operation: G1CollectForAllocation done
Event: 7115.017 Executing VM operation: G1CollectForAllocation
Event: 7120.743 Executing VM operation: G1CollectForAllocation done
Event: 7134.573 Executing VM operation: G1CollectForAllocation
Event: 7172.257 Thread 0x00000225798d3150 Thread added: 0x00000225798d3150
Dynamic libraries:
0x00007ff67fa40000 - 0x00007ff67fa4d000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\javaw.exe
0x00007ffd21630000 - 0x00007ffd21828000 C:\Windows\SYSTEM32\ntdll.dll
0x00007ffd20cf0000 - 0x00007ffd20dad000 C:\Windows\System32\KERNEL32.DLL
0x00007ffd1ef80000 - 0x00007ffd1f24e000 C:\Windows\System32\KERNELBASE.dll
0x00007ffd1f250000 - 0x00007ffd1f350000 C:\Windows\System32\ucrtbase.dll
0x00007ffd17600000 - 0x00007ffd17619000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\VCRUNTIME140.dll
0x00007ffcfb0e0000 - 0x00007ffcfb0f8000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\jli.dll
0x00007ffd207f0000 - 0x00007ffd20990000 C:\Windows\System32\USER32.dll
0x00007ffd1f3f0000 - 0x00007ffd1f412000 C:\Windows\System32\win32u.dll
0x00007ffcff210000 - 0x00007ffcff4aa000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll
0x00007ffd20080000 - 0x00007ffd200aa000 C:\Windows\System32\GDI32.dll
0x00007ffd21270000 - 0x00007ffd2130e000 C:\Windows\System32\msvcrt.dll
0x00007ffd1f420000 - 0x00007ffd1f52b000 C:\Windows\System32\gdi32full.dll
0x00007ffd1f350000 - 0x00007ffd1f3ed000 C:\Windows\System32\msvcp_win.dll
0x00007ffd20050000 - 0x00007ffd20080000 C:\Windows\System32\IMM32.DLL
0x00007ffd175f0000 - 0x00007ffd175fc000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\vcruntime140_1.dll
0x00007ffd01db0000 - 0x00007ffd01e41000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\msvcp140.dll
0x00007ffc94a10000 - 0x00007ffc9556e000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\server\jvm.dll
0x00007ffd21540000 - 0x00007ffd215ee000 C:\Windows\System32\ADVAPI32.dll
0x00007ffd20c50000 - 0x00007ffd20cec000 C:\Windows\System32\sechost.dll
0x00007ffd213f0000 - 0x00007ffd21515000 C:\Windows\System32\RPCRT4.dll
0x00007ffd200b0000 - 0x00007ffd200b8000 C:\Windows\System32\PSAPI.DLL
0x00007ffcfe4f0000 - 0x00007ffcfe517000 C:\Windows\SYSTEM32\WINMM.dll
0x00007ffd18d50000 - 0x00007ffd18d5a000 C:\Windows\SYSTEM32\VERSION.dll
0x00007ffcfeea0000 - 0x00007ffcfeea9000 C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffd21370000 - 0x00007ffd213db000 C:\Windows\System32\WS2_32.dll
0x00007ffd1d550000 - 0x00007ffd1d562000 C:\Windows\SYSTEM32\kernel.appcore.dll
0x00007ffd19760000 - 0x00007ffd1976a000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\jimage.dll
0x00007ffd1cac0000 - 0x00007ffd1cca4000 C:\Windows\SYSTEM32\DBGHELP.DLL
0x00007ffd02ee0000 - 0x00007ffd02f0c000 C:\Windows\SYSTEM32\dbgcore.DLL
0x00007ffd1eec0000 - 0x00007ffd1ef42000 C:\Windows\System32\bcryptPrimitives.dll
0x00007ffcf86a0000 - 0x00007ffcf86c5000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\java.dll
0x00007ffcf8680000 - 0x00007ffcf8698000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\zip.dll
0x00007ffd1f770000 - 0x00007ffd1feb3000 C:\Windows\System32\SHELL32.dll
0x00007ffd1cda0000 - 0x00007ffd1d535000 C:\Windows\SYSTEM32\windows.storage.dll
0x00007ffd20f10000 - 0x00007ffd21264000 C:\Windows\System32\combase.dll
0x00007ffd1e750000 - 0x00007ffd1e780000 C:\Windows\SYSTEM32\Wldp.dll
0x00007ffd20b40000 - 0x00007ffd20bed000 C:\Windows\System32\SHCORE.dll
0x00007ffd201e0000 - 0x00007ffd20235000 C:\Windows\System32\shlwapi.dll
0x00007ffd1ec90000 - 0x00007ffd1ecaf000 C:\Windows\SYSTEM32\profapi.dll
0x00007ffcf8660000 - 0x00007ffcf8679000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\net.dll
0x00007ffd16de0000 - 0x00007ffd16eea000 C:\Windows\SYSTEM32\WINHTTP.dll
0x00007ffd1e4b0000 - 0x00007ffd1e51a000 C:\Windows\system32\mswsock.dll
0x00007ffcd7b20000 - 0x00007ffcd7b32000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\nio.dll
0x00007ffcdbaa0000 - 0x00007ffcdbaa9000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\management.dll
0x00007ffcd79d0000 - 0x00007ffcd79db000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\management_ext.dll
0x00007ffcfedd0000 - 0x00007ffcfede7000 C:\Windows\system32\napinsp.dll
0x00007ffcfedb0000 - 0x00007ffcfedcb000 C:\Windows\system32\pnrpnsp.dll
0x00007ffd19410000 - 0x00007ffd19425000 C:\Windows\system32\wshbth.dll
0x00007ffd18010000 - 0x00007ffd1802d000 C:\Windows\system32\NLAapi.dll
0x00007ffd1e170000 - 0x00007ffd1e1ab000 C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007ffd1e1b0000 - 0x00007ffd1e27a000 C:\Windows\SYSTEM32\DNSAPI.dll
0x00007ffd213e0000 - 0x00007ffd213e8000 C:\Windows\System32\NSI.dll
0x00007ffcfed90000 - 0x00007ffcfeda2000 C:\Windows\System32\winrnr.dll
0x00007ffd01720000 - 0x00007ffd0172a000 C:\Windows\System32\rasadhlp.dll
0x00007ffd06860000 - 0x00007ffd068e0000 C:\Windows\System32\fwpuclnt.dll
0x00007ffd1ef50000 - 0x00007ffd1ef77000 C:\Windows\System32\bcrypt.dll
0x00007ffd1e690000 - 0x00007ffd1e6a8000 C:\Windows\SYSTEM32\CRYPTSP.dll
0x00007ffd1dde0000 - 0x00007ffd1de14000 C:\Windows\system32\rsaenh.dll
0x00007ffd1ec10000 - 0x00007ffd1ec3e000 C:\Windows\SYSTEM32\USERENV.dll
0x00007ffd1e650000 - 0x00007ffd1e65c000 C:\Windows\SYSTEM32\CRYPTBASE.dll
0x00007ffd17450000 - 0x00007ffd17467000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007ffd17bf0000 - 0x00007ffd17c0d000 C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x00007ffd15e50000 - 0x00007ffd15e60000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\verify.dll
0x00007ffcfb0d0000 - 0x00007ffcfb0dd000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\sunmscapi.dll
0x00007ffd1f530000 - 0x00007ffd1f686000 C:\Windows\System32\CRYPT32.dll
0x00007ffd1e820000 - 0x00007ffd1e847000 C:\Windows\SYSTEM32\ncrypt.dll
0x00007ffd1e7e0000 - 0x00007ffd1e81b000 C:\Windows\SYSTEM32\NTASN1.dll
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin;C:\Windows\SYSTEM32;C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\server
VM Arguments:
jvm_args: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=52447 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.jmx.enabled=true -Dspring.application.admin.enabled=true -XX:TieredStopAtLevel=1 -Dspring.boot.project.name=backend -Dfile.encoding=UTF-8 -XX:+ShowCodeDetailsInExceptionMessages
java_command: com.realnet.RealNetApp --spring.output.ansi.enabled=always
java_class_path (initial): G:\foldername\backend\target\classes;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-mail\2.2.5.RELEASE\spring-boot-starter-mail-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter\2.2.5.RELEASE\spring-boot-starter-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.2.5.RELEASE\spring-boot-starter-logging-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\hp\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\hp\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;C:\Users\hp\.m2\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;C:\Users\hp\.m2\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;C:\Users\hp\.m2\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;C:\Users\hp\.m2\repository\org\springframework\spring-context-support\5.2.4.RELEASE\spring-context-support-5.2.4.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\spring-context\5.2.4.RELEASE\spring-context-5.2.4.RELEASE.jar;C:\Users\hp\.m2\repository\com\sun\mail\jakarta.mail\1.6.4\jakarta.mail-1.6.4.jar;C:\Users\hp\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.2.5.RELEASE\spring-boot-starter-web-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.2.5.RELEASE\spring-boot-starter-json-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.2\jackson-datatype-jdk8-2.10.2.jar;C:\Users\hp\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.2\jackson-module-parameter-names-2.10.2.jar;C:\Users\hp\.m2\repository\org\springframework\spring-web\5.2.4.RELEASE\spring-web-
Launcher Type: SUN_STANDARD
[Global flags]
intx CICompilerCount = 4 {product} {ergonomic}
uint ConcGCThreads = 2 {product} {ergonomic}
uint G1ConcRefinementThreads = 8 {product} {ergonomic}
size_t G1HeapRegionSize = 1048576 {product} {ergonomic}
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
size_t InitialHeapSize = 132120576 {product} {ergonomic}
bool ManagementServer = true {product} {command line}
size_t MarkStackSize = 4194304 {product} {ergonomic}
size_t MaxHeapSize = 2097152000 {product} {ergonomic}
size_t MaxNewSize = 1258291200 {product} {ergonomic}
size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic}
size_t MinHeapSize = 8388608 {product} {ergonomic}
uintx NonNMethodCodeHeapSize = 7549744 {pd product} {ergonomic}
uintx NonProfiledCodeHeapSize = 244108496 {pd product} {ergonomic}
uintx ProfiledCodeHeapSize = 0 {pd product} {ergonomic}
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
bool SegmentedCodeCache = true {product} {ergonomic}
bool ShowCodeDetailsInExceptionMessages = true {manageable} {command line}
size_t SoftMaxHeapSize = 2097152000 {manageable} {ergonomic}
intx TieredStopAtLevel = 1 {product} {command line}
bool UseCompressedClassPointers = true {lp64_product} {ergonomic}
bool UseCompressedOops = true {lp64_product} {ergonomic}
bool UseG1GC = true {product} {ergonomic}
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
Logging:
Log output configuration:
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
Environment Variables:
JAVA_HOME=F:\Java
PATH=C:/Users/hp/Downloads/sts-4.10.0.RELEASE//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin/server;C:/Users/hp/Downloads/sts-4.10.0.RELEASE//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Users\hp\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Python39\Scripts\;C:\Python39\;C:\Users\hp\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\hp\AppData\Local\Programs\Python\Python39\;C:\Users\hp\AppData\Local\Microsoft\WindowsApps;C:\Users\hp\.dotnet\tools;C:\Users\hp\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\hp\AppData\Local\GitHubDesktop\bin;F:\Java\bin;F:\Java\bin;C:\Program Files\MongoDB\Server\4.4\bin;C:\Users\hp\AppData\Roaming\npm;C:\Users\hp\Downloads\sts-4.10.0.RELEASE;
USERNAME=hp
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
--------------- S Y S T E M ---------------
OS:
Windows 10 , 64 bit Build 19041 (10.0.19041.1889)
OS uptime: 0 days 3:07 hours
HyperV virtualization detected
CPU: total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 142 stepping 12 microcode 0xde, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, vzeroupper, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma, clflush, clflushopt
Memory: 4k page, system-wide physical 7995M (594M free)
TotalPageFile size 28028M (AvailPageFile size 1M)
current process WorkingSet (physical memory assigned to process): 35M, peak: 467M
current process commit charge ("private bytes"): 521M, peak: 768M
vm_info: OpenJDK 64-Bit Server VM (15.0.2+7-27) for windows-amd64 JRE (15.0.2+7-27), built on Dec 7 2020 20:02:38 by "mach5one" with unknown MS VC++:1925
END.

View File

@ -0,0 +1,516 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.realnet</groupId>
<artifactId>app</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<name>REAL IT SOLUTIONS</name>
<properties>
<springfox-version>2.7.0</springfox-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- AOP -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!--SpringFox dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.22</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.22</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
<!-- end of spring fox dependency-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.29</version> <!-- Replace with the latest version
available -->
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.28</version>
</dependency>
<!-- Manually Added -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!--poi dependency-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8-beta4</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version> <!-- Specify a version here -->
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version> <!-- Specify the same version here -->
</dependency>
<!-- Thanks for using https://jar-download.com -->
<!-- All Type of database connection-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.25.2</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
</dependency>
<!-- Spring Framework Caching Support -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<!-- <version>1.7.25</version> -->
</dependency>
<!--
https://mvnrepository.com/artifact/org.springframework.security.oauth.boot/spring-security-oauth2-autoconfigure -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth.boot</groupId>
<artifactId>spring-security-oauth2-autoconfigure</artifactId>
<version>2.3.3.RELEASE</version>
</dependency>
<!--
https://mvnrepository.com/artifact/org.springframework.security.oauth/spring-security-oauth2 -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-google</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-linkedin</artifactId>
<version>1.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.5-jre</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.7</version>
</dependency>
<!-- to handle ZIP Files -->
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20171018</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<!--
https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<!--
https://mvnrepository.com/artifact/org.apache.clerezza.ext/org.json.simple -->
<dependency>
<groupId>org.apache.clerezza.ext</groupId>
<artifactId>org.json.simple</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20201115</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio</artifactId>
<version>8.18.0</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf</artifactId>
<version>9.1.22</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
<!-- Other dependencies -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13.2</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>3.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.ibm.db2/jcc -->
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<version>11.5.5.0</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>3.7.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.firebirdsql.jdbc/jaybird -->
<dependency>
<groupId>org.firebirdsql.jdbc</groupId>
<artifactId>jaybird</artifactId>
<version>4.0.0.java11</version>
</dependency>
<!--
https://mvnrepository.com/artifact/com.orientechnologies/orientdb-core -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-core</artifactId>
<version>3.2.19</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-jdbc</artifactId>
<version>3.2.19</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
<version>2.17.102</version> <!-- Use the latest version -->
</dependency>
<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>java-client</artifactId>
<version>3.1.5</version> <!-- Use a compatible version of Couchbase
Java SDK -->
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.4.13</version> <!-- Use a compatible version of Project
Reactor -->
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bolt</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>com.paytm.pg</groupId>
<artifactId>paytm-checksum</artifactId>
<version>1.2.1</version>
</dependency>
<!-- //razorpay depedency-->
<dependency>
<groupId>com.razorpay</groupId>
<artifactId>razorpay-java</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.14.3</version> <!-- You can adjust the version as needed -->
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.28</version> <!-- Use the latest version available -->
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>2.6</version> <!-- Use the latest version available -->
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.4</version> <!-- Use the latest version -->
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version> <!-- Use the latest version -->
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.5</version> <!-- Use the latest version available -->
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,304 @@
//package com.realnet.Billing.Api.Controllers;
//
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map.Entry;
//import java.util.Optional;
//import java.util.Set;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.client.RestTemplate;
//
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.google.gson.JsonArray;
//import com.google.gson.JsonElement;
//import com.google.gson.JsonObject;
//import com.google.gson.JsonParser;
//import com.realnet.Billing.Entitys.ServiceOrder_t;
//import com.realnet.Billing.Repositorys.ServiceOrder_Repository;
//import com.realnet.Billing.Services.ServiceOrder_Service;
//import com.realnet.Communication.Models.Com_jobTable;
//import com.realnet.Communication.Repos.JobTablerepo;
//import com.realnet.Customer_master.Entity.Customer_master_t;
//import com.realnet.Customer_master.Repository.Customer_master_Repository;
//import com.realnet.DocumentBuilder.Entity.DocumentBuilder_t;
//import com.realnet.DocumentBuilder.Entity.Document_builder_lines;
//import com.realnet.DocumentBuilder.Services.DocumentBuilder_Service;
//import com.realnet.DocumentBuilder.Services.StringReplacementService;
//
//@RestController
//
//public class BillingSequentialApi {
//
// @Autowired
// private ServiceOrder_Repository serviceOrder_Repository;
//
// @Autowired
// private DocumentBuilder_Service Service;
//
//// @Autowired
//// private Fileupload_helper fileuploadhelper;
//
// @Autowired
// private StringReplacementService replacementService;
//
// @Autowired
// private Customer_master_Repository customer_master_Repository;
//
// @Autowired
// private JobTablerepo Com_jobTablerepo;
//
// @Value("${projectPath}")
// private String projectPath;
//
// public final String UPLOAD_DIREC = "/Files";
//
// @Autowired
// private ServiceOrder_Service serviceOrder_Service;
//
// @GetMapping("/process-all-customers")
// public ResponseEntity<String> processAllCustomers() {
// try {
// // Step 1: Create Service Orders for all customers
// List<Customer_master_t> customers = customer_master_Repository.findAll();
// for (Customer_master_t customer : customers) {
// serviceOrder_Service.createServiceOrderFromCustomer(customer);
//
// }
//
// // Step 2: Approve all pending service orders
// int updatedCount = serviceOrder_Service.approvePendingOrders();
//
// // step 3:
//
// List<Long> autoApprovedServiceOrderIds = serviceOrder_Repository.findIdsByStatusOrderByAsc("AutoApproved");
//
// // Process the service orders
// for (Long serviceOrderId : autoApprovedServiceOrderIds) {
// Optional<ServiceOrder_t> serviceOrderOptional = serviceOrder_Repository.findById(serviceOrderId);
//
// if (serviceOrderOptional.isPresent()) {
// ServiceOrder_t serviceOrder = serviceOrderOptional.get();
// String entityName = serviceOrder.getEntity();
//
// // Fetch the corresponding customer(s) by entity name
// List<Customer_master_t> customers1 = customer_master_Repository.findByEntityName(entityName);
//
// if (!customers1.isEmpty()) {
// // Assuming you want to process each customer found
// for (Customer_master_t customer : customers1) {
// // Now you have the serviceOrderId, entityName, and customer for processing
// String proformaInvoiceFileName = generateProformaInvoice(serviceOrderId);
//
// // step 4
// sendEmailWithProformaInvoice(customer, proformaInvoiceFileName);
// }
// } else {
// // Handle the case where no customer was found for the given entity name
// }
// } else {
// // Handle the case where no service order was found for the given ID
// }
// }
//
// return ResponseEntity.ok("Processed all customers and generated invoices. " + updatedCount
// + " service orders were approved.");
// } catch (Exception e) {
// // Handle exceptions appropriately
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
// .body("Error processing customers: " + e.getMessage());
// }
// }
//
// private String generateProformaInvoice(Long serviceOrderId) throws Exception {
//
// long documentId = 98;
// HashMap<String, String> map = new HashMap<>();
// JsonParser parser = new JsonParser();
// DocumentBuilder_t doc = Service.getdetailsbyId(documentId);
// String file_name = doc.getFile_name();
// String file_path = doc.getFile_path();
//
// String replacerule = "";
// String operation = null;
// String replaceWith = null;
// String startstring = null;
// String endstring = null;
// String keyword = null;
// String linestring = null;
// String cellAddress = null;
// JsonObject getbodyobject = null;
// String ModifyfileName = null;
//
// // .....................//
//
// List<Document_builder_lines> docline = doc.getDocument_builder_lines();
//
// for (Document_builder_lines line : docline) {
// String model = line.getModel();
// JsonParser parser1 = new JsonParser();
// JsonArray jsonArray = parser1.parse(model).getAsJsonArray();
//
// for (JsonElement element : jsonArray) {
// JsonObject jsonObject = element.getAsJsonObject();
// if (jsonObject.has("name")) {
// ModifyfileName = jsonObject.get("name").getAsString();
// break; // Break the loop once you find the first object with a "name" field
// }
// }
//
// if (ModifyfileName != null) {
// // Now 'nameValue' contains the value of the "name" field
// System.out.println("nameValue: " + ModifyfileName);
// break; // Break the outer loop as well, if needed
// }
// }
//
// if (ModifyfileName == null) {
// // Handle the case where no object with a "name" field was found
// System.out.println("No object with a 'name' field found.");
// }
//
// // long serviceOrderId = serviceOrderId2.getId();
// ModifyfileName = ModifyfileName.replace("?", String.valueOf(serviceOrderId));
// ModifyfileName = ModifyfileName + ".docx";
// String newFilepath = replacementService.copyWordFile(file_path, file_name, file_path, ModifyfileName);
//
// // ..........................//
//
// List<Document_builder_lines> lines = doc.getDocument_builder_lines();
//
// for (Document_builder_lines line : lines) {
// String model = line.getModel();
// JsonElement element = parser.parse(model);
// JsonArray models = element.getAsJsonArray();
//
// for (JsonElement mod : models) {
// JsonObject object = mod.getAsJsonObject();
//
// String type = object.get("type").getAsString();
// if (type.equalsIgnoreCase("Initialize")) {
// String a_uri = object.get("a_uri").toString().replaceAll("\"", "");
// a_uri = a_uri.replace("?", String.valueOf(serviceOrderId));
// System.out.println(a_uri);
//
// Object body = GET(a_uri).getBody();
// ObjectMapper objectMapper = new ObjectMapper();
// String json = objectMapper.writeValueAsString(body);
// JsonElement getbody = parser.parse(json);
// getbodyobject = getbody.getAsJsonObject();
//
// }
// }
//
// for (JsonElement mod : models) {
// JsonObject object = mod.getAsJsonObject();
//
// String type = object.get("type").getAsString();
// if (type.equalsIgnoreCase("Mapper")) {
// String mapper = object.get("mappers").getAsString();
//
// JsonElement parse = parser.parse(mapper);
// JsonArray mapArray = parse.getAsJsonArray();
// for (JsonElement maps : mapArray) {
// JsonObject jsonObject = maps.getAsJsonObject();
// startstring = jsonObject.get("start_string").toString().replaceAll("\"", "");
// endstring = jsonObject.get("end_string").toString().replaceAll("\"", "");
// replaceWith = jsonObject.get("replace_with").toString().replaceAll("\"", "");
// keyword = jsonObject.get("Keyword").toString().replaceAll("\"", "");
// linestring = jsonObject.get("line_string").toString().replaceAll("\"", "");
// operation = jsonObject.get("operation").toString().replaceAll("\"", "");
// cellAddress = jsonObject.get("cellAddress").toString().replaceAll("\"", "");
// Set<Entry<String, JsonElement>> entrySet = getbodyobject.entrySet();
// for (Entry<String, JsonElement> entry : entrySet) {
//
// String key = entry.getKey().toString().replaceAll("\"", "");
// String value = entry.getValue().toString().replaceAll("\"", "");
//
// if (replaceWith.equalsIgnoreCase(key)) {
// replaceWith = value;
// break;
// }
//
// }
//
// if (operation.contains("replacebyfirstandlast")) {
//
// replacerule = replacementService.replacewithstartandend(file_path, file_name, startstring,
// endstring, replaceWith);
//
// }
//
// if (operation.contains("appending")) {
// replacerule = replacementService.appendToSlide(linestring, replaceWith, file_path,
// file_name);
// }
//
// if (operation.contains("linereplacement")) {
// replacerule = replacementService.linereplacementForPPT(file_path, file_name, keyword,
// replaceWith);
// }
// if (operation.contains("replacement")) {
// replacerule = replacementService.replacesting(newFilepath, file_name, keyword, replaceWith,
// ModifyfileName);
//
// }
//
// if (operation.contains("excelcellReplace")) {
// replacerule = replacementService.excelcellReplace(file_path, file_name, cellAddress,
// replaceWith);
//
// }
//
// }
// }
//
// }
// }
//
// return replacerule;
//
// }
//
// private void sendEmailWithProformaInvoice(Customer_master_t customer, String fileName) {
//
// Long id = customer.getId();
// String email = customer.getEmail();
//
// String gateway = "EMAIL";
// String sendTo = email;
// String replacementString = "no";
// String cc = email;
// String template = "PerfomaInvoice";
//
// // Create a new Com_jobTable instance and set its values
// Com_jobTable comJobTable = new Com_jobTable();
// comJobTable.setJob_type("EMAIL"); // Set the job type to "EMAIL"
// comJobTable.setSend_to(sendTo);
// comJobTable.setGatewayName(gateway);
// comJobTable.setAttachment(fileName);
// comJobTable.setGatewaydone("N");
// comJobTable.setReplacement_string(replacementString);
// comJobTable.setCc(cc);
// comJobTable.setReplacement_string(replacementString);
// comJobTable.setTemplate_name(template);
// // Save the Com_jobTable entity using your repository or service
// Com_jobTablerepo.save(comJobTable);
//
// }
//
// public ResponseEntity<Object> GET(String get) {
// RestTemplate restTemplate = new RestTemplate();
//
// ResponseEntity<Object> u = restTemplate.getForEntity(get, Object.class);
//
// return u;
//
// }
//
//}

View File

@ -0,0 +1,403 @@
//package com.realnet.Billing.Api.Controllers;
//
//import java.io.ByteArrayOutputStream;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map.Entry;
//import java.util.Optional;
//import java.util.Set;
//
//import org.apache.poi.ss.usermodel.Row;
//import org.apache.poi.ss.usermodel.Sheet;
//import org.apache.poi.ss.usermodel.Workbook;
//import org.apache.poi.xssf.usermodel.XSSFWorkbook;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.http.HttpHeaders;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.MediaType;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.client.RestTemplate;
//
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.google.gson.JsonArray;
//import com.google.gson.JsonElement;
//import com.google.gson.JsonObject;
//import com.google.gson.JsonParser;
//import com.realnet.Billing.Entitys.Invoice_t;
//import com.realnet.Billing.Entitys.ServiceOrder_t;
//import com.realnet.Billing.Repositorys.ServiceOrder_Repository;
//import com.realnet.Billing.Services.ServiceOrder_Service;
//import com.realnet.Communication.Models.Com_jobTable;
//import com.realnet.Communication.Repos.JobTablerepo;
//import com.realnet.Customer_master.Entity.Customer_master_t;
//import com.realnet.Customer_master.Repository.Customer_master_Repository;
//import com.realnet.DocumentBuilder.Entity.DocumentBuilder_t;
//import com.realnet.DocumentBuilder.Entity.Document_builder_lines;
//import com.realnet.DocumentBuilder.Services.DocumentBuilder_Service;
//import com.realnet.DocumentBuilder.Services.StringReplacementService;
//import com.realnet.fileupload.helper.Fileupload_helper;
//
//@RestController
//@RequestMapping("/api/serviceorders")
//public class ServiceOrderApiController {
//
// @Autowired
// private ServiceOrder_Service serviceOrder_Service;
//
// @Autowired
// private ServiceOrder_Repository serviceOrder_Repository;
//
// @Autowired
// private DocumentBuilder_Service Service;
//
// @Autowired
// private Fileupload_helper fileuploadhelper;
//
// @Autowired
// private StringReplacementService replacementService;
//
// @Autowired
// private Customer_master_Repository customer_master_Repository;
//
// @Autowired
// private JobTablerepo Com_jobTablerepo;
//
// @Value("${projectPath}")
// private String projectPath;
//
// public final String UPLOAD_DIREC = "/Files";
//
// // based on the period autocomplete all pending status
// @GetMapping("/update-status")
// public ResponseEntity<String> updateStatusForExpiredOrders() {
// int updatedCount = serviceOrder_Service.updateStatusForExpiredOrders();
// return ResponseEntity.ok("Updated " + updatedCount + " orders");
// }
//
// // download profoma invoice
// @GetMapping("/generate-excel/{id}")
// public ResponseEntity<byte[]> generateExcel(@PathVariable Long id) {
// ServiceOrder_t serviceOrder = serviceOrder_Service.findById(id);
//
// if (serviceOrder != null) {
// Workbook workbook = generateExcelForServiceOrder(serviceOrder);
//
// try {
// ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
// workbook.write(outputStream);
// byte[] excelBytes = outputStream.toByteArray();
// HttpHeaders headers = new HttpHeaders();
// headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
// headers.setContentDispositionFormData("attachment", "service_order.xlsx");
// return new ResponseEntity<>(excelBytes, headers, HttpStatus.OK);
// } catch (Exception e) {
// // Handle exceptions
// }
// }
//
// return ResponseEntity.notFound().build();
// }
//
// public Workbook generateExcelForServiceOrder(ServiceOrder_t serviceOrder) {
// Workbook workbook = new XSSFWorkbook();
// Sheet sheet = workbook.createSheet("Service Order");
//
// // Create header row
// Row headerRow = sheet.createRow(0);
// headerRow.createCell(0).setCellValue("Service Order ID");
// headerRow.createCell(1).setCellValue("Service Order Seq");
//
// // Add more header cells for other fields as needed...
//
// // Create data row
// Row dataRow = sheet.createRow(1);
// dataRow.createCell(0).setCellValue(serviceOrder.getId());
// dataRow.createCell(1).setCellValue(serviceOrder.getServiceOrderSeq());
// // Add more data cells for other fields as needed...
//
// return workbook;
// }
//
// // to HOLD status
//// @PutMapping("/change-service-order-status/{profomaInvoiceId}")
//// public ResponseEntity<String> changeServiceOrderStatus(@PathVariable Long profomaInvoiceId) {
//// // Fetch the ProfomaInvoice by ID
//// ProfomaInvoice profomaInvoice = profomaInvoice_Service.findById(profomaInvoiceId);
////
//// if (profomaInvoice != null) {
//// // Get the associated ServiceOrderId from ProfomaInvoice
//// Long serviceOrderId = profomaInvoice.getServiceOrderId();
////
//// // Fetch the associated ServiceOrder_t entity
//// ServiceOrder_t serviceOrder = serviceOrder_Service.findById(serviceOrderId);
////
//// if (serviceOrder != null) {
//// // Update the status to "HOLD"
//// serviceOrder.setStatus("HOLD");
//// serviceOrder_Service.saveData(serviceOrder);
////
//// return ResponseEntity.ok("ServiceOrder status updated to HOLD");
//// }
//// }
////
//// return ResponseEntity.notFound().build();
//// }
//
// // Auto Creation Service order to invoicecopyServiceOrderToInvoice api
// @GetMapping("/copyServiceOrderToInvoice")
// public List<Invoice_t> copyServiceOrderToInvoice() {
// List<Invoice_t> createdInvoice = serviceOrder_Service.createInvoicesForAutoApprovedServiceOrders();
// return createdInvoice;
// }
//
////document status HOLD api (custmer hold) (old history table crude insert record),,service order release then it release hold
// @PutMapping("/updateHoldstatus/{id}")
// public ResponseEntity<String> updateStatusById(@PathVariable Long id) {
// try {
// // Hardcode the new status value to "HOLD"
// serviceOrder_Service.updateStatusById(id, "HOLD");
// return ResponseEntity.ok("Status updated to HOLD successfully");
// } catch (Exception e) {
// // Handle exceptions, e.g., if the entity with the given ID is not found
// return ResponseEntity.badRequest().body("Failed to update status: " + e.getMessage());
// }
// }
//
////so release hold
// @PutMapping("/updateResolvestatus/{id}")
// public ResponseEntity<String> updateStatusResolvedById(@PathVariable Long id) {
// try {
//
// serviceOrder_Service.updateStatusById(id, "RESOLVED");
// return ResponseEntity.ok("Status updated to HOLD successfully");
// } catch (Exception e) {
// // Handle exceptions, e.g., if the entity with the given ID is not found
// return ResponseEntity.badRequest().body("Failed to update status: " + e.getMessage());
// }
// }
//
// @PutMapping("/updateCustomerApprovedestatus/{id}")
// public ResponseEntity<String> updateStatusCustomerApprovedById(@PathVariable Long id) {
// try {
//
// serviceOrder_Service.updateStatusById(id, "CustomerApproved");
// return ResponseEntity.ok("Status updated to Approvec successfully");
// } catch (Exception e) {
// // Handle exceptions, e.g., if the entity with the given ID is not found
// return ResponseEntity.badRequest().body("Failed to update status: " + e.getMessage());
// }
// }
//
// @GetMapping("/customerGenerate")
// public void generateServiceOrder() {
// serviceOrder_Service.generateServiceOrders();
// }
//
// @GetMapping("/approvePending")
// public ResponseEntity<String> approvePendingOrders() {
// int updatedCount = serviceOrder_Service.approvePendingOrders();
// return ResponseEntity.ok("Approved " + updatedCount + " pending orders");
// }
//
// @GetMapping("/perfomaInvoiceCreation/{serviceOrderId}")
// public ResponseEntity<?> perfomaInvoiceCreation(@PathVariable long serviceOrderId) throws Exception {
//
// long documentId = 98;
// HashMap<String, String> map = new HashMap<>();
// JsonParser parser = new JsonParser();
// DocumentBuilder_t doc = Service.getdetailsbyId(documentId);
// String file_name = doc.getFile_name();
// String file_path = doc.getFile_path();
//
// String replacerule = "";
// String operation = null;
// String replaceWith = null;
// String startstring = null;
// String endstring = null;
// String keyword = null;
// String linestring = null;
// String cellAddress = null;
// JsonObject getbodyobject = null;
// String ModifyfileName = null;
//
// // .....................//
//
// List<Document_builder_lines> docline = doc.getDocument_builder_lines();
//
// for (Document_builder_lines line : docline) {
// String model = line.getModel();
// JsonParser parser1 = new JsonParser();
// JsonArray jsonArray = parser1.parse(model).getAsJsonArray();
//
// for (JsonElement element : jsonArray) {
// JsonObject jsonObject = element.getAsJsonObject();
// if (jsonObject.has("name")) {
// ModifyfileName = jsonObject.get("name").getAsString();
// break; // Break the loop once you find the first object with a "name" field
// }
// }
//
// if (ModifyfileName != null) {
// // Now 'nameValue' contains the value of the "name" field
// System.out.println("nameValue: " + ModifyfileName);
// break; // Break the outer loop as well, if needed
// }
// }
//
// if (ModifyfileName == null) {
// // Handle the case where no object with a "name" field was found
// System.out.println("No object with a 'name' field found.");
// }
//
// ModifyfileName = ModifyfileName.replace("?", String.valueOf(serviceOrderId));
// ModifyfileName = ModifyfileName + ".docx";
// String newFilepath = replacementService.copyWordFile(file_path, file_name, file_path, ModifyfileName);
//
// // ..........................//
//
// List<Document_builder_lines> lines = doc.getDocument_builder_lines();
//
// for (Document_builder_lines line : lines) {
// String model = line.getModel();
// JsonElement element = parser.parse(model);
// JsonArray models = element.getAsJsonArray();
//
// for (JsonElement mod : models) {
// JsonObject object = mod.getAsJsonObject();
//
// String type = object.get("type").getAsString();
// if (type.equalsIgnoreCase("Initialize")) {
// String a_uri = object.get("a_uri").toString().replaceAll("\"", "");
// a_uri = a_uri.replace("?", String.valueOf(serviceOrderId));
// System.out.println(a_uri);
//// Object body = GET(a_uri).getBody();
//// JsonElement getbody = parser.parse(body.toString());
//// getbodyobject = getbody.getAsJsonObject();
// Object body = GET(a_uri).getBody();
// ObjectMapper objectMapper = new ObjectMapper();
// String json = objectMapper.writeValueAsString(body);
// JsonElement getbody = parser.parse(json);
// getbodyobject = getbody.getAsJsonObject();
//
// }
// }
//
// for (JsonElement mod : models) {
// JsonObject object = mod.getAsJsonObject();
//
// String type = object.get("type").getAsString();
// if (type.equalsIgnoreCase("Mapper")) {
// String mapper = object.get("mappers").getAsString();
//
// JsonElement parse = parser.parse(mapper);
// JsonArray mapArray = parse.getAsJsonArray();
// for (JsonElement maps : mapArray) {
// JsonObject jsonObject = maps.getAsJsonObject();
// startstring = jsonObject.get("start_string").toString().replaceAll("\"", "");
// endstring = jsonObject.get("end_string").toString().replaceAll("\"", "");
// replaceWith = jsonObject.get("replace_with").toString().replaceAll("\"", "");
// keyword = jsonObject.get("Keyword").toString().replaceAll("\"", "");
// linestring = jsonObject.get("line_string").toString().replaceAll("\"", "");
// operation = jsonObject.get("operation").toString().replaceAll("\"", "");
// cellAddress = jsonObject.get("cellAddress").toString().replaceAll("\"", "");
// Set<Entry<String, JsonElement>> entrySet = getbodyobject.entrySet();
// for (Entry<String, JsonElement> entry : entrySet) {
//
// String key = entry.getKey().toString().replaceAll("\"", "");
// String value = entry.getValue().toString().replaceAll("\"", "");
//
// if (replaceWith.equalsIgnoreCase(key)) {
// replaceWith = value;
// break;
// }
//
// }
//
// if (operation.contains("replacebyfirstandlast")) {
//
// replacerule = replacementService.replacewithstartandend(file_path, file_name, startstring,
// endstring, replaceWith);
//
// }
//
// if (operation.contains("appending")) {
// replacerule = replacementService.appendToSlide(linestring, replaceWith, file_path,
// file_name);
// }
//
// if (operation.contains("linereplacement")) {
// replacerule = replacementService.linereplacementForPPT(file_path, file_name, keyword,
// replaceWith);
// }
// if (operation.contains("replacement")) {
// replacerule = replacementService.replacesting(newFilepath, file_name, keyword, replaceWith,
// ModifyfileName);
//
// }
//
// if (operation.contains("excelcellReplace")) {
// replacerule = replacementService.excelcellReplace(file_path, file_name, cellAddress,
// replaceWith);
//
// }
//
// }
// }
//
// }
// }
//
// return new ResponseEntity<>(replacerule, HttpStatus.CREATED);
// }
//
// @GetMapping("/sendEmail/{id}/{fileName}")
// public ResponseEntity<String> sendEmail(@PathVariable Long id, @PathVariable String fileName) {
//
// Optional<Customer_master_t> customer_master_t = customer_master_Repository.findById(id);
//
// String email = null;
// if (customer_master_t.isPresent()) {
// Customer_master_t customer = customer_master_t.get();
// email = customer.getEmail();
//
// }
//
// String gateway = "EMAIL";
// String sendTo = email;
// String replacementString = "no";
// String cc = email;
// String template = "PerfomaInvoice";
//
// // Create a new Com_jobTable instance and set its values
// Com_jobTable comJobTable = new Com_jobTable();
// comJobTable.setJob_type("EMAIL"); // Set the job type to "EMAIL"
// comJobTable.setSend_to(sendTo);
// comJobTable.setGatewayName(gateway);
// comJobTable.setAttachment(fileName);
// comJobTable.setGatewaydone("N");
// comJobTable.setReplacement_string(replacementString);
// comJobTable.setCc(cc);
// comJobTable.setReplacement_string(replacementString);
// comJobTable.setTemplate_name(template);
// // Save the Com_jobTable entity using your repository or service
// Com_jobTablerepo.save(comJobTable);
//
// return new ResponseEntity<>("Email sent successfully and job data saved!", HttpStatus.OK);
// }
//
// public ResponseEntity<Object> GET(String get) {
// RestTemplate restTemplate = new RestTemplate();
//
// ResponseEntity<Object> u = restTemplate.getForEntity(get, Object.class);
//
// return u;
//
// }
//
//}

View File

@ -0,0 +1,67 @@
package com.realnet.Billing.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.Billing.Entitys.ApprovalHistory_t;
import com.realnet.Billing.Services.ApprovalHistory_Service;
@RequestMapping(value = "/ApprovalHistory")
@RestController
public class ApprovalHistory_Controller {
@Autowired
private ApprovalHistory_Service Service;
@PostMapping("/ApprovalHistory")
public ApprovalHistory_t Savedata(@RequestBody ApprovalHistory_t data) {
ApprovalHistory_t save = Service.Savedata(data);
return save;
}
@GetMapping("/ApprovalHistory")
public List<ApprovalHistory_t> getdetails() {
List<ApprovalHistory_t> get = Service.getdetails();
return get;
}
@GetMapping("/ApprovalHistory/{id}")
public ApprovalHistory_t getdetailsbyId(@PathVariable Long id) {
ApprovalHistory_t get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/ApprovalHistory/{id}")
public void delete_by_id(@PathVariable Long id) {
Service.delete_by_id(id);
}
@PutMapping("/ApprovalHistory/{id}")
public ApprovalHistory_t update(@RequestBody ApprovalHistory_t data, @PathVariable Long id) {
ApprovalHistory_t update = Service.update(data, id);
return update;
}
// @PutMapping("/updateServiceOrderStatus")
// public ResponseEntity<ServiceOrderDto> updateServiceOrderStatus(
// @RequestParam Long serviceOrderId,
// @RequestParam String newStatus,
// @RequestParam String actionedBy,
// @RequestParam String comments
// ) {
// ServiceOrderDto updatedServiceOrder = Service.updateServiceOrderStatus(serviceOrderId, newStatus, actionedBy, comments);
// return new ResponseEntity<>(updatedServiceOrder, HttpStatus.OK);
// }
//
}

View File

@ -0,0 +1,89 @@
package com.realnet.Billing.Controllers;
import com.realnet.Billing.Dto.ApprovalNote_SO;
import com.realnet.Billing.Dto.ApprovalQueue_SO;
import com.realnet.Billing.Repositorys.ApprovalReturnHistory_Repo;
import com.realnet.Billing.Services.ApprovalQueueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
@RestController
@RequestMapping("/billing/approval")
public class ApprovalQueue_Controller {
@Autowired
private ApprovalQueueService approvalQueueService;
@PostMapping("/add")
public ResponseEntity<?> addApprovalQueue(
@RequestBody ApprovalQueue_SO approvalQueueSOSO
) {
return ResponseEntity.ok(approvalQueueService.saveApprovalQueue(approvalQueueSOSO));
}
@GetMapping("/getAll")
public List<ApprovalQueue_SO> getAllApprovalQueue() {
return approvalQueueService.getAllApprovalQueue();
}
@GetMapping("/get/{id}")
public ResponseEntity<ApprovalQueue_SO> getApprovalQueueById(
@PathVariable Long id) {
ApprovalQueue_SO approvalQueueSOSO = approvalQueueService.getApprovalQueueById(id);
if (approvalQueueSOSO != null) {
return ResponseEntity.ok(approvalQueueSOSO);
} else {
return ResponseEntity.notFound().build();
}
}
@GetMapping("/getall/{docSeq}")
public ResponseEntity<List<ApprovalQueue_SO>> getAllQueueForDoc(@PathVariable Long docSeq) {
List<ApprovalQueue_SO> approvalQueueSOSOList = approvalQueueService.getAllQueueForDocument(docSeq);
if (approvalQueueSOSOList.isEmpty()) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok(approvalQueueSOSOList);
}
@PutMapping("/update/{id}")
public ResponseEntity<ApprovalQueue_SO> updateApprovalQueue(
@PathVariable Long id, @RequestBody ApprovalQueue_SO updatedApprovalQueueSOSO) {
ApprovalQueue_SO existingApprovalQueueSOSO = approvalQueueService.getApprovalQueueById(id);
if (existingApprovalQueueSOSO != null) {
existingApprovalQueueSOSO.setApprover(updatedApprovalQueueSOSO.getApprover());
existingApprovalQueueSOSO.setActionType(updatedApprovalQueueSOSO.getActionType());
existingApprovalQueueSOSO.setActionTaken(updatedApprovalQueueSOSO.getActionTaken());
existingApprovalQueueSOSO.setComments(updatedApprovalQueueSOSO.getComments());
existingApprovalQueueSOSO.setActionedAt(updatedApprovalQueueSOSO.getActionedAt());
ApprovalQueue_SO updatedQueue = approvalQueueService.saveApprovalQueue(existingApprovalQueueSOSO);
return ResponseEntity.ok(updatedQueue);
} else {
return ResponseEntity.notFound().build();
}
}
// ******************************************************************************* \\
// History-Controller \\
@Autowired
private ApprovalReturnHistory_Repo returnHistoryRepo;
@PostMapping("/return")
public ResponseEntity<?> saveReturnResponse(
@RequestBody ApprovalNote_SO history
){
history.setActionDate(new Date());
System.out.println(history);
return ResponseEntity.ok(returnHistoryRepo.save(history));
}
}

View File

@ -0,0 +1,27 @@
package com.realnet.Billing.Dto;
import com.fasterxml.jackson.annotation.JsonBackReference;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Entity
@Data
public class ApprovalNote_SO {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String documentSeq;
private String actionTaken;
private String actionNote;
private Date actionDate;
@ManyToOne
@JoinColumn(name = "approval_queue_id")
@JsonBackReference
private ApprovalQueue_SO approvalQueueSO;
}

View File

@ -0,0 +1,44 @@
package com.realnet.Billing.Dto;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import lombok.Data;
@Entity
@Data
public class ApprovalQueue_SO {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String formCode;
private String documentSeq;
private String approver;
private String actionType;
private String actionTaken;
private String comments;
private Date actionedAt;
private String tablename;
@OneToMany(mappedBy = "approvalQueueSO", cascade = CascadeType.ALL)
@JsonManagedReference
private List<ApprovalNote_SO> history;
// @ManyToOne(fetch = FetchType.LAZY)
// @JoinColumn(name = "service_order_id")
// @JsonBackReference
private Long service_order_id;
}

View File

@ -0,0 +1,32 @@
package com.realnet.Billing.Dto;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
@Getter
@Setter
public class BillingPeriodsResponse {
@JsonFormat(pattern = "yyyy-MM-dd")
private Date periodStart;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date periodEnd;
// Constructors, getters, setters
public BillingPeriodsResponse(Date periodStart, Date periodEnd) {
this.periodStart = periodStart;
this.periodEnd = periodEnd;
}
}

View File

@ -0,0 +1,22 @@
package com.realnet.Billing.Dto;
import lombok.Data;
@Data
public class ServiceOrderDto {
private Long id;
private String orderType;
private String orderNo;
private String orderGenerationDate;
private String serviceRequestBy;
private String serviceRenderedFrom;
private String serviceRenderedTo;
private String contactNumber;
private String poNumber;
private String status;
private String remarks;
private String deliveryTerms;
// Other attributes as needed
// Getters and setters
}

View File

@ -0,0 +1,48 @@
package com.realnet.Billing.Dto;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import lombok.Data;
@Data
public class ServiceWithDiscount {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String memo;
private boolean active;
private String type;
private String period;
private String sellPrice;
private String selfCost;
private String serviceCode;
private String hsnCodes;
private boolean exempt;
private boolean nonGst;
private String taxRateType;
private String tarrifCode;
private String hsn_sacNumber;
private String natureOfTrans;
private String productType;
@Lob
private String inputJson;
private String disc;
private String gst ;
}

View File

@ -0,0 +1,26 @@
package com.realnet.Billing.Entitys;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Entity
@Data
public class ApprovalHistory_t {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String document_type;
private Long document_id;
private String actioned_by;
private String action;
private String comments;
private String approvalStatus;
}

View File

@ -0,0 +1,26 @@
package com.realnet.Billing.Entitys;
import lombok.*;
import java.util.Date;
import javax.persistence.*;
@Entity
@Data
public class BillingPeriods_t {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Date periodStart;
private Date periodEnd;
private Date dueDate;
private String status;
}

View File

@ -0,0 +1,32 @@
package com.realnet.Billing.Entitys;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import com.realnet.WhoColumn.Entity.Who_column;
import lombok.Data;
@Entity
@Data
public class CustomerRates_t extends Who_column {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String rateCard;
private String destination;
private String numericPrefix;
private String sellRate;
private String blockMinDuration;
private String initBlockRate;
private String dateStart;
private String dateEnd;
private String enabled;
private String dateAdded;
private String dateModified;
}

View File

@ -0,0 +1,325 @@
//package com.realnet.Billing.Job.Controller;
//
//import java.sql.SQLException;
//import java.util.ArrayList;
//import java.util.HashMap;
//import java.util.Iterator;
//import java.util.List;
//import java.util.Map;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpEntity;
//import org.springframework.http.HttpHeaders;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.MediaType;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.client.RestTemplate;
//
//import com.google.gson.JsonArray;
//import com.google.gson.JsonElement;
//import com.google.gson.JsonObject;
//import com.google.gson.JsonParser;
//import com.realnet.Billing.Job.Entity.BillingJobEntity;
//import com.realnet.Billing.Job.Repository.BillingJobRepository;
//
//import com.realnet.utils.Port_Constant;
//
//@RestController
//@RequestMapping("/token/BillingWorkflow/surejob")
//public class BillingJobServiceController {
// Logger log = LoggerFactory.getLogger(BillingJobServiceController.class);
//
// @Autowired
// private BillingJobRepository jobrepo;
//
// @Autowired
// private BillingPerfomaWorkFlowLineRepository flowrepo;
//
// @Autowired
// private BillingPerfomaWorkFlowLineRepository line_repo;
//
// @Autowired
// private BillingTaxInvoiceWorkFlowLineRepository billingTaxInvoiceWorkFlowLineRepository;
//
// @Autowired
// BillingJobService service;
//
// @PostMapping("/assignJob")
// public ResponseEntity<?> jobAssign() {
// BillingJobEntity obj = new BillingJobEntity();
// BillingJobEntity obj2 = new BillingJobEntity();
// // DataflowJobConsolidationEntity obj3 = new DataflowJobConsolidationEntity();
//
// obj.setConnection_name(null);
// obj.setJob_type("PerfomaInvoice");
// obj.setMethod("GET");
// obj.setParameters(null);
// obj.setUrl("/token/PerfomaSequentialApi/executeWorkflow");
// obj.setRef(null);
// jobrepo.save(obj);
//
// obj2.setConnection_name(null);
// obj2.setJob_type("TaxInvoice");
// obj2.setMethod("GET");
// obj2.setParameters(null);
// obj2.setRef(null);
// obj2.setUrl("/token/consolidation/MergeData");
// jobrepo.save(obj2);
//
// return new ResponseEntity<>(obj2, HttpStatus.ACCEPTED);
// }
//
// @GetMapping("/getjob/{job_type}")
// public ResponseEntity<?> getByJob(@PathVariable String job_type) {
//
// BillingJobEntity jobtype = jobrepo.getByJobType(job_type);
// return new ResponseEntity<>(jobtype, HttpStatus.ACCEPTED);
// }
//
// @GetMapping("/create_job/{id}")
// public ResponseEntity<?> createjob(@PathVariable Long id) throws SQLException {
//
// String job_url = "";
// String CRON_exp = "";
// String job_type = "";
// String title = "";
// String node = "";
// ArrayList<Object> list = new ArrayList<>();
// BillingPerfomaWorkFlowLine lines = flowrepo.getSetuWorkflowlines(id);
// String str = lines.getModel();
//
// JsonParser parser = new JsonParser();
// JsonElement element = parser.parse(str);
// JsonArray array = element.getAsJsonArray();
//// Iterator iterator = array.iterator();
//
// List<String> jobNamesList = new ArrayList<>();
//
// for (JsonElement jsonElement : array) {
//
// JsonObject jsonObject = jsonElement.getAsJsonObject();
//
// title = jsonObject.get("title").getAsString();
//
// StringBuilder builder = new StringBuilder();
//
// builder.append("no data");
// System.out.println(builder.toString());
//
// Map<String, String> jobprodata = new HashMap<String, String>();
// jobprodata.put("jobName", title + "_" + System.currentTimeMillis());
// jobprodata.put("jobGroup", "PerfomaInvoice");
//
// jobprodata.put("startTime", "2022-12-26T13:02");
// jobprodata.put("counter", "5");
// jobprodata.put("repeatTime", "5");
// jobprodata.put("cronExpression", "0/10 * * * * ?");
// jobprodata.put("line_id", id.toString());
// jobprodata.put("node_id", "null");
//
// System.out.println(jobprodata);
//
// System.out.println(jobprodata);
//
// RestTemplate restTemplate = new RestTemplate();
// String jobprourl2 = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.SURE_JOB_8089
// + "/surejob/schedule";
// HttpHeaders headers2 = getHeaders();
// HttpEntity<Object> request2 = new HttpEntity<Object>(jobprodata, headers2);
//
// ResponseEntity<Object> res2 = restTemplate.postForEntity(jobprourl2, request2, Object.class);
// System.out.println(res2.getStatusCodeValue());
//
// if (res2.getStatusCodeValue() == 200) {
// log.info("Gitea data inserted in sure job");
// System.out.println(res2.getBody());
// jobNamesList.add(jobprodata.get("jobName"));
// // jobNamesList.add(jobprodata.get("jobGroup"));
//
// }
// }
//
// return new ResponseEntity<>(jobNamesList, HttpStatus.ACCEPTED);
// }
//
// @GetMapping("/surejob/{id}")
// public ResponseEntity<?> forjobscheduler(@PathVariable Long id) throws SQLException {
//
// ArrayList<Object> list = new ArrayList<>();
// BillingPerfomaWorkFlowLine lines = flowrepo.getSetuWorkflowlines(id);
// String str = lines.getModel();
//
// JsonParser parser = new JsonParser();
// JsonElement element = parser.parse(str);
// JsonArray array = element.getAsJsonArray();
// Iterator iterator = array.iterator();
//
// String job_url = "";
// String CRON_exp = "";
// String job_type = "";
// BillingJobEntity job = null;
//
// Boolean auto_mapping = true;
// while (iterator.hasNext()) {
//
// Object next = iterator.next();
// JsonElement parse = parser.parse(next.toString());
// JsonObject jsonObject = parse.getAsJsonObject();
// // int i = jsonObject.get("id").getAsInt();
//
//
// job_type = "PerfomaInvoice";
//
//// if (job_type.isEmpty() || job_type.contains("null") || job_type == null) {
//// job_type = jsonObject.get("type").toString().replaceAll("\"", "");
//// }
//
// job = jobrepo.getByJobType(job_type);
//
// break;
//// }
//
// }
// return new ResponseEntity<>(job, HttpStatus.ACCEPTED);
// }
//// GET DATA FLOW LINE
//
// @GetMapping("/getline/{id}")
// public ResponseEntity<?> getline(@PathVariable Long id) {
//
// return new ResponseEntity<>(line_repo.getSetuWorkflowlines(id), HttpStatus.ACCEPTED);
//
// }
//
// private HttpHeaders getHeaders() {
// HttpHeaders headers = new HttpHeaders();
// headers.set("Content-Type", MediaType.APPLICATION_JSON_VALUE);
// headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
// return headers;
// }
//
// // Tax Invoice Job Start
//
// @GetMapping("/create_job/{id}")
// public ResponseEntity<?> createjobforTaxInvoice(@PathVariable Long id) throws SQLException {
//
// String job_url = "";
// String CRON_exp = "";
// String job_type = "";
// String title = "";
// String node = "";
// ArrayList<Object> list = new ArrayList<>();
// BillingTaxInvoiceWorkFlowLine lines = billingTaxInvoiceWorkFlowLineRepository.getSetuWorkflowlines(id);
// String str = lines.getModel();
//
// JsonParser parser = new JsonParser();
// JsonElement element = parser.parse(str);
// JsonArray array = element.getAsJsonArray();
//// Iterator iterator = array.iterator();
//
// List<String> jobNamesList = new ArrayList<>();
//
// for (JsonElement jsonElement : array) {
//
// JsonObject jsonObject = jsonElement.getAsJsonObject();
//
// title = jsonObject.get("title").getAsString();
//
// StringBuilder builder = new StringBuilder();
//
// builder.append("no data");
// System.out.println(builder.toString());
//
// Map<String, String> jobprodata = new HashMap<String, String>();
// jobprodata.put("jobName", title + "_" + System.currentTimeMillis());
// jobprodata.put("jobGroup", "TaxInvoice");
//
// jobprodata.put("startTime", "2022-12-26T13:02");
// jobprodata.put("counter", "5");
// jobprodata.put("repeatTime", "5");
// jobprodata.put("cronExpression", "0/10 * * * * ?");
// jobprodata.put("line_id", id.toString());
// jobprodata.put("node_id", "null");
//
// System.out.println(jobprodata);
//
// System.out.println(jobprodata);
//
// RestTemplate restTemplate = new RestTemplate();
// String jobprourl2 = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.SURE_JOB_8089
// + "/surejob/schedule";
// HttpHeaders headers2 = getHeaders();
// HttpEntity<Object> request2 = new HttpEntity<Object>(jobprodata, headers2);
//
// ResponseEntity<Object> res2 = restTemplate.postForEntity(jobprourl2, request2, Object.class);
// System.out.println(res2.getStatusCodeValue());
//
// if (res2.getStatusCodeValue() == 200) {
// log.info("Gitea data inserted in sure job");
// System.out.println(res2.getBody());
// jobNamesList.add(jobprodata.get("jobName"));
// // jobNamesList.add(jobprodata.get("jobGroup"));
//
// }
// }
//
// return new ResponseEntity<>(jobNamesList, HttpStatus.ACCEPTED);
// }
//
//
//
//
//
//
//
//
//
// @GetMapping("/surejob/taxInvoice/{id}")
// public ResponseEntity<?> forjobschedulerInvoicetax(@PathVariable Long id) throws SQLException {
//
// ArrayList<Object> list = new ArrayList<>();
// BillingTaxInvoiceWorkFlowLine lines = billingTaxInvoiceWorkFlowLineRepository.getSetuWorkflowlines(id);
// String str = lines.getModel();
//
// JsonParser parser = new JsonParser();
// JsonElement element = parser.parse(str);
// JsonArray array = element.getAsJsonArray();
// Iterator iterator = array.iterator();
//
// String job_url = "";
// String CRON_exp = "";
// String job_type = "";
// BillingJobEntity job = null;
//
// Boolean auto_mapping = true;
// while (iterator.hasNext()) {
//
// Object next = iterator.next();
// JsonElement parse = parser.parse(next.toString());
// JsonObject jsonObject = parse.getAsJsonObject();
// // int i = jsonObject.get("id").getAsInt();
//
//
// job_type = "TaxInvoice";
//
//// if (job_type.isEmpty() || job_type.contains("null") || job_type == null) {
//// job_type = jsonObject.get("type").toString().replaceAll("\"", "");
//// }
//
// job = jobrepo.getByJobType(job_type);
//
// break;
//// }
//
// }
// return new ResponseEntity<>(job, HttpStatus.ACCEPTED);
// }
//
//}

View File

@ -0,0 +1,25 @@
package com.realnet.Billing.Job.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Data
@Entity
public class BillingJobEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
private String parameters;
private String url;
private String method;
private String connection_name;
private String job_type;
private String ref;
}

View File

@ -0,0 +1,16 @@
package com.realnet.Billing.Job.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.Billing.Job.Entity.BillingJobEntity;
@Repository
public interface BillingJobRepository extends JpaRepository<BillingJobEntity, Long> {
@Query(value = "SELECT * FROM billing_job_entity where job_type=?1", nativeQuery = true)
BillingJobEntity getByJobType(String jobtype);
}

View File

@ -0,0 +1,23 @@
//package com.realnet.Billing.Job.Service;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import com.realnet.DataConsolidation.Entity.DataflowJobConsolidationEntity;
//import com.realnet.DataConsolidation.Repository.DataflowJobConsolidationRepository;
//
//
//@Service
//public class BillingJobService {
//
// @Autowired
// private DataflowJobConsolidationRepository jobrepo;
//
// public DataflowJobConsolidationEntity getJobtype(String jobtype) {
// DataflowJobConsolidationEntity byJobType = jobrepo.getByJobType(jobtype);
// return byJobType;
// }
//
//
//
//}

View File

@ -0,0 +1,11 @@
package com.realnet.Billing.Repositorys;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.Billing.Entitys.ApprovalHistory_t;
@Repository
public interface ApprovalHistory_Repository extends JpaRepository<ApprovalHistory_t, Long> {
}

View File

@ -0,0 +1,13 @@
package com.realnet.Billing.Repositorys;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.Billing.Dto.ApprovalQueue_SO;
import java.util.List;
@Repository
public interface ApprovalQueue_Repository extends JpaRepository<ApprovalQueue_SO, Long> {
List<ApprovalQueue_SO> findByDocumentSeq(Long docid);
}

View File

@ -0,0 +1,9 @@
package com.realnet.Billing.Repositorys;
import com.realnet.Billing.Dto.ApprovalNote_SO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface ApprovalReturnHistory_Repo extends JpaRepository<ApprovalNote_SO,Long> {
}

View File

@ -0,0 +1,135 @@
package com.realnet.Billing.Services;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.realnet.Billing.Entitys.ApprovalHistory_t;
import com.realnet.Billing.Repositorys.ApprovalHistory_Repository;
@Service
public class ApprovalHistory_Service {
@Autowired
private ApprovalHistory_Repository Repository;
// @Autowired
// private ServiceOrder_Repository serviceOrder_Repository1;
public ApprovalHistory_t Savedata(ApprovalHistory_t data) {
return Repository.save(data);
}
public List<ApprovalHistory_t> getdetails() {
return (List<ApprovalHistory_t>) Repository.findAll();
}
public ApprovalHistory_t getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public ApprovalHistory_t update(ApprovalHistory_t data, Long id) {
ApprovalHistory_t old = Repository.findById(id).get();
old.setDocument_type(data.getDocument_type());
old.setDocument_id(data.getDocument_id());
old.setActioned_by(data.getActioned_by());
old.setAction(data.getAction());
old.setComments(data.getComments());
final ApprovalHistory_t test = Repository.save(old);
return test;
}
// public ServiceOrder_t updateServiceOrderStatus(Long serviceOrderId, String newStatus, String actionedBy, String comments) {
// try {
// Optional<ServiceOrder_t> optionalServiceOrder = serviceOrder_Repository.findById(serviceOrderId);
// if (optionalServiceOrder.isEmpty()) {
// throw new EntityNotFoundException("Service Order not found with ID: " + serviceOrderId);
// }
//
// ServiceOrder_t serviceOrder = optionalServiceOrder.get();
// serviceOrder.setStatus(newStatus);
// serviceOrder_Repository.save(serviceOrder);
//
// // Insert data into Approval History table
// ApprovalHistory_t approvalHistory = new ApprovalHistory_t();
// approvalHistory.setDocument_type("ServiceOrder");
// approvalHistory.setDocument_id(serviceOrderId);
// approvalHistory.setActioned_by(actionedBy);
// approvalHistory.setAction("Status Updated");
// approvalHistory.setComments(comments);
// // Set other fields in the Approval History table as needed
//
// Repository.save(approvalHistory);
//
// return serviceOrder;
// } catch (EntityNotFoundException ex) {
// // Handle EntityNotFoundException (Service Order not found)
// // You can log the error, return a custom error response, or throw a new exception.
// throw ex;
// } catch (Exception ex) {
// // Handle other exceptions (e.g., database errors, unexpected issues)
// // You can log the error, return a custom error response, or throw a new exception.
// throw new RuntimeException("Error updating Service Order status.", ex);
// }
// }
//
// public ServiceOrderDto updateServiceOrderStatus(Long serviceOrderId, String newStatus, String actionedBy, String comments) {
// // ... existing code to update status ...
//
//
//
// // Convert ServiceOrder_t entity to ServiceOrderDto
// ServiceOrderDto serviceOrderDto = convertToDto(serviceOrder);
//
// return serviceOrderDto;
// }
//
// public ServiceOrderDto updateServiceOrderStatus(Long serviceOrderId, String newStatus, String actionedBy,
// String comments) {
// try {
// Optional<ServiceOrder_t> optionalServiceOrder = serviceOrder_Repository.findById(serviceOrderId);
// if (!optionalServiceOrder.isPresent()) {
// throw new EntityNotFoundException("Service Order not found with ID: " + serviceOrderId);
// }
//
// ServiceOrder_t serviceOrder = optionalServiceOrder.get();
// serviceOrder.setStatus(newStatus);
// serviceOrder_Repository.save(serviceOrder);
//
// // Insert data into Approval History table
// ApprovalHistory_t approvalHistory = new ApprovalHistory_t();
// approvalHistory.setDocument_type("ServiceOrder");
// approvalHistory.setDocument_id(serviceOrderId);
// approvalHistory.setActioned_by(actionedBy);
// approvalHistory.setAction("Status Updated");
// approvalHistory.setComments(comments);
// // Set other fields in the Approval History table as needed
//
// Repository.save(approvalHistory);
//
// // Convert ServiceOrder_t entity to DTO and return
// return convertToDto(serviceOrder);
// } catch (EntityNotFoundException ex) {
// // Handle EntityNotFoundException (Service Order not found)
// // You can log the error, return a custom error response, or throw a new
// // exception.
// throw ex;
// } catch (Exception ex) {
// // Handle other exceptions (e.g., database errors, unexpected issues)
// // You can log the error, return a custom error response, or throw a new
// // exception.
// throw new RuntimeException("Error updating Service Order status.", ex);
// }
// }
// private ServiceOrderDto convertToDto(ServiceOrder_t serviceOrder) {
// // Perform mapping from ServiceOrder_t entity to ServiceOrderDto
// ModelMapper modelMapper = new ModelMapper();
// return modelMapper.map(serviceOrder, ServiceOrderDto.class);
// }
}

View File

@ -0,0 +1,31 @@
package com.realnet.Billing.Services;
import com.realnet.Billing.Dto.ApprovalQueue_SO;
import com.realnet.Billing.Repositorys.ApprovalQueue_Repository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ApprovalQueueService {
@Autowired
private ApprovalQueue_Repository approvalQueueRepository;
public ApprovalQueue_SO saveApprovalQueue(ApprovalQueue_SO approvalQueueSOSO) {
return approvalQueueRepository.save(approvalQueueSOSO);
}
public List<ApprovalQueue_SO> getAllApprovalQueue() {
return approvalQueueRepository.findAll();
}
public ApprovalQueue_SO getApprovalQueueById(Long id) {
return approvalQueueRepository.findById(id).orElse(null);
}
public List<ApprovalQueue_SO> getAllQueueForDocument(Long docid) {
return approvalQueueRepository.findByDocumentSeq(docid);
}
}

View File

@ -0,0 +1,21 @@
package com.realnet.Builders.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Entity
@Data
public class Builder_entity_t {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String job_type;
private String job_name;
}

View File

@ -0,0 +1,15 @@
package com.realnet.Builders.Repos;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.Builders.Entity.Builder_entity_t;
@Repository
public interface BuilderRepository extends JpaRepository<Builder_entity_t, Long> {
@Query(value = "select * from builder_entity_t where job_name= ?1 && job_type=?2", nativeQuery = true)
Builder_entity_t findByjobTypeAndName(String job_name, String job_type);
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,43 @@
package com.realnet.BulkUpload.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.BulkUpload.Entity.BulkUpload_t;
import com.realnet.BulkUpload.Services.BulkUpload_Service;
@RequestMapping(value = "/BulkUpload")
@RestController
public class BulkUpload_Controller {
@Autowired
private BulkUpload_Service Service;
@PostMapping("/BulkUpload")
public BulkUpload_t Savedata(@RequestBody BulkUpload_t data) {
BulkUpload_t save = Service.Savedata(data) ;
return save;
}
@GetMapping("/BulkUpload")
public List<BulkUpload_t> getdetails() {
List<BulkUpload_t> get = Service.getdetails();
return get;
}
@GetMapping("/BulkUpload/{id}")
public BulkUpload_t getdetailsbyId(@PathVariable Long id ) {
BulkUpload_t get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/BulkUpload/{id}")
public void delete_by_id(@PathVariable Long id ) {
Service.delete_by_id(id);
}
@PutMapping("/BulkUpload/{id}")
public BulkUpload_t update(@RequestBody BulkUpload_t data,@PathVariable Long id ) {
BulkUpload_t update = Service.update(data,id);
return update;
}
}

View File

@ -0,0 +1,124 @@
package com.realnet.BulkUpload.Controllers;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.realnet.BulkUpload.Entity.MappingRule;
import com.realnet.BulkUpload.Services.MappingRuleService;
@RestController
@RequestMapping("/MappingRule")
public class MappingRuleController {
@Autowired
private MappingRuleService Service;
@PostMapping("/MappingRule")
public MappingRule Savedata(@RequestBody MappingRule data) {
MappingRule save = Service.Savedata(data);
return save;
}
@GetMapping("/MappingRule")
public List<MappingRule> getdetails() {
List<MappingRule> get = Service.getdetails();
return get;
}
@GetMapping("/MappingRule/{id}")
public MappingRule getdetailsbyId(@PathVariable Long id) {
MappingRule get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/MappingRule/{id}")
public void delete_by_id(@PathVariable Long id) {
Service.delete_by_id(id);
}
@PutMapping("/MappingRule/{id}")
public MappingRule update(@RequestBody MappingRule data, @PathVariable Long id) {
MappingRule update = Service.update(data, id);
return update;
}
@GetMapping("/getHeaders")
public ResponseEntity<?> getFileHeadersForSheet(
@RequestParam("file") MultipartFile excelFile,
@RequestParam("sheetName") String sheetName) {
try (Workbook workbook = WorkbookFactory.create(excelFile.getInputStream())) {
List<String> sheetHeaders = new ArrayList<>();
Sheet sheet = workbook.getSheet(sheetName);
if (sheet == null) {
return ResponseEntity.notFound().build(); // Sheet not found
}
Row headerRow = sheet.getRow(0);
if (headerRow != null) {
for (Cell cell : headerRow) {
String header = cell.getStringCellValue();
sheetHeaders.add(header);
}
}
return ResponseEntity.ok(sheetHeaders);
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file.");
}
}
// @GetMapping("/getHeadersMapping")
// public ResponseEntity<?> getAllSheetHeadersForMapping(@RequestParam("file") MultipartFile excelFile,@RequestParam("sheetName") String sheetName) {
// try (Workbook workbook = WorkbookFactory.create(excelFile.getInputStream())) {
// Map<String, List<Map<String, String>>> sheetHeadersMap = new LinkedHashMap<>();
//
// for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
// Sheet sheet = workbook.getSheet(sheetName);
// List<Map<String, String>> sheetHeaders = new ArrayList<>();
//
// Row headerRow = sheet.getRow(0);
//
// if (headerRow != null) {
// for (Cell cell : headerRow) {
// String header = cell.getStringCellValue();
// Map<String, String> headerObject = new LinkedHashMap<>();
// headerObject.put("headerName", header);
// headerObject.put("value", ""); // Empty value
// sheetHeaders.add(headerObject);
// }
// }
//
// sheetHeadersMap.put(sheet.getSheetName(), sheetHeaders);
// }
//
// return ResponseEntity.ok(sheetHeadersMap);
// } catch (Exception e) {
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file.");
// }
// }
}

View File

@ -0,0 +1,600 @@
package com.realnet.BulkUpload.Controllers;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.InputStreamResource;
import org.springframework.core.io.Resource;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.realnet.BulkUpload.Entity.BulkUpload_t;
import com.realnet.BulkUpload.Repository.BulkUpload_Repository;
import com.realnet.BulkUpload.Services.BulkUpload_Service;
import com.realnet.template.entity.TemplateFileUpload;
import com.realnet.template.repository.TemplatedataRepo;
import com.realnet.template.service.DynamicTemplateService;
import com.realnet.template.service.FileUploadService;
@RestController
@RequestMapping("/masterimport")
public class MasterImportController {
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
private TemplatedataRepo temprepo;
@Autowired
private DynamicTemplateService dynamicTemplateService;
@Autowired
private BulkUpload_Service bulkUpload_Service;
@Autowired
private BulkUpload_Repository bulkUpload_Repository;
@Autowired
private FileUploadService fileUploadService;
@Autowired
private ObjectMapper objectMapper;
@Value("${projectPath}")
private String projectPath;
@GetMapping("/demo/download/{file_type}")
public ResponseEntity<?> demoTemplate(@PathVariable String file_type) throws IOException {
Workbook workbook = new XSSFWorkbook();
if (file_type.equalsIgnoreCase("Customer")) {
// Create Customer sheet with headers only
String[] customerHeaders = { "balance", "c_status", "city", "country","currency_code","customer_id",
"date_of_birth", "defaultsite_id", "email", "entity_name","file_name","file_path",
"first_name", "gender", "gst_no", "gst_state","house_no","mobile_no",
"pan_no", "sales_rep", "special_price", "state","street_address","street_address2",
"time_zone", "postal_code", "contact_number"};
createSheetWithHeaders(workbook, "Customer", customerHeaders);
// Create Site sheet with headers only
String[] siteHeaders = { "Site Name", "Site Description", "Active", "Test" };
createSheetWithHeaders(workbook, "Site", siteHeaders);
} else {
return new ResponseEntity<String>("Not found", HttpStatus.BAD_REQUEST);
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
workbook.write(out);
return ResponseEntity.ok()
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + file_type + "_template.xlsx")
.contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(out.toByteArray());
}
private void createSheetWithHeaders(Workbook workbook, String sheetName, String[] headers) {
Sheet sheet = workbook.createSheet(sheetName);
Row headerRow = sheet.createRow(0);
// Create headers
for (int col = 0; col < headers.length; col++) {
Cell cell = headerRow.createCell(col);
cell.setCellValue(headers[col]);
}
}
@PostMapping("/DownloadExcelForMaster/{id}")
public ResponseEntity<?> DownloadExcelForMaster(@PathVariable Long id,
@RequestBody Map<String, List<Map<String, Object>>> jsonData) {
try {
List<TemplateFileUpload> templateFileUpload = temprepo.findUnprocessedRecordsOrderedByIdAsc();
if (!templateFileUpload.isEmpty()) {
for (TemplateFileUpload upload : templateFileUpload) {
String entity_name = upload.getEntity_name();
BulkUpload_t bulkUpload_t = bulkUpload_Repository.getentityName(entity_name);
String ruleLine = bulkUpload_t.getRule_line();
// BulkUpload_t bulkUpload_t = bulkUpload_Repository.getentityName(entity_name);
// String ruleLine = bulkUpload_t.getRule_line();
JsonParser parser = new JsonParser();
JsonElement element = parser.parse(ruleLine);
JsonArray array = element.getAsJsonArray();
Iterator<JsonElement> iterator = array.iterator();
String fromsheet = null;
String fromColumn = null;
String validationTable = null;
String checkColumn = null;
String useColumn = null;
String replacementtable = null;
String replacementcolumn = null;
while (iterator.hasNext()) {
JsonElement next = iterator.next();
JsonObject jsonObject = next.getAsJsonObject();
fromsheet = jsonObject.get("fromsheet").getAsString();
fromColumn = jsonObject.get("fromColumn").getAsString();
validationTable = jsonObject.get("validationTable").getAsString();
checkColumn = jsonObject.get("checkColumn").getAsString();
useColumn = jsonObject.get("useColumn").getAsString();
replacementtable = jsonObject.get("useTable").getAsString();
replacementcolumn = jsonObject.get("replacementcolumn").getAsString();
break;
}
String customerTableName = validationTable;
String siteTableName = replacementtable;
Set<String> tableNames = jsonData.keySet(); // Get all unique table names
String siteEntityName = null;
for (String tableName : tableNames) {
List<Map<String, Object>> tableData = jsonData.get(tableName);
// Process tableData based on the tableName (e.g., "Site" or "Customer")
System.out.println("Table Name: " + tableName);
for (Map<String, Object> row : tableData) {
// Process individual rows within the table data
System.out.println("Row Data: " + row);
}
}
List<Map<String, Object>> processedDataList = new ArrayList<>(); // List to hold processed data rows
// Iterate through each customer data entry
List<Map<String, Object>> customerData = jsonData.get("Customer");
for (Map<String, Object> insertCustomerData : customerData) {
String customerName = (String) insertCustomerData.get(checkColumn);
// Check if the customerName is not null and iterate through "Site" data
List<Map<String, Object>> siteData = jsonData.get(fromsheet);
List<Map<String, Object>> matchedSiteData = new ArrayList<>();
if (customerName != null) {
// Iterate through "Site" data and check for a matching "entity_name"
for (Map<String, Object> siteRow : siteData) {
// Specify the index as "AM" (39th column)
// String columnIndex = "AM";
String columnIndex = fromColumn;
// Retrieve the value at the specified index
for (Map.Entry<String, Object> entry : siteRow.entrySet()) {
if (entry.getKey().equals(columnIndex)) {
siteEntityName = (String) entry.getValue();
break; // Exit the loop once the value is found
}
}
if (customerName.equals(siteEntityName)) {
// Add the matching "Site" data to the list
matchedSiteData.add(siteRow);
}
}
}
ObjectMapper objectMapper = new ObjectMapper();
String insertCustomerDataJson = objectMapper.writeValueAsString(insertCustomerData);
String matchedSiteDataJson = objectMapper.writeValueAsString(matchedSiteData);
String customerSql = getInsertQuery(customerTableName, insertCustomerData);
// Insert data into the customer table
Object[] customerValues = new Object[insertCustomerData.size() + 5];
int index = 0;
for (Object value : insertCustomerData.values()) {
customerValues[index++] = value;
}
customerValues[index++] = new Timestamp(System.currentTimeMillis()); // created_at
customerValues[index++] = null; // created_by
customerValues[index++] = null; // updated_by
customerValues[index++] = new Timestamp(System.currentTimeMillis()); // updated_at
customerValues[index] = null; // account_id
jdbcTemplate.update(customerSql, customerValues);
// we can use useColumn here
Long generatedId = jdbcTemplate.queryForObject("SELECT LAST_INSERT_ID()", Long.class);
List<Map<String, Object>> insertMatchedSiteData = new ArrayList<>(); // List to hold processed
// data rows
for (Map<String, Object> siteRow : matchedSiteData) {
// Replace "Customer Name" with "customer_master_id" if it exists
if (siteRow.containsKey(siteEntityName)) {
siteRow.put(replacementcolumn, generatedId);
siteRow.remove(siteEntityName);
}
insertMatchedSiteData.add(siteRow);
}
for (Map<String, Object> siteRow : insertMatchedSiteData) {
Object[] siteValues = new Object[siteRow.size() + 5]; // Create a new array for each row
int siteIndex = 0;
for (Object value : siteRow.values()) {
siteValues[siteIndex++] = value;
}
siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // created_at
siteValues[siteIndex++] = null; // created_by
siteValues[siteIndex++] = null; // updated_by
siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // updated_at
siteValues[siteIndex] = null; // account_id
String siteSql = getInsertQuery(siteTableName, siteRow);
jdbcTemplate.update(siteSql, siteValues);
}
// Add the processed customer data to the list
processedDataList.add(insertCustomerData);
}
// Use a LinkedHashMap to preserve insertion order in the response
Map<String, List<Map<String, Object>>> response = new LinkedHashMap<>();
response.put("result", processedDataList);
return new ResponseEntity<>(response, HttpStatus.OK);
}
}
return new ResponseEntity<>("No data to process", HttpStatus.OK);
} catch (Exception e) {
e.printStackTrace();
// Handle exceptions and return an appropriate response
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
private List<String> getColumnNames(Map<String, Object> dataRow) {
return new ArrayList<>(dataRow.keySet());
}
// Method to write data to a sheet
private void writeDataToSheet(List<Map<String, Object>> dataList, XSSFSheet sheet, List<String> columnNames) {
int rowIndex = 0;
// Create the header row
XSSFRow headerRow = sheet.createRow(rowIndex++);
for (int i = 0; i < columnNames.size(); i++) {
XSSFCell cell = headerRow.createCell(i);
cell.setCellValue(columnNames.get(i));
}
// Add "Status" and "Exception" columns to the sheet
headerRow.createCell(columnNames.size()).setCellValue("Status");
headerRow.createCell(columnNames.size() + 1).setCellValue("Exception");
// Write the data rows
for (Map<String, Object> row : dataList) {
XSSFRow dataRow = sheet.createRow(rowIndex++);
int columnIndex = 0;
for (String columnName : columnNames) {
Object value = row.get(columnName);
XSSFCell cell = dataRow.createCell(columnIndex++);
cell.setCellValue(value != null ? value.toString() : "");
}
// Add "Status" and "Exception" values to the data row
dataRow.createCell(columnIndex++).setCellValue(row.get("Status").toString());
dataRow.createCell(columnIndex).setCellValue(row.get("Exception").toString());
}
}
private String extractExceptionMessage(DataIntegrityViolationException e) {
String errorMessage = e.getMessage();
int startIndex = errorMessage.indexOf("Incorrect ");
int endIndex = errorMessage.indexOf("at row");
if (startIndex != -1 && endIndex != -1) {
return errorMessage.substring(startIndex, endIndex).trim();
}
return errorMessage;
}
private String getInsertQuery(String tableName, Map<String, Object> data) {
StringBuilder sqlBuilder = new StringBuilder();
sqlBuilder.append("INSERT INTO ");
sqlBuilder.append(tableName);
sqlBuilder.append(" (");
sqlBuilder.append(String.join(", ", data.keySet()));
sqlBuilder.append(", created_at, created_by, updated_by, updated_at, account_id) VALUES (");
sqlBuilder.append(String.join(", ", Collections.nCopies(data.size(), "?")));
sqlBuilder.append(", ?, ?, ?, ?, ?)");
return sqlBuilder.toString();
}
@GetMapping("/sheet/{id}")
public ResponseEntity<?> getSheet(@PathVariable Long id) throws IOException {
ResponseEntity<?> jsonData = convertFileToJsonforsheet(id);
return ResponseEntity.ok(jsonData.getBody());
}
public ResponseEntity<?> convertFileToJsonforsheet(Long id) throws IOException {
// Retrieve the TemplateFileUpload entity based on the provided ID
Optional<TemplateFileUpload> fileUploadOptional = temprepo.findById(id);
if (!fileUploadOptional.isPresent()) {
// Handle the case where the file is not found in the specified location
return ResponseEntity.notFound().build();
}
TemplateFileUpload fileUpload = fileUploadOptional.get();
String location = fileUpload.getFile_location();
String fileName = fileUpload.getFile_changed_name() + ".xlsx";
String filePath = location + File.separator + "processingfile" + File.separator + fileName;
File file = new File(filePath);
if (!file.exists()) {
// Handle the case where the file is not found in the specified location
return ResponseEntity.notFound().build();
}
try (FileInputStream fis = new FileInputStream(file)) {
XSSFWorkbook workbook = new XSSFWorkbook(fis);
List<String> sheetNames = new ArrayList<>();
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
XSSFSheet sheet = workbook.getSheetAt(i);
String sheetName = sheet.getSheetName();
sheetNames.add(sheetName);
}
return ResponseEntity.ok(sheetNames);
} catch (Exception e) {
// Handle any exceptions that may occur during processing
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file.");
}
}
@GetMapping("/downloadImportStatement/{id}")
public ResponseEntity<?> downloadImportStatement(@PathVariable Long id) {
// Retrieve the file data from the database based on the ID
TemplateFileUpload fileUpload = fileUploadService.getFileById(id);
// Get the file location from the entity
String fileLocation = fileUpload.getDownloadfileLocation();
// String filename = fileUpload.getDownloadfileName();
//
// String filepath = fileLocation + File.separator + filename;
try {
// Read the file content from the specified location
byte[] fileContent = Files.readAllBytes(Paths.get(fileLocation));
// Create a ByteArrayResource from the file content
ByteArrayResource resource = new ByteArrayResource(fileContent);
return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM)
.header(HttpHeaders.CONTENT_DISPOSITION,
"attachment; filename=\"" + fileUpload.getFile_name() + "\"")
.body(resource);
} catch (IOException e) {
// Handle any potential exceptions (e.g., file not found)
e.printStackTrace();
return ResponseEntity.status(500).body("Error occurred while reading the file.");
}
}
@GetMapping("/columns/{tableName}")
public List<String> getColumnNames(@PathVariable String tableName) {
Set<String> columnNamesSet = new HashSet<>();
String convertedTableName = tableName;
List<String> columnNames = jdbcTemplate.queryForList(
"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ?",
new Object[] { convertedTableName }, String.class);
// Exclude specific column names
List<String> excludedColumns = Arrays.asList("id", "account_id", "updated_at", "created_at", "created_by",
"updated_by");
for (String columnName : columnNames) {
if (!excludedColumns.contains(columnName)) {
columnNamesSet.add(columnName);
}
}
return new ArrayList<>(columnNamesSet);
}
private String getCellValue(Map<String, List<Map<String, Object>>> jsonData, String sheetName, String cellAddress)
throws IOException {
if (jsonData.containsKey(sheetName)) {
List<Map<String, Object>> sheetData = jsonData.get(sheetName);
int size = sheetData.size();
System.out.println(size);
Map<String, Object> firstRowData = sheetData.get(0);
// Separate the numeric part (row part) and non-numeric part (column part)
String rowPart = "";
String columnPart = "";
for (char c : cellAddress.toCharArray()) {
if (Character.isDigit(c)) {
rowPart += c;
} else {
columnPart += c;
}
}
System.out.println("Column Part: " + columnPart);
System.out.println("Row Part: " + rowPart);
int columnIndex = getColumnIndex(columnPart); // Get the column index based on the columnPart
// int rowIndex = Integer.parseInt(rowPart) - 1; // Excel-style 1-based index
System.out.println("Column Index: " + columnIndex);
if (columnIndex >= 0) {
// Get the list of keys from the firstRowData map
List<String> keys = new ArrayList<>(firstRowData.keySet());
// Check if the columnIndex is within the range of keys
if (columnIndex < keys.size()) {
String columnName = keys.get(columnIndex);
return columnName;
}
}
}
return null;
}
private int getColumnIndex(String columnPart) {
int index = 0;
int multiplier = 1;
// Iterate through the columnPart in reverse order (right to left)
for (int i = columnPart.length() - 1; i >= 0; i--) {
char c = columnPart.charAt(i);
index += (c - 'A' + 1) * multiplier;
multiplier *= 26; // Multiply by 26 for each position to calculate the index
}
return index - 1; // Subtract 1 to get a 0-based index
}
@PostMapping("/DownloadExcel/{entityName}")
public ResponseEntity<Resource> importdatadownloadexcel(@PathVariable String entityName,
@RequestBody List<Map<String, Object>> data) throws IOException {
List<Map<String, Object>> processedData = processData(entityName, data);
if (!processedData.isEmpty()) {
Workbook workbook = createWorkbook(processedData);
Resource resource = createExcelResource(workbook);
return ResponseEntity.ok().contentType(MediaType.parseMediaType("application/vnd.ms-excel"))
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=failed_records.xlsx").body(resource);
}
return ResponseEntity.ok().body(null);
}
private List<Map<String, Object>> processData(String entityName, List<Map<String, Object>> data) {
List<Map<String, Object>> processedData = new ArrayList<>();
try {
String convertedTableName = entityName;
String sql = getInsertQuery(convertedTableName, data.get(0));
for (int i = 0; i < data.size(); i++) {
Map<String, Object> row = data.get(i);
Map<String, Object> processedRow = new HashMap<>();
try {
Object[] values = new Object[row.size() + 5]; // +5 for the additional columns
int index = 0;
for (Object value : row.values()) {
values[index++] = value;
}
values[index++] = new Timestamp(System.currentTimeMillis()); // created_at
values[index++] = null; // created_by
values[index++] = null; // updated_by
values[index++] = new Timestamp(System.currentTimeMillis()); // updated_at
values[index] = null; // account_id
jdbcTemplate.update(sql, values);
processedRow.putAll(row);
processedRow.put("Status", "Success");
processedRow.put("Exception", "NA");
} catch (DataIntegrityViolationException e) {
processedRow.putAll(row);
processedRow.put("Status", "Error");
String exceptionMessage = extractExceptionMessage(e);
processedRow.put("Exception", exceptionMessage);
}
processedData.add(processedRow);
}
} catch (Exception e) {
// Handle any exceptions here if needed
}
return processedData;
}
private Workbook createWorkbook(List<Map<String, Object>> processedData) {
Workbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet("Failed Records");
// Add column headers to the worksheet
Row headerRow = sheet.createRow(0);
int columnIndex = 0;
for (String key : processedData.get(0).keySet()) {
Cell cell = headerRow.createCell(columnIndex++);
cell.setCellValue(key);
}
// Add data rows to the worksheet
int rowIndex = 1;
for (Map<String, Object> row : processedData) {
Row dataRow = sheet.createRow(rowIndex++);
columnIndex = 0;
for (Object value : row.values()) {
Cell cell = dataRow.createCell(columnIndex++);
cell.setCellValue(value.toString());
}
}
return workbook;
}
private Resource createExcelResource(Workbook workbook) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
workbook.write(outputStream);
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
return new InputStreamResource(inputStream);
}
// private ResponseEntity<?> getData(@PathVariable String type ){
// if(type.equalsIgnoreCase("Customer")) {
//
//
// String[] customerHeaders = { "balance", "c_status", "city", "country","currency_code","customer_id",
// "date_of_birth", "defaultsite_id", "email", "entity_name","file_name","file_path",
// "first_name", "gender", "gst_no", "gst_state","house_no","mobile_no",
// "pan_no", "sales_rep", "special_price", "state","street_address","street_address2",
// "time_zone", "postal_code", "contact_number"};
//
//
// }
//
// }
}

View File

@ -0,0 +1,21 @@
package com.realnet.BulkUpload.Entity;
import lombok.*;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Entity
@Data
public class BulkUpload_t{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String entity_name;
private String description;
private String rule_line;
private boolean active;
private String fileType;
}

View File

@ -0,0 +1,24 @@
package com.realnet.BulkUpload.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Entity
@Data
public class MappingRule {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String entity_name;
private String description;
private String mapping_rule;
private boolean active;
private String fileType;
}

View File

@ -0,0 +1,21 @@
package com.realnet.BulkUpload.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.BulkUpload.Entity.BulkUpload_t;
@Repository
public interface BulkUpload_Repository extends JpaRepository<BulkUpload_t, Long> {
@Query(value = "SELECT * FROM bulk_upload_t where entity_name =?1", nativeQuery = true)
BulkUpload_t getentityName(String name);
// @Query(value = "SELECT * FROM bulk_upload_t where entity_name =?1", nativeQuery = true)
// BulkUpload_t getByName(String name);
}

View File

@ -0,0 +1,11 @@
package com.realnet.BulkUpload.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.BulkUpload.Entity.MappingRule;
@Repository
public interface MappingRuleRepository extends JpaRepository<MappingRule, Long>{
}

View File

@ -0,0 +1,40 @@
package com.realnet.BulkUpload.Services;
import com.realnet.BulkUpload.Repository.BulkUpload_Repository;
import com.realnet.BulkUpload.Entity.BulkUpload_t;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class BulkUpload_Service {
@Autowired
private BulkUpload_Repository Repository;
public BulkUpload_t Savedata(BulkUpload_t data) {
return Repository.save(data);
}
public List<BulkUpload_t> getdetails() {
return (List<BulkUpload_t>) Repository.findAll();
}
public BulkUpload_t getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public BulkUpload_t update(BulkUpload_t data, Long id) {
BulkUpload_t old = Repository.findById(id).get();
old.setEntity_name(data.getEntity_name());
old.setDescription(data.getDescription());
old.setRule_line(data.getRule_line());
old.setActive(data.isActive());
final BulkUpload_t test = Repository.save(old);
return test;
}
}

View File

@ -0,0 +1,43 @@
package com.realnet.BulkUpload.Services;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.realnet.BulkUpload.Entity.BulkUpload_t;
import com.realnet.BulkUpload.Entity.MappingRule;
import com.realnet.BulkUpload.Repository.MappingRuleRepository;
@Service
public class MappingRuleService {
@Autowired
private MappingRuleRepository Repository;
public MappingRule Savedata(MappingRule data) {
return Repository.save(data);
}
public List<MappingRule> getdetails() {
return (List<MappingRule>) Repository.findAll();
}
public MappingRule getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public MappingRule update(MappingRule data, Long id) {
MappingRule old = Repository.findById(id).get();
old.setEntity_name(data.getEntity_name());
old.setDescription(data.getDescription());
old.setMapping_rule(data.getMapping_rule());
old.setActive(data.isActive());
final MappingRule test = Repository.save(old);
return test;
}
}

View File

@ -0,0 +1,40 @@
//package com.realnet.CredentialDatabase.Config;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.jdbc.datasource.DriverManagerDataSource;
//
//import com.fasterxml.jackson.core.JsonProcessingException;
//import com.fasterxml.jackson.databind.JsonMappingException;
//import com.realnet.CredentialDatabase.Service.SurevaultService;
//
//import java.util.Properties;
//
//import javax.sql.DataSource;
//
//@Configuration
//public class Databaseconfig {
//
// @Autowired
// private SurevaultService surevaultService;
//
// @Bean
// public DataSource dataSource() throws JsonMappingException {
// DriverManagerDataSource dataSource = new DriverManagerDataSource();
//
// try {
// dataSource.setUrl(surevaultService.getSurevaultCredentials("databaseUrl"));
// dataSource.setUsername(surevaultService.getSurevaultCredentials("databaseuserName"));
// dataSource.setPassword(surevaultService.getSurevaultCredentials("databasePassword"));
//
// } catch (JsonProcessingException e) {
// // Handle exceptions or log errors
// e.printStackTrace();
// }
//
// // Other DataSource configurations
//
// return dataSource;
// }
//}

View File

@ -0,0 +1,115 @@
package com.realnet.CredentialDatabase.Service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.realnet.utils.Port_Constant;
@Service
public class SurevaultService {
@Value("${spring.datasource.url}")
public String url;
@Value("${spring.datasource.username}")
public String username;
@Value("${spring.datasource.password}")
public String password;
public String getSurevaultCredentials(String key) throws JsonProcessingException {
// String SurevaultDeploymentType = Port_Constant.SUREVAULT_DEPLOYMENT_TYPE;
// System.out.println(SurevaultDeploymentType);
// // Obtain the token
// String token = callconnector("surevault").toString();
//
// String surevaultApiUrl =Port_Constant.SURE_VAULT_DOMAIN + "/getcredentials/" + SurevaultDeploymentType;
//
// ResponseEntity<Object> get = GET(surevaultApiUrl, token);
//
// Object responseBody = get.getBody();
//
// JsonNode jsonNode = new ObjectMapper().convertValue(responseBody, JsonNode.class);
// String value = jsonNode.get(key).asText();
String value = "";
switch (key) {
case "databaseUrl":
value = url;
break;
case "databaseuserName":
value = username;
break;
case "databasePassword":
value = password;
break;
default:
break;
}
return value;
}
public String callconnector(String name) throws JsonProcessingException {
RestTemplate restTemplate = new RestTemplate();
String url = Port_Constant.SURE_VAULT_DOMAIN + "/token/Sure_Connectbyname/" + name;
System.out.println(Port_Constant.SURE_VAULT_DOMAIN);
ResponseEntity<Object> u = restTemplate.getForEntity(url, Object.class);
Object object = u.getBody();
ObjectMapper mapper = new ObjectMapper();
String str = mapper.writeValueAsString(object);
JsonParser parser = new JsonParser();
JsonElement element = parser.parse(str);
JsonObject obj = element.getAsJsonObject();
JsonElement token = obj.get("access_token");
System.out.println("token is == " + token);
return token.getAsString();
}
public ResponseEntity<Object> GET(String get, String token) {
RestTemplate restTemplate = new RestTemplate();
String resourceUrl = get;
String token1 = "Bearer " + token;
HttpHeaders headers = getHeaders();
headers.set("Authorization", token1);
HttpEntity<Object> request = new HttpEntity<Object>(headers);
ResponseEntity<Object> u = restTemplate.exchange(resourceUrl, HttpMethod.GET, request, Object.class);
int statusCodeValue = u.getStatusCodeValue();
System.out.println(statusCodeValue);
return u;
}
private HttpHeaders getHeaders() {
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", MediaType.APPLICATION_JSON_VALUE);
headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
return headers;
}
}

View File

@ -0,0 +1,30 @@
//package com.realnet.Dashboard1.Controller;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.realnet.Dashboard1.Entity.Dashbord_Header;
//import com.realnet.Dashboard1.Repository.HeaderRepository;
//import com.realnet.Dashboard1.Service.HeaderService;
//
//@RestController
//@RequestMapping("/token/dashboard2")
//public class Dashboard2 {
//
// @Autowired
// private HeaderService headerService;
//
// @Autowired
// private HeaderRepository headerRepository;
//
// @GetMapping("/getdashboardbyname/{name}")
// public Integer getdetailsbyId(@PathVariable String name) {
// Dashbord_Header dash = headerRepository.findByDashboardName(name);
// Integer id=dash.getId();
// return id;
// }
//
//}

View File

@ -0,0 +1,110 @@
package com.realnet.Dashboard1.Controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.Dashboard1.Entity.Dashbord1_Line;
import com.realnet.Dashboard1.Entity.Dashbord_Header;
import com.realnet.Dashboard1.Repository.HeaderRepository;
import com.realnet.Dashboard1.Service.HeaderService;
@RestController
public class Dashbord1Controller {
@Autowired
private HeaderService headerService;
@Autowired
private HeaderRepository headerRepository;
// @PreAuthorize("hasAnyRole('SYSADMIN','ProjectManager','Developer')")
@PostMapping("/Savedata")
public Dashbord_Header Savedata(@RequestBody Dashbord_Header dashbord_Header) {
Dashbord_Header dash = headerService.Savedata(dashbord_Header);
return dash;
}
@GetMapping("/get_Dashboard_header")
public List<Dashbord_Header> getdetails() {
List<Dashbord_Header> dash = headerService.getdetails();
return dash;
}
@GetMapping("/get_all_lines")
public List<Dashbord1_Line> get_all_lines() {
List<Dashbord1_Line> dash = headerService.get_all_lines();
return dash;
}
@GetMapping("/get_module_id")
public List<Dashbord_Header> get_by_module_id(@RequestParam(value = "module_id") int module_id) {
List<Dashbord_Header> module = headerService.get_by_module_id(module_id);
return module;
}
@GetMapping("/get_dashboard_headerbyid/{id}")
public Dashbord_Header getdetailsbyId(@PathVariable int id) {
Dashbord_Header dash = headerService.getdetailsbyId(id);
return dash;
}
// @PreAuthorize("hasAnyRole('SYSADMIN','ProjectManager','Developer')")
@PutMapping("/update_dashboard_header")
public Dashbord_Header update_dashboard_header(@RequestBody Dashbord_Header dashbord_Header) {
Dashbord_Header dash = headerService.update_dashboard_header(dashbord_Header);
return dash;
}
// update dashboard line by id
@PutMapping("/update_Dashbord1_Lineby_id/{id}")
public Dashbord1_Line update_Dashbord1_Lineby_id(@PathVariable int id, @RequestBody Dashbord1_Line dashbord1_Line) {
Dashbord1_Line dash = headerService.update_Dashbord1_Lineby_id(id, dashbord1_Line);
return dash;
}
@PostMapping("/update_Dashbord1_Line")
public Dashbord1_Line update_Dashbord1_Line(@RequestBody Dashbord1_Line dashbord1_Line) {
Dashbord1_Line dash1 = headerService.update_Dashbord1_Line(dashbord1_Line);
return dash1;
}
// @PreAuthorize("hasAnyRole('SYSADMIN','ProjectManager','Developer')")
@DeleteMapping("/delete_by_header_id/{id}")
public void delete_by_id(@PathVariable int id) {
headerService.delete_by_id(id);
}
// COUNT OF LIST BUILDER
@GetMapping("/get_dashboard/{module_id}")
public ResponseEntity<?> getREPORT(@PathVariable Integer module_id) {
String count_wireframe = headerRepository.count_dashboardheader(module_id);
if (count_wireframe.isEmpty()) {
return new ResponseEntity<>(0, HttpStatus.OK);
} else {
return new ResponseEntity<>(count_wireframe, HttpStatus.OK);
}
}
}

View File

@ -0,0 +1,45 @@
package com.realnet.Dashboard1.Entity;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import lombok.Data;
import lombok.ToString;
@ToString(exclude = { "Dashbord_Header" })
@Data
@Entity
@Table
public class Dashbord1_Line extends dashbord_Who_collumn {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String header_id;
@Column(length = 5000)
private String Model;
@JsonBackReference
@ManyToOne
private Dashbord_Header dashbord_Header;
}

View File

@ -0,0 +1,63 @@
package com.realnet.Dashboard1.Entity;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import lombok.Data;
import lombok.ToString;
@ToString(exclude = { "Dashbord1_Line" })
@Entity
@Data
public class Dashbord_Header extends dashbord_Who_collumn {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Integer id;
// ==============================
@Column(name = "MENU_NAME")
private String menuName;
@Column(name = "IS_UPDATED")
private boolean updated;
private String tech_Stack;
private String object_type;
private String sub_object_type;
@Column(name = "IS_BUILD")
private boolean build;
private boolean testing;
private String dashboard_name;
private int module_id;
private String description;
private String secuirity_profile;
private Boolean add_to_home;
@JsonManagedReference
@OneToMany(cascade = CascadeType.ALL, mappedBy = "dashbord_Header")
private List<Dashbord1_Line> dashbord1_Line = new ArrayList<>();
}

View File

@ -0,0 +1,46 @@
package com.realnet.Dashboard1.Entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import lombok.Data;
@Data
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public class dashbord_Who_collumn implements Serializable{
private static final long serialVersionUID = 1L;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATED_AT", nullable = false, updatable = false)
@CreatedDate
private Date createdAt;
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt;
@Column(name = "CREATED_BY", updatable = false)
private Long createdBy;
@Column(name = "UPDATED_BY")
private Long updatedBy;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "UPDATED_AT", nullable = false)
@LastModifiedDate
private Date updatedAt;
@Column(name = "ACCOUNT_ID")
private Long accountId;
}

View File

@ -0,0 +1,20 @@
package com.realnet.Dashboard1.Repository;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.realnet.Dashboard1.Entity.Dashbord1_Line;
@Repository
public interface Dashboard_lineRepository extends CrudRepository<Dashbord1_Line, Integer> {
Dashbord1_Line findById(int id);
@Query(value = "SELECT * FROM realnet_CNSBE.dashbord1_line where dashbord_header_id =:id", nativeQuery = true)
List<Dashbord1_Line> getByheader(@Param("id") int id);
}

View File

@ -0,0 +1,35 @@
package com.realnet.Dashboard1.Repository;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import com.realnet.Dashboard1.Entity.Dashbord_Header;
@Repository
public interface HeaderRepository extends CrudRepository<Dashbord_Header, Integer> {
Dashbord_Header findById(int id);
// @Query(
// value= " select * from dashboard_header where module_id=?1",nativeQuery=true)
// List<Dashbord_Header> findbydashboardmodule(int moduleId);
// public List<Dashbord_Header> findBymodule_id(String module_id);
@Query(value = " select * from dashbord_header where module_id=?1", nativeQuery = true)
List<Dashbord_Header> findbydashboardmodule(int module_id);
// @Query(
// "select u from Dashbord_Header u WHERE u.module_id =:n")
// List<Dashbord_Header> getBymoduleId(int module_id);
@Query(value = "select count(id) from dashbord_header", nativeQuery = true)
public List<Object> findCount();
@Query(value = "SELECT count(id) FROM realnet_CNSBE.dashbord_header where module_id=?1", nativeQuery = true)
String count_dashboardheader(Integer moduleId);
}

View File

@ -0,0 +1,99 @@
package com.realnet.Dashboard1.Service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.realnet.Dashboard1.Entity.Dashbord1_Line;
import com.realnet.Dashboard1.Entity.Dashbord_Header;
import com.realnet.Dashboard1.Repository.Dashboard_lineRepository;
import com.realnet.Dashboard1.Repository.HeaderRepository;
@Service
public class HeaderService {
@Autowired
private HeaderRepository headerRepository;
@Autowired
private Dashboard_lineRepository dashboard_lineRepository;
public Dashbord_Header Savedata(Dashbord_Header dashbord_Header) {
return headerRepository.save(dashbord_Header);
}
public List<Dashbord_Header> getdetails() {
// TODO Auto-generated method stub
return (List<Dashbord_Header>) headerRepository.findAll();
}
public Dashbord_Header getdetailsbyId(int id) {
// TODO Auto-generated method stub
return headerRepository.findById(id);
}
public void delete_by_id(int id) {
// TODO Auto-generated method stub
headerRepository.deleteById(id);
}
public Dashbord_Header update_dashboard_header(Dashbord_Header dashbord_Header) {
return headerRepository.save(dashbord_Header);
}
public Dashbord1_Line update_Dashbord1_Line(Dashbord1_Line dashbord1_Line) {
// TODO Auto-generated method stub
return dashboard_lineRepository.save(dashbord1_Line);
}
public List<Dashbord_Header> get_by_module_id(int module_id) {
// TODO Auto-generated method stub
return (List<Dashbord_Header>) headerRepository.findbydashboardmodule(module_id);
}
public List<Dashbord1_Line> get_all_lines() {
// TODO Auto-generated method stub
return (List<Dashbord1_Line>) dashboard_lineRepository.findAll();
}
// public List<Dashbord_Header> get_by_module_id(int module_id) {
// // TODO Auto-generated method stub
// return (List<Dashbord_Header>) headerRepository.findAllById(module_id);
// }
// public List<Dashbord_Header> get_by_module_id(String module_id) {
// // TODO Auto-generated method stub
// return (List<Dashbord_Header>) headerRepository.findBymodule_id(module_id);
// }
public Dashbord1_Line update_Dashbord1_Lineby_id(int id, Dashbord1_Line dashbord1_Line) {
Dashbord1_Line oldline= dashboard_lineRepository.findById(id);
// .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id));
oldline.setAccountId(dashbord1_Line.getAccountId());
oldline.setHeader_id(dashbord1_Line.getHeader_id());
oldline.setModel(dashbord1_Line.getModel());
final Dashbord1_Line newline= dashboard_lineRepository.save(oldline);
return newline;
}
}

View File

@ -0,0 +1,689 @@
package com.realnet.Dashboard_builder.Controllers;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import com.realnet.Payment.Paytm.PaytmPayment;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RequestMapping("/chart")
@RestController
public class ChartBuilder {
public List<Map<String, Object>> getAllDataFromTable(String tableName) {
List<Map<String, Object>> tableData = new ArrayList<>();
Connection connection = null;
Statement statement = null;
ResultSet resultSet = null;
try {
// Establish a database connection
connection = DriverManager.getConnection(
"jdbc:mysql://realnet.cdtynkxfiu2h.ap-south-1.rds.amazonaws.com:3306/suresetu", "cnsdev",
"cnsdev1234");
// Create a SQL statement
statement = connection.createStatement();
// Execute the query to retrieve all data from the table
String query = "SELECT * FROM " + tableName;
resultSet = statement.executeQuery(query);
// Retrieve the column names from the result set
ResultSetMetaData metaData = resultSet.getMetaData();
int columnCount = metaData.getColumnCount();
List<String> columnNames = new ArrayList<>();
for (int i = 1; i <= columnCount; i++) {
columnNames.add(metaData.getColumnName(i));
}
// Iterate over the result set and store each row in a map
while (resultSet.next()) {
Map<String, Object> rowData = new HashMap<>();
for (String columnName : columnNames) {
Object value = resultSet.getObject(columnName);
rowData.put(columnName, value);
}
tableData.add(rowData);
}
} catch (SQLException e) {
log.error(e.getLocalizedMessage());
} finally {
// Close the resources
if (resultSet != null) {
try {
resultSet.close();
} catch (SQLException e) {
log.error(e.getLocalizedMessage());
}
}
if (statement != null) {
try {
statement.close();
} catch (SQLException e) {
log.error(e.getLocalizedMessage());
}
}
if (connection != null) {
try {
connection.close();
} catch (SQLException e) {
log.error(e.getLocalizedMessage());
}
}
}
return tableData;
}
//...........................22.07.2023.............................//
// @GetMapping(value = "/getdashjson/{job_type}")
// public ResponseEntity<?> jsonretun(@RequestParam String tableName, @PathVariable String job_type,
// @RequestParam String xAxis, @RequestParam String yAxis) throws IOException {
//
// List<Map<String, Object>> tableData = getAllDataFromTable(tableName); // Retrieve all data from the table
//
// List<Object> yAxisValues = new ArrayList<>();
// List<String> xAxisValues = new ArrayList<>();
//
// for (Map<String, Object> row : tableData) {
// for (Entry<String, Object> entry : row.entrySet()) {
// String key = entry.getKey();
// Object value = entry.getValue();
//
// if (key.equalsIgnoreCase(xAxis)) {
// xAxisValues.add(value.toString());
// } else if (key.equalsIgnoreCase(yAxis)) {
// yAxisValues.add(value);
// }
// }
// }
//
// StringBuilder jsonmap = new StringBuilder();
//
// if (job_type.equalsIgnoreCase("Bar Chart")) {
// jsonmap.append("[\n");
// } else if (job_type.equalsIgnoreCase("Line Chart")) {
// jsonmap.append(" {\r\n" + " \"chartData\": [\r\n" + " { \"data\": [");
// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) {
// jsonmap.append("{\"chartData\": [[");
// }
//
// for (int i = 0; i < xAxisValues.size(); i++) {
// String xValue = xAxisValues.get(i);
// Object yValue = yAxisValues.get(i);
//
// if (job_type.equalsIgnoreCase("Bar Chart")) {
// jsonmap.append("{\"name\": \"" + xValue + "\", \"progress\":\"" + yValue + "\"},\n");
// } else if (job_type.equalsIgnoreCase("Line Chart")) {
// jsonmap.append(yValue + ",");
// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) {
// jsonmap.append(yValue + ",");
// }
// }
//
// if (!xAxisValues.isEmpty() && !yAxisValues.isEmpty()) {
// jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
// }
//
// if (job_type.equalsIgnoreCase("Bar Chart")) {
// jsonmap.append("]");
// } else if (job_type.equalsIgnoreCase("Line Chart")) {
// jsonmap.append("], \"label\": \"" + yAxis + "\" }\r\n" + " ],\r\n" + " \"chartLabels\": [ ");
// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) {
// jsonmap.append("]],\r\n" + " \"chartLabels\": [");
// }
//
// for (String xValue : xAxisValues) {
// jsonmap.append("\"" + xValue + "\",");
// }
//
// if (!xAxisValues.isEmpty()) {
// jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
// }
//
// if (job_type.equalsIgnoreCase("Line Chart")) {
// jsonmap.append("] \n }\n");
// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) {
// jsonmap.append("]\n" + "}");
// }
//
// return new ResponseEntity<>(jsonmap.toString(), HttpStatus.CREATED);
// }
@GetMapping(value = "/getdashjson/{job_type}")
public ResponseEntity<?> jsonretun2(@RequestParam String tableName, @PathVariable String job_type,
@RequestParam(required = false) String xAxis, @RequestParam(required = false) List<String> yAxes)
throws IOException {
StringBuilder jsonmap = new StringBuilder();
if (job_type.equalsIgnoreCase("Grid View")) {
List<Map<String, Object>> allData = getAllDataFromApi(tableName);
jsonmap.append("[\n");
for (Map<String, Object> row : allData) {
jsonmap.append("{\n");
int colCount = 0;
for (String yAxis : yAxes) {
String key = yAxis;
Object value = row.get(key);
jsonmap.append("\"" + key + "\": \"" + value + "\"");
colCount++;
if (colCount < yAxes.size()) {
jsonmap.append(", ");
}
jsonmap.append("\n");
}
jsonmap.append("}");
if (!row.equals(allData.get(allData.size() - 1))) {
jsonmap.append(", ");
}
}
jsonmap.append("\n]\n");
return new ResponseEntity<>(jsonmap.toString(), HttpStatus.CREATED);
}
if (job_type.equalsIgnoreCase("Todo List") && yAxes != null && !yAxes.isEmpty()) {
List<Map<String, Object>> allData = getAllDataFromApi(tableName);
String listName = yAxes.get(0); // Assuming the first column in yAxes to be the list name
List<Object> listData = new ArrayList<>();
for (Map<String, Object> row : allData) {
Object value = row.get(listName);
if (value != null) {
listData.add(value);
}
}
Map<String, Object> response = new HashMap<>();
response.put("listName", listName);
response.put("List", listData);
return new ResponseEntity<>(response, HttpStatus.CREATED);
}
List<Map<String, Object>> tableData = getAllDataFromApi(tableName); // Retrieve all data from the table
List<List<Object>> yAxisValuesList = new ArrayList<>();
List<String> xAxisValues = new ArrayList<>();
// Initialize a list for each y-axis parameter
for (int i = 0; i < yAxes.size(); i++) {
yAxisValuesList.add(new ArrayList<>());
}
for (Map<String, Object> row : tableData) {
for (Entry<String, Object> entry : row.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (key.equalsIgnoreCase(xAxis)) {
xAxisValues.add(value.toString());
} else {
int yIndex = yAxes.indexOf(key);
if (yIndex >= 0) {
yAxisValuesList.get(yIndex).add(value);
}
}
}
}
if (job_type.equalsIgnoreCase("Bar Chart")) {
jsonmap.append("{\n \"barChartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("{");
jsonmap.append("\"data\": [");
for (int i = 0; i < xAxisValues.size(); i++) {
Object yValue = yAxisValuesList.get(j).get(i);
jsonmap.append(yValue);
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],");
jsonmap.append("\"label\": \"" + yAxis + "\"");
jsonmap.append("}");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"barChartLabels\": [ ");
for (String xValue : xAxisValues) {
jsonmap.append("\"" + xValue + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("] \n }\n");
}
else if (job_type.equalsIgnoreCase("Line Chart")) {
jsonmap.append("{\n \"chartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("{");
jsonmap.append("\"data\": [");
for (int i = 0; i < xAxisValues.size(); i++) {
Object yValue = yAxisValuesList.get(j).get(i);
jsonmap.append(yValue);
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],");
jsonmap.append("\"label\": \"" + yAxis + "\"");
jsonmap.append("}");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"chartLabels\": [ ");
for (String xValue : xAxisValues) {
jsonmap.append("\"" + xValue + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("] \n }\n");
} else if (job_type.equalsIgnoreCase("Doughnut Chart")) {
jsonmap.append("{\"chartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("[");
for (int i = 0; i < xAxisValues.size(); i++) {
Object yValue = yAxisValuesList.get(j).get(i);
jsonmap.append(yValue);
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("]");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"chartLabels\": [");
for (String xValue : xAxisValues) {
jsonmap.append("\"" + xValue + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("]\n}");
}
else if (job_type.equalsIgnoreCase("Radar Chart")) {
jsonmap.append("{\n \"radarChartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("{");
jsonmap.append("\"data\": [");
for (int i = 0; i < xAxisValues.size(); i++) {
Object yValue = yAxisValuesList.get(j).get(i);
jsonmap.append(yValue);
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],");
jsonmap.append("\"label\": \"" + yAxis + "\"");
jsonmap.append("}");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"radarChartLabels\": [ ");
for (String xValue : xAxisValues) {
jsonmap.append("\"" + xValue + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("] \n }\n");
}
else if (job_type.equalsIgnoreCase("PolarArea Chart")) {
jsonmap.append("{\n \"polarAreaChartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("{");
jsonmap.append("\"data\": [");
for (int i = 0; i < xAxisValues.size(); i++) {
Object yValue = yAxisValuesList.get(j).get(i);
jsonmap.append(yValue);
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],");
jsonmap.append("\"label\": \"" + yAxis + "\"");
jsonmap.append("}");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"polarAreaChartLabels\": [ ");
for (String xValue : xAxisValues) {
jsonmap.append("\"" + xValue + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("] \n }\n");
}
if (job_type.equalsIgnoreCase("Pie Chart")) {
jsonmap.append("{\n \"pieChartData\": [");
for (int i = 0; i < yAxisValuesList.get(0).size(); i++) { // Assuming "mark" is the first item in yAxes
jsonmap.append(yAxisValuesList.get(0).get(i)); // Use the y-axis values
if (i < yAxisValuesList.get(0).size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"pieChartLabels\": [ ");
for (int i = 0; i < xAxisValues.size(); i++) { // Assuming "name" is the x-axis
jsonmap.append("\"" + xAxisValues.get(i) + "\""); // Use the x-axis values
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("] \n }\n");
}
else if (job_type.equalsIgnoreCase("Bubble Chart")) {
jsonmap.append("{\n \"bubbleChartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("{");
jsonmap.append("\"data\": [");
for (int i = 0; i < xAxisValues.size(); i++) {
Object xValue = xAxisValues.get(i);
Object yValue = yAxisValuesList.get(j).get(i);
int radius = 5 + (i % 3) * 3; // Adjust the radius as needed
jsonmap.append("{ \"x\": " + xValue + ", \"y\": " + yValue + ", \"r\": " + radius + "}");
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],");
jsonmap.append("\"label\": \"" + yAxis + "\"");
jsonmap.append("}");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"bubbleChartLabels\": [ ");
for (String label : xAxisValues) {
jsonmap.append("\"" + label + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("] \n }\n");
} else if (job_type.equalsIgnoreCase("Scatter Chart")) {
jsonmap.append("{\n \"scatterChartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("{");
jsonmap.append("\"data\": [");
for (int i = 0; i < xAxisValues.size(); i++) {
Object xValue = xAxisValues.get(i);
Object yValue = yAxisValuesList.get(j).get(i);
jsonmap.append("{ \"x\": " + xValue + ", \"y\": " + yValue + "}");
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],");
jsonmap.append("\"label\": \"" + yAxis + "\"");
jsonmap.append("}");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"scatterChartLabels\": [ ");
for (String label : xAxisValues) {
jsonmap.append("\"" + label + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("] \n }\n");
}
else if (job_type.equalsIgnoreCase("Dynamic Chart")) {
jsonmap.append("{\n \"dynamicChartData\": [\n");
for (int j = 0; j < yAxes.size(); j++) {
String yAxis = yAxes.get(j);
jsonmap.append("{");
jsonmap.append("\"data\": [");
for (int i = 0; i < xAxisValues.size(); i++) {
Object yValue = yAxisValuesList.get(j).get(i);
jsonmap.append(yValue);
if (i < xAxisValues.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],");
jsonmap.append("\"label\": \"" + yAxis + "\"");
jsonmap.append("}");
if (j < yAxes.size() - 1) {
jsonmap.append(",");
}
}
jsonmap.append("],\n \"dynamicChartLabels\": [ ");
for (String xValue : xAxisValues) {
jsonmap.append("\"" + xValue + "\",");
}
if (!xAxisValues.isEmpty()) {
jsonmap.deleteCharAt(jsonmap.lastIndexOf(","));
}
jsonmap.append("] \n }\n");
}
return new ResponseEntity<>(jsonmap.toString(), HttpStatus.CREATED);
}
// @GetMapping("/getKey")
public List<Map<String, Object>> getAllKeyFromApi(String apiUrl) {
List<Map<String, Object>> apiData = new ArrayList<>();
try {
// Make a GET request using the provided URL
ResponseEntity<Object> responseEntity = GET(apiUrl);
// Convert the response to a List<Map<String, Object>>
if (responseEntity.getBody() instanceof List) {
// If the response is a list, assume it's a list of maps
apiData = (List<Map<String, Object>>) responseEntity.getBody();
} else {
// If the response is not a list, assume it's a single map
Map<String, Object> singleMap = new HashMap<>();
singleMap.put("data", responseEntity.getBody());
apiData.add(singleMap);
}
} catch (Exception e) {
log.error(e.getLocalizedMessage());
}
return apiData;
}
@GetMapping("/getAllKeys")
public Set<String> getAllKeys(@RequestParam String apiUrl) {
List<Map<String, Object>> apiData = getAllKeyFromApi(apiUrl);
return getAllKeys(apiData);
}
private Set<String> getAllKeys(List<Map<String, Object>> apiData) {
Set<String> allKeys = new HashSet<>();
for (Map<String, Object> data : apiData) {
allKeys.addAll(data.keySet());
}
return allKeys;
}
public List<Map<String, Object>> getAllDataFromApi(String apiUrl) {
List<Map<String, Object>> apiData = new ArrayList<>();
try {
// Make a GET request using the provided URL
ResponseEntity<Object> responseEntity = GET(apiUrl);
// Convert the response to a List<Map<String, Object>>
if (responseEntity.getBody() instanceof List) {
// If the response is a list, assume it's a list of maps
apiData = (List<Map<String, Object>>) responseEntity.getBody();
} else {
// If the response is not a list, assume it's a single map
Map<String, Object> singleMap = new HashMap<>();
singleMap.put("data", responseEntity.getBody());
apiData.add(singleMap);
}
} catch (Exception e) {
log.error(e.getLocalizedMessage());
}
return apiData;
}
public ResponseEntity<Object> GET(String get) {
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<Object> u = restTemplate.getForEntity(get, Object.class);
return u;
}
}

View File

@ -0,0 +1,47 @@
package com.realnet.Dashboard_builder.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t;
import com.realnet.Dashboard_builder.Services.DashboardSchedule_Service;
@RequestMapping(value = "/DashboardSchedule")
@RestController
public class DashboardSchedule_Controller {
@Autowired
private DashboardSchedule_Service Service;
@PostMapping("/DashboardSchedule")
public DashboardSchedule_t Savedata(@RequestBody DashboardSchedule_t data) {
DashboardSchedule_t save = Service.Savedata(data);
return save;
}
@GetMapping("/DashboardSchedule")
public List<DashboardSchedule_t> getdetails() {
List<DashboardSchedule_t> get = Service.getdetails();
return get;
}
@GetMapping("/DashboardSchedule/{id}")
public DashboardSchedule_t getdetailsbyId(@PathVariable Long id) {
DashboardSchedule_t get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/DashboardSchedule/{id}")
public void delete_by_id(@PathVariable Long id) {
Service.delete_by_id(id);
}
@PutMapping("/DashboardSchedule/{id}")
public DashboardSchedule_t update(@RequestBody DashboardSchedule_t data, @PathVariable Long id) {
DashboardSchedule_t update = Service.update(data, id);
return update;
}
}

View File

@ -0,0 +1,55 @@
package com.realnet.Dashboard_builder.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.Dashboard_builder.Entity.Dashboard_builder_t;
import com.realnet.Dashboard_builder.Repository.Dashboard_builder_Repository;
import com.realnet.Dashboard_builder.Services.Dashboard_builder_Service;
@RequestMapping(value = "/Dashboard_builder")
@RestController
public class Dashboard_builder_Controller {
@Autowired
private Dashboard_builder_Service Service;
@Autowired
private Dashboard_builder_Repository builder_Repository;
@PostMapping("/Dashboard_builder")
public Dashboard_builder_t Savedata(@RequestBody Dashboard_builder_t data) {
Dashboard_builder_t save = Service.Savedata(data);
return save;
}
@GetMapping("/Dashboard_builder")
public List<Dashboard_builder_t> getdetails() {
List<Dashboard_builder_t> get = Service.getdetails();
return get;
}
@GetMapping("/Dashboard_builder/{id}")
public Dashboard_builder_t getdetailsbyId(@PathVariable Long id) {
Dashboard_builder_t get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/Dashboard_builder/{id}")
public void delete_by_id(@PathVariable Long id) {
Service.delete_by_id(id);
}
@PutMapping("/Dashboard_builder/{id}")
public Dashboard_builder_t update(@RequestBody Dashboard_builder_t data, @PathVariable Long id) {
Dashboard_builder_t update = Service.update(data, id);
return update;
}
}

View File

@ -0,0 +1,385 @@
//package com.realnet.Dashboard_builder.Controllers;
//
//import java.io.File;
//import java.io.IOException;
//import java.nio.file.FileSystems;
//import java.nio.file.Files;
//import java.nio.file.Path;
//import java.nio.file.Paths;
//import java.time.Instant;
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Optional;
//import java.util.stream.Collectors;
//
//import org.apache.commons.io.FilenameUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpHeaders;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.MediaType;
//import org.springframework.http.ResponseEntity;
//import org.springframework.util.StringUtils;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestPart;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.multipart.MultipartFile;
//
//import com.realnet.Communication.Models.Com_jobTable;
//import com.realnet.Communication.Models.Com_template;
//import com.realnet.Communication.Models.ProcessedJobTable;
//import com.realnet.Communication.Repos.JobTablerepo;
//import com.realnet.Communication.Repos.ProcessedJobTableRepo;
//import com.realnet.Communication.Repos.TemplateRepo;
//import com.realnet.Communication.Services.EmailCommunicationService;
//import com.realnet.Communication.response.EntityResponse;
//import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t;
//import com.realnet.Dashboard_builder.Repository.DashboardSchedule_Repository;
//import com.realnet.Gateway.Entity.Gateway_t;
//import com.realnet.Gateway.Repository.Gateway_Repository;
//import com.realnet.Gateway.Services.Gateway_Service;
//import com.realnet.Gateway.Services.SmsGatwaySmsServices;
//
//@RestController
//@RequestMapping("/dashboard/schedule")
//public class EmailGenerate {
//
//
//
// @Autowired
// private SmsGatwaySmsServices gatwaySmsServices;
//
//
//
//
//
// @Autowired
// private JobTablerepo Com_jobTablerepo;
//
// @Autowired
// private TemplateRepo templateRepo;
//
// @Autowired
// private ProcessedJobTableRepo jobTableRepo;
//
// @Autowired
// private EmailCommunicationService emailService;
//
// @Autowired
// private Gateway_Repository gateway_Repository;
//
//
//// public final String UPLOAD_DIREC = "/src/main/resources/images";
//
//
// @GetMapping("/sendgatewaydashboard")
// public ResponseEntity<?> sendGateway() {
// List<Com_jobTable> get = Com_jobTablerepo.findTopByOrderByIdAsc();
//
// if (!get.isEmpty()) {
// for (Com_jobTable com_jobTable : get) {
// String jobType = com_jobTable.getJob_type();
// if (jobType.equalsIgnoreCase("EMAIL")) {
// ResponseEntity<?> response = sendMailGateway(com_jobTable);
// if (response.getStatusCode() != HttpStatus.OK) {
// return response;
// }
// }
//// else if (jobType.equalsIgnoreCase("SMS")) {
//// ResponseEntity<?> response = sendSmsGateway(com_jobTable);
//// if (response.getStatusCode() != HttpStatus.OK) {
//// return response;
//// }
//// }
// else {
// return new ResponseEntity<>(new EntityResponse("Incorrect job type"), HttpStatus.BAD_REQUEST);
// }
// }
// return new ResponseEntity<>(get, HttpStatus.OK);
// } else {
// return new ResponseEntity<>(new EntityResponse("All SMS/Emails already sent"), HttpStatus.OK);
// }
// }
//
// private ResponseEntity<?> sendMailGateway(Com_jobTable com_jobTable) {
// String gatewayName = com_jobTable.getGatewayName();
// // Long id = Long.parseLong(gatewayName);
// Gateway_t getData=gateway_Repository.findByGatewayName(gatewayName);
//
// Long id=getData.getId();
//
//
// String tempName = com_jobTable.getTemplate_name();
// // Long tempid = Long.parseLong(tempName);
//
// Com_template template = templateRepo.findBytemplatename(tempName);
//
// if (template == null) {
// return new ResponseEntity<>(new EntityResponse("Template not found"), HttpStatus.NOT_FOUND);
// }
//
// String replacement_string = com_jobTable.getReplacement_string();
// String replace_body = template.getBody().replace("<replacement_string>", replacement_string);
//
//
//
// ProcessedJobTable gatewayJobTable = new ProcessedJobTable();
// gatewayJobTable.setJob_type(com_jobTable.getJob_type());
// gatewayJobTable.setSend_to(com_jobTable.getSend_to());
// gatewayJobTable.setCc(com_jobTable.getCc());
// gatewayJobTable.setAttachment(com_jobTable.getAttachment());
// gatewayJobTable.setGatewaydone(com_jobTable.getGatewaydone());
// gatewayJobTable.setTemplate_name(com_jobTable.getTemplate_name());
// gatewayJobTable.setReplacement_string(com_jobTable.getReplacement_string());
// gatewayJobTable.setGatewayName(com_jobTable.getGatewayName());
//
//
// String filename = com_jobTable.getAttachment();
// if(filename!=null) {
//
// Path path = FileSystems.getDefault().getPath("").toAbsolutePath();
// String filepath = Paths.get(path.toString(), UPLOAD_DIREC, filename).toString();
// File file = new File(filepath);
//
//
// boolean sendMailWithAttachment = emailService.sendEmailGatewayWithAttachment(id, com_jobTable.getSend_to(), template.getSubject(), replace_body, com_jobTable.getCc(), file);
//
// System.out.println("email sent with attachment " + sendMailWithAttachment);
//
// gatewayJobTable.setStatus(HttpStatus.OK.value());
// gatewayJobTable.setResp_body("Email sent with attachment");
//
// }
//
// else {
//
// boolean sendemail = emailService.sendEmailGateway(id, com_jobTable.getSend_to(), template.getSubject(),
// replace_body, com_jobTable.getCc());
// System.out.println("email without attachment sent " + sendemail);
//
// gatewayJobTable.setStatus(HttpStatus.OK.value());
// gatewayJobTable.setResp_body("Email sent without attachment");
//
//
// }
//
//
//
// jobTableRepo.save(gatewayJobTable);
// Com_jobTablerepo.delete(com_jobTable);
// return new ResponseEntity<>(HttpStatus.OK);
// }
//
//
//
//
//
//
//
//
//
//
//// public final String UPLOAD_DIREC = "/src/main/resources/images";
//
// public final String UPLOAD_DIREC = "C:/Users/Gyanadipta Pahi/Desktop/SureSetuLast/suresetu-mohasin205/backend/src/main/resources/images";
//
// @PostMapping("/upload")
// public ResponseEntity<String> uploadFile(@RequestPart("file") MultipartFile file) {
// if (file.isEmpty()) {
// return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("File is required.");
// }
//
// try {
// String fileName = generateFileName(file.getOriginalFilename());
// String filePath = UPLOAD_DIREC + File.separator + fileName;
// File dest = new File(filePath);
// file.transferTo(dest);
//
// return ResponseEntity.ok("File uploaded successfully.");
// } catch (IOException e) {
// e.printStackTrace();
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to upload file.");
// }
// }
//
// private String generateFileName(String originalFilename) {
// String baseName = "dashboardSchedule" + Instant.now().getEpochSecond();
// String extension = FilenameUtils.getExtension(originalFilename);
// if (!StringUtils.isEmpty(extension)) {
// baseName += "." + extension;
// }
// return baseName;
// }
//
//
//
//
//
//
//
//
//
//
//
//
//// @GetMapping("/files/{partialName}")
//// public ResponseEntity<byte[]> getFileByName(@PathVariable("partialName") String partialName) {
//// List<File> matchingFiles = findMatchingFiles(partialName);
////
//// if (matchingFiles.isEmpty()) {
//// return ResponseEntity.notFound().build();
//// } else if (matchingFiles.size() > 1) {
//// // return ResponseEntity.status(HttpStatus.CONFLICT).body("Multiple files match the provided name.");
//// }
////
//// File file = matchingFiles.get(0);
//// try {
//// byte[] fileBytes = Files.readAllBytes(file.toPath());
////
//// HttpHeaders headers = new HttpHeaders();
//// headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
//// headers.setContentDispositionFormData("attachment", file.getName());
//// headers.setContentLength(fileBytes.length);
////
//// return new ResponseEntity<>(fileBytes, headers, HttpStatus.OK);
//// } catch (Exception e) {
//// e.printStackTrace();
//// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
//// }
//// }
////
//// private List<File> findMatchingFiles(String partialName) {
//// List<File> matchingFiles = new ArrayList<>();
////
//// File directory = new File(UPLOAD_DIREC);
//// File[] files = directory.listFiles();
//// if (files != null) {
//// for (File file : files) {
//// if (file.isFile() && file.getName().startsWith(partialName)) {
//// matchingFiles.add(file);
//// }
//// }
//// }
////
//// return matchingFiles;
//// }
//
//// @Autowired
//// private JobTablerepo comJobTableRepository;
//
// @Autowired
// private DashboardSchedule_Repository dashboardSchedule_Repository;
//
// @GetMapping("/files/{partialName}")
// public ResponseEntity<byte[]> getFileByName(@PathVariable("partialName") String partialName) {
// List<File> matchingFiles = findMatchingFiles(partialName);
//
// if (matchingFiles.isEmpty()) {
// return ResponseEntity.notFound().build();
// } else if (matchingFiles.size() > 1) {
// System.out.println("Multiple files match the provided name");
// // return ResponseEntity.status(HttpStatus.CONFLICT).body("Multiple files match the provided name.");
// }
//
// File file = matchingFiles.get(0);
// try {
// byte[] fileBytes = Files.readAllBytes(file.toPath());
//
// // Save file path as attachment in the entity
//// List<DashboardSchedule_t> get = dashboardSchedule_Repository.findTopByOrderByIdAsc();
//// get.setAttachment(file.getAbsolutePath());
//// dashboardSchedule_Repository.save(comJobTable);
//
// // // Replace with the desired DashboardSchedule_t entity ID
// List<DashboardSchedule_t> dashboardSchedules = dashboardSchedule_Repository.findTopByOrderByIdAsc();
// if (!dashboardSchedules.isEmpty()) {
// DashboardSchedule_t dashboardSchedule = dashboardSchedules.get(0);
// dashboardSchedule.setAttachment(file.getAbsolutePath());
// dashboardSchedule.setGatewaydone("N");
// dashboardSchedule_Repository.save(dashboardSchedule);
// } else {
// System.out.println("No dashboard schedules found.");
// }
//
// HttpHeaders headers = new HttpHeaders();
// headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
// headers.setContentDispositionFormData("attachment", file.getName());
// headers.setContentLength(fileBytes.length);
//
// return new ResponseEntity<>(fileBytes, headers, HttpStatus.OK);
// } catch (Exception e) {
// e.printStackTrace();
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
// }
// }
//
// private List<File> findMatchingFiles(String partialName) {
// List<File> matchingFiles = new ArrayList<>();
//
// File directory = new File(UPLOAD_DIREC);
// File[] files = directory.listFiles();
// if (files != null) {
// for (File file : files) {
// if (file.isFile() && file.getName().startsWith(partialName)) {
// matchingFiles.add(file);
// }
// }
// }
//
// return matchingFiles;
// }
//
//
//
//
//
//
//
//
// @GetMapping("/dashboardscheduleid")
// public List<Com_jobTable> getDashboardScheduleId() {
// List<DashboardSchedule_t> dashboardScheduleOptional = dashboardSchedule_Repository.findTopByOrderByIdAsc();
//
// List<DashboardSchedule_t> filteredList = dashboardScheduleOptional.stream()
// .filter(dashboardSchedule -> dashboardSchedule.getAttachment() != null && !dashboardSchedule.getAttachment().isEmpty())
// .collect(Collectors.toList());
//
// List<Com_jobTable> comJobTables = new ArrayList<>();
// for (DashboardSchedule_t dashboardSchedule : filteredList) {
// Com_jobTable comJobTable = new Com_jobTable();
// comJobTable.setAttachment(dashboardSchedule.getAttachment());
// comJobTable.setGatewaydone(dashboardSchedule.getGatewaydone());
// comJobTable.setSend_to(dashboardSchedule.getSendTo());
// comJobTable.setTemplate_name(dashboardSchedule.getTemplate());
// comJobTable.setGatewayName(dashboardSchedule.getGateway());
// comJobTable.setCc(dashboardSchedule.getCc());
// comJobTable.setReplacement_string(dashboardSchedule.getReplacementString());
// comJobTable.setJob_type(dashboardSchedule.getType());
//
//
// comJobTables.add(comJobTable);
// }
//
// List<Com_jobTable> savedComJobTables = Com_jobTablerepo.saveAll(comJobTables);
//
//
// for (DashboardSchedule_t dashboardSchedule : filteredList) {
// dashboardSchedule.setAttachment(null);
// dashboardSchedule.setGatewaydone("Y");
// }
// dashboardSchedule_Repository.saveAll(filteredList);
//
// return savedComJobTables;
// }
//
//
//
//
//
//
//
//
//
//}

View File

@ -0,0 +1,31 @@
//package com.realnet.Dashboard_builder.Controllers;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//@RequestMapping("/pdf")
//public class PdfController {
//
// private final PdfService pdfService;
//
// @Autowired
// public PdfController(PdfService pdfService) {
// this.pdfService = pdfService;
// }
//
// @GetMapping("/generate/{dashboardName}")
// public ResponseEntity<String> generatePdf(@PathVariable String dashboardName) {
// try {
// pdfService.generatePdf(dashboardName);
// return new ResponseEntity<>("PDF generated successfully!", HttpStatus.OK);
// } catch (Exception e) {
// return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
// }
// }
//}

View File

@ -0,0 +1,284 @@
//package com.realnet.Dashboard_builder.Controllers;
//
//import java.io.File;
//import java.io.FileOutputStream;
//import java.io.IOException;
//import java.time.Instant;
//
//import org.apache.commons.io.FileUtils;
//import org.apache.pdfbox.pdmodel.PDDocument;
//import org.apache.pdfbox.pdmodel.PDPage;
//import org.apache.pdfbox.pdmodel.PDPageContentStream;
//import org.apache.pdfbox.pdmodel.font.PDType1Font;
//import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
//import org.openqa.selenium.By;
//import org.openqa.selenium.OutputType;
//import org.openqa.selenium.TakesScreenshot;
//import org.openqa.selenium.WebDriver;
//import org.openqa.selenium.WebElement;
//import org.openqa.selenium.chrome.ChromeDriver;
//import org.openqa.selenium.chrome.ChromeOptions;
//import org.openqa.selenium.remote.DesiredCapabilities;
//import org.openqa.selenium.remote.RemoteWebDriver;
//import org.openqa.selenium.support.ui.ExpectedConditions;
//import org.openqa.selenium.support.ui.WebDriverWait;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import com.itextpdf.text.Document;
//import com.itextpdf.text.DocumentException;
//import com.itextpdf.text.Image;
//import com.itextpdf.text.Rectangle;
//import com.itextpdf.text.pdf.PdfWriter;
//import com.realnet.Dashboard1.Entity.Dashbord_Header;
//import com.realnet.Dashboard1.Repository.HeaderRepository;
//
//@Service
//public class PdfService {
//
// @Autowired
// private HeaderRepository headerRepository;
//
//// public void generatePdf(String dashboardName) throws DocumentException {
//// String pdfPath = "src/main/resources/" + dashboardName + ".pdf";
////
//// System.setProperty("webdriver.chrome.driver",
//// "C:\\Users\\Gyanadipta Pahi\\Desktop\\SureSetuLast\\suresetu-mohasin205\\backend\\src\\main\\resources\\chromedriver\\chromedriver.exe");
////
//// WebDriver driver = new ChromeDriver();
////
//// // driver.get("http://localhost:19004/token/dashboard2/getdashboardbyname/" +
//// // dashboardName);
//// driver.get("http://localhost:4200/#/cns-portal/dashboardrunner/dashrunner/" + dashboardName);
////
//// try {
////
//// String username="sysadmin";
//// String password="test3";
////
//// // Find the username and password fields and login button
//// WebElement usernameField = driver.findElement(By.id("login_username"));
//// WebElement passwordField = driver.findElement(By.id("login_password"));
//// WebElement loginButton = driver.findElement(By.id("login_Buttom"));
////
//// // Enter the login credentials
//// usernameField.sendKeys(username);
//// passwordField.sendKeys(password);
////
//// // Click the login button
//// loginButton.click();
////
//// Document document = new Document();
//// FileOutputStream outputStream = new FileOutputStream(pdfPath);
//// PdfWriter.getInstance(document, outputStream);
//// document.open();
////
//// // Find the dashboard container element in your Angular app
//// // WebElement dashboardContainer =
//// // driver.findElement(By.id("contentContainer"));
////
//// WebDriverWait wait = new WebDriverWait(driver, 10); // Wait up to 10 seconds
//// WebElement dashboardContainer = wait
//// .until(ExpectedConditions.presenceOfElementLocated(By.id("contentContainer")));
////
//// // Capture the screenshot of the dashboard using Selenium
//// byte[] dashboardImageBytes = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
//// Image dashboardImage = Image.getInstance(dashboardImageBytes);
////
//// // Scale the image to fit the PDF page
//// Rectangle pageSize = document.getPageSize();
//// dashboardImage.scaleToFit(pageSize.getWidth(), pageSize.getHeight());
//// dashboardImage.setAlignment(Image.MIDDLE);
////
//// // Add the dashboard image to the PDF document
//// document.add(dashboardImage);
////
//// document.close();
//// driver.quit();
////
//// } catch (Exception e) {
//// throw new DocumentException("Failed to generate PDF: " + e.getMessage());
//// }
//// }
//
//// public String generatePdf2(String dashboardName) throws IOException {
//// Dashbord_Header dashbord_Header = headerRepository.findByDashboardName(dashboardName);
//// Integer id = dashbord_Header.getId();
////
//// System.out.println("id is .. " + id);
////
//// long unixTimestamp = Instant.now().getEpochSecond();
////
//// String pdfFileName = dashboardName + "_" + unixTimestamp + ".pdf";
//// String pdfPath = "/data/images/" + pdfFileName;
//// String chromiumPath = "/usr/bin/chromium"; // Replace with the actual path to your Chromium executable
////
//// System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver"); // Replace with the correct path
////
//// ChromeOptions options = new ChromeOptions();
//// options.setBinary(chromiumPath);
//// options.addArguments("--headless");
//// options.addArguments("--disable-gpu");
//// options.addArguments("--no-sandbox");
//// options.addArguments("--remote-debugging-address=0.0.0.0");
//// options.addArguments("--remote-debugging-port=9222");
////
//// DesiredCapabilities capabilities = DesiredCapabilities.chrome();
//// capabilities.setCapability(ChromeOptions.CAPABILITY, options);
////
//// try {
//// WebDriver driver = new RemoteWebDriver(capabilities);
//// // by me
//// // WebDriverWait wait = new WebDriverWait(driver, 10);
//// driver.get("http://43.205.154.152:30182/#/cns-portal/dashboardrunner/dashrunner/" + id);
////
//// // Replace these login steps with your actual login logic
//// String username = "sysadmin";
//// String password = "test3";
//// WebElement usernameField = driver.findElement(By.id("login_username"));
//// WebElement passwordField = driver.findElement(By.id("login_password"));
//// WebElement loginButton = driver.findElement(By.id("login_Buttom"));
////
//// usernameField.sendKeys(username);
//// passwordField.sendKeys(password);
//// loginButton.click();
////
//// Thread.sleep(15000); // Wait for the page to load (you can adjust the wait time as needed)
////
//// // Capture the screenshot of the dashboard
//// File screenshotFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
//// FileUtils.copyFile(screenshotFile, new File(pdfPath + ".png"));
////
//// driver.quit();
////
//// // Convert the screenshot to PDF using Apache PDFBox
//// PDDocument document = new PDDocument();
//// PDPage pdfPage = new PDPage();
//// document.addPage(pdfPage);
//// PDPageContentStream contentStream = new PDPageContentStream(document, pdfPage);
//// PDImageXObject imageXObject = PDImageXObject.createFromFile(pdfPath + ".png", document);
//// contentStream.drawImage(imageXObject, 50, 600);
//// contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12);
//// contentStream.beginText();
//// contentStream.newLineAtOffset(100, 700);
//// contentStream.showText("Your PDF content here"); // Replace with any additional content you want to add
//// contentStream.endText();
//// contentStream.close();
////
//// document.save(pdfPath);
//// document.close();
////
//// // Clean up the temporary screenshot image
//// new File(pdfPath + ".png").delete();
//// } catch (IOException | InterruptedException e) {
//// throw new IOException("Failed to generate PDF: " + e.getMessage());
//// }
////
//// return pdfFileName;
//// }
//
// public String generatePdf(String dashboardName) throws DocumentException {
//
// Dashbord_Header dashbord_Header = headerRepository.findByDashboardName(dashboardName);
// Integer id = dashbord_Header.getId();
//
// System.out.println("id is .. " + id);
//
// long unixTimestamp = Instant.now().getEpochSecond();
//
// String pdfFileName = dashboardName + "_" + unixTimestamp + ".pdf";
//
//// String pdfPath = "src/main/resources/images/" + pdfFileName;
// String pdfPath = "/data/images/" + pdfFileName;
//
// System.setProperty("webdriver.chrome.driver",
// // "C:\\Users\\Gyanadipta Pahi\\Desktop\\SureSetNew\\suresetu-mohasin205\\backend\\src\\main\\resources\\chromedriver\\chromedriver.exe");
// "/usr/local/bin/chromedriver");
//
// System.out.println("test1 ....");
//// WebDriver driver = new ChromeDriver();
// ChromeOptions options = new ChromeOptions();
// options.addArguments("--headless");
// options.addArguments("--disable-gpu");
// options.addArguments("--no-sandbox");
// options.addArguments("--remote-debugging-address=0.0.0.0");
// options.addArguments("--remote-debugging-port=9222");
// WebDriver driver = new ChromeDriver(options);
//
// driver.get("http://43.205.154.152:30182/#/cns-portal/dashboardrunner/dashrunner/" + id);
//
// try {
// System.out.println("test2 ....");
//
// String username = "sysadmin";
// String password = "test3";
//
// // Find the username and password fields and login button
// WebElement usernameField = driver.findElement(By.id("login_username"));
// WebElement passwordField = driver.findElement(By.id("login_password"));
// WebElement loginButton = driver.findElement(By.id("login_Buttom"));
//
// // Enter the login credentials
// usernameField.sendKeys(username);
// passwordField.sendKeys(password);
//
// // Click the login button
// loginButton.click();
//
// Thread.sleep(10000);
//
// Document document = new Document();
// FileOutputStream outputStream = new FileOutputStream(pdfPath);
// PdfWriter.getInstance(document, outputStream);
// document.open();
//
// System.out.println("test3 ....");
//
//// WebDriverWait wait = new WebDriverWait(driver, 10); // Wait up to 10 seconds
//// WebElement dashboardContainer = wait
//// .until(ExpectedConditions.presenceOfElementLocated(By.id("contentContainer")));
////
//// // Capture the screenshot of the dashboard using Selenium
//// byte[] dashboardImageBytes = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
//// Image dashboardImage = Image.getInstance(dashboardImageBytes);
////
//// // Scale the image to fit the PDF page
//// Rectangle pageSize = document.getPageSize();
//// dashboardImage.scaleToFit(pageSize.getWidth(), pageSize.getHeight());
//// dashboardImage.setAlignment(Image.MIDDLE);
////
//// // Add the dashboard image to the PDF document
//// document.add(dashboardImage);
////
//// document.close();
//// driver.quit();
//
//
//
// WebDriverWait wait = new WebDriverWait(driver, 10);
// WebElement dashboardContainer = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("contentContainer")));
//
// // Capture screenshot of the specific element
// File screenshotFile = dashboardContainer.getScreenshotAs(OutputType.FILE);
//
// // Convert the screenshot file into an image
// Image dashboardImage = Image.getInstance(screenshotFile.getAbsolutePath());
//
// // Scale and align the image as needed
// Rectangle pageSize = document.getPageSize();
// dashboardImage.scaleToFit(pageSize.getWidth(), pageSize.getHeight());
// dashboardImage.setAlignment(Image.MIDDLE);
//
// // Add the dashboard image to the PDF document
// document.add(dashboardImage);
//
// document.close();
// driver.quit();
//
// } catch (Exception e) {
// throw new DocumentException("Failed to generate PDF: " + e.getMessage());
// }
//
// return pdfFileName;
// }
//}

View File

@ -0,0 +1,28 @@
package com.realnet.Dashboard_builder.Entity;
import lombok.*;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Entity
@Data
public class DashboardSchedule_t{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String cron;
private String every;
private String gateway;
private String template;
private Date startTime;
private Date endTime;
private String attachment;
private String sendTo;
private String gatewaydone;
private String cc;
private String replacementString;
private String type;
}

View File

@ -0,0 +1,20 @@
package com.realnet.Dashboard_builder.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Entity
@Data
public class Dashboard_builder_t {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String dashboardname;
}

View File

@ -0,0 +1,23 @@
package com.realnet.Dashboard_builder.Repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t;
@Repository
public interface DashboardSchedule_Repository extends JpaRepository<DashboardSchedule_t, Long> {
@Query(value = "SELECT * FROM dashboard_schedule_t where gatewaydone ='N' order by id asc", nativeQuery = true)
List<DashboardSchedule_t> findTopByOrderByIdAsc();
}

View File

@ -0,0 +1,14 @@
package com.realnet.Dashboard_builder.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.Dashboard_builder.Entity.Dashboard_builder_t;
@Repository
public interface Dashboard_builder_Repository extends JpaRepository<Dashboard_builder_t, Long> {
}

View File

@ -0,0 +1,47 @@
package com.realnet.Dashboard_builder.Services;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t;
import com.realnet.Dashboard_builder.Repository.DashboardSchedule_Repository;
@Service
public class DashboardSchedule_Service {
@Autowired
private DashboardSchedule_Repository Repository;
public DashboardSchedule_t Savedata(DashboardSchedule_t data) {
data.setGatewaydone("N");
// DashboardSchedule_t save = Repository.save(job);
return Repository.save(data);
}
public List<DashboardSchedule_t> getdetails() {
return (List<DashboardSchedule_t>) Repository.findAll();
}
public DashboardSchedule_t getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public DashboardSchedule_t update(DashboardSchedule_t data, Long id) {
DashboardSchedule_t old = Repository.findById(id).get();
old.setCron(data.getCron());
old.setEvery(data.getEvery());
old.setGateway(data.getGateway());
old.setTemplate(data.getTemplate());
old.setStartTime(data.getStartTime());
old.setEndTime(data.getEndTime());
old.setAttachment(data.getAttachment());
old.setSendTo(data.getSendTo());
final DashboardSchedule_t test = Repository.save(old);
return test;
}
}

View File

@ -0,0 +1,37 @@
package com.realnet.Dashboard_builder.Services;
import com.realnet.Dashboard_builder.Repository.Dashboard_builder_Repository;
import com.realnet.Dashboard_builder.Entity.Dashboard_builder_t;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class Dashboard_builder_Service {
@Autowired
private Dashboard_builder_Repository Repository;
public Dashboard_builder_t Savedata(Dashboard_builder_t data) {
return Repository.save(data);
}
public List<Dashboard_builder_t> getdetails() {
return (List<Dashboard_builder_t>) Repository.findAll();
}
public Dashboard_builder_t getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public Dashboard_builder_t update(Dashboard_builder_t data, Long id) {
Dashboard_builder_t old = Repository.findById(id).get();
old.setDashboardname(data.getDashboardname());
final Dashboard_builder_t test = Repository.save(old);
return test;
}
}

View File

@ -0,0 +1,126 @@
//package com.realnet.Dashboard_builder.Services;
//
//import java.io.File;
//import java.util.Properties;
//
//import javax.mail.Authenticator;
//import javax.mail.Message;
//import javax.mail.MessagingException;
//import javax.mail.PasswordAuthentication;
//import javax.mail.Session;
//import javax.mail.Transport;
//import javax.mail.internet.InternetAddress;
//import javax.mail.internet.MimeMessage;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.mail.javamail.JavaMailSender;
//import org.springframework.mail.javamail.MimeMessageHelper;
//
//import com.realnet.Gateway.Entity.Gateway_t;
//import com.realnet.Gateway.Services.Gateway_Service;
//
//public class EmailGenerateService {
//
// @Autowired
// private JavaMailSender mailSender;
//
// @Autowired
// private Gateway_Service gateway_Service;
//
// public boolean sendEmailGateway(Long id, String to, String subject, String htmlContent, String cc) {
// // Email to database code start
// Gateway_t getdetails = gateway_Service.getdetailsbyId(id);
//
// String host = getdetails.getHost();
// String username = getdetails.getUserName();
// String password = getdetails.getPassword();
//
// // SMTP server properties
// Properties props = new Properties();
// props.setProperty("mail.smtp.host", host);
// props.setProperty("mail.smtp.port", "587");
// props.setProperty("mail.smtp.auth", "true");
// props.setProperty("mail.smtp.starttls.enable", "true");
//
// try {
// Session session = Session.getInstance(props, new Authenticator() {
// protected PasswordAuthentication getPasswordAuthentication() {
// return new PasswordAuthentication(username, password);
// }
// });
//
// // Create a new message
// MimeMessage message = new MimeMessage(session);
//
// // Set the sender
// message.setFrom(new InternetAddress(username));
//
// // Set the recipient
// message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));
//
// // Set the CC recipient if provided
// if (cc != null) {
// message.setRecipients(Message.RecipientType.CC, InternetAddress.parse(cc));
// }
//
// // Set the subject
// message.setSubject(subject);
//
// // Set the content
// message.setContent(htmlContent, "text/html");
//
// // Send the message
// Transport.send(message);
//
// return true;
// } catch (MessagingException e) {
// e.printStackTrace();
// return false;
// }
// }
//
//
//
//
// public String sendEmailGatewayWithAttachment(Long id, String to, String subject, String htmlContent, String cc, File file) {
// Gateway_t getdetails = gateway_Service.getdetailsbyId(id);
// if (getdetails != null) {
// String host = getdetails.getHost();
// String username = getdetails.getUserName();
// String password = getdetails.getPassword();
//
// // SMTP server properties
// Properties props = new Properties();
// props.setProperty("mail.smtp.host", host);
// props.setProperty("mail.smtp.port", "587");
// props.setProperty("mail.smtp.auth", "true");
// props.setProperty("mail.smtp.starttls.enable", "true");
//
// try {
// Session session = Session.getInstance(props, new Authenticator() {
// protected PasswordAuthentication getPasswordAuthentication() {
// return new PasswordAuthentication(username, password);
// }
// });
//
// MimeMessage mimeMessage = new MimeMessage(session);
// MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, true);
// mimeMessageHelper.setTo(to);
// mimeMessageHelper.setSubject(subject);
// mimeMessageHelper.setText(htmlContent, true);
// mimeMessageHelper.setCc(cc);
// mimeMessageHelper.addAttachment(file.getName(), file);
//
// Transport.send(mimeMessage);
//
// return "Mail sent successfully";
// } catch (MessagingException e) {
// return "Error while sending mail: " + e.getMessage();
// }
// } else {
// return "Error: Gateway not found";
// }
// }
//
//
//}

View File

@ -0,0 +1,62 @@
package com.realnet.FabricIcard.Controllers;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/token")
public class AngularHtmlCode {
@GetMapping("/convert")
public String convertAngularToHtml(@RequestParam String angularCode) {
// Perform conversion logic here (replace Angular-specific syntax with HTML)
String htmlCode = convertAngularToHtmlCode(angularCode);
return htmlCode;
}
// private String convertAngularToHtmlCode(String angularCode) {
// // Replace ng-container with a div
// String htmlCode = angularCode.replace("<ng-container", "<div");
//
// // Replace ngIf with standard HTML attributes
// htmlCode = htmlCode.replace("*ngIf=", "ng-if=");
//
// // Remove Angular-specific directives (ngFor, ngIf) and Angular-specific syntax ([...], {{...}})
// htmlCode = htmlCode.replaceAll("\\[.*?\\]", ""); // Remove [property]="value"
// htmlCode = htmlCode.replaceAll("\\{\\{.*?\\}\\}", ""); // Remove {{expression}}
//
// // Replace Angular-specific structural directives with standard HTML
// htmlCode = htmlCode.replace("*ngFor", "ng-repeat"); // Replace *ngFor with ng-repeat
//
// // Add more replacements as needed for other Angular-specific syntax
//
// return htmlCode;
// }
private String convertAngularToHtmlCode(String angularCode) {
// Replace ng-container with a div
String htmlCode = angularCode.replace("<ng-container", "<div");
// Replace ng-repeat with ng-for
htmlCode = htmlCode.replace("ng-repeat", "ng-for");
// Replace ngIf with standard HTML attributes
htmlCode = htmlCode.replace("*ngIf=", "ng-if=");
// Remove Angular-specific structural directives (ngFor, ngIf) and Angular-specific syntax ([...], {{...}})
htmlCode = htmlCode.replaceAll("\\[.*?\\]", ""); // Remove [property]="value"
htmlCode = htmlCode.replaceAll("\\{\\{.*?\\}\\}", ""); // Remove {{expression}}
// Remove Angular-specific directives
htmlCode = htmlCode.replaceAll("ng-for", ""); // Remove ng-for
htmlCode = htmlCode.replaceAll("ng-if", ""); // Remove ng-if
// Add more replacements as needed for other Angular-specific syntax
return htmlCode;
}
}

View File

@ -0,0 +1,47 @@
package com.realnet.FabricIcard.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.FabricIcard.Entity.FabricIcard;
import com.realnet.FabricIcard.Services.FabricIcardService;
@RequestMapping(value = "/FabricIcard")
@RestController
public class FabricIcardController {
@Autowired
private FabricIcardService Service;
@PostMapping("/FabricIcard")
public FabricIcard Savedata(@RequestBody FabricIcard data) {
FabricIcard save = Service.Savedata(data);
return save;
}
@GetMapping("/FabricIcard")
public List<FabricIcard> getdetails() {
List<FabricIcard> get = Service.getdetails();
return get;
}
@GetMapping("/FabricIcard/{id}")
public FabricIcard getdetailsbyId(@PathVariable Long id) {
FabricIcard get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/FabricIcard/{id}")
public void delete_by_id(@PathVariable Long id) {
Service.delete_by_id(id);
}
@PutMapping("/FabricIcard/{id}")
public FabricIcard update(@RequestBody FabricIcard data, @PathVariable Long id) {
FabricIcard update = Service.update(data, id);
return update;
}
}

View File

@ -0,0 +1,312 @@
package com.realnet.FabricIcard.Controllers;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.Map;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
@RestController
@RequestMapping("/token")
public class LayoutPdf {
@PostMapping("/generate-pdf")
public ResponseEntity<byte[]> generatePdf(@RequestBody String htmlContent) {
try {
// Use Flying Saucer to convert HTML to PDF
byte[] pdfBytes = generatePdf1(htmlContent);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_PDF);
headers.setContentDispositionFormData("inline", "output.pdf");
return new ResponseEntity<>(pdfBytes, headers, HttpStatus.OK);
} catch (Exception e) {
e.printStackTrace();
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
public byte[] generatePdf1(String htmlContent) throws Exception {
ITextRenderer renderer = new ITextRenderer();
renderer.setDocumentFromString(htmlContent);
renderer.layout();
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
renderer.createPDF(outputStream);
return outputStream.toByteArray();
}
}
@PostMapping("/generateHtml1/{id}")
public String generateHtml1(@RequestBody List<Map<String, Object>> jsonData, @PathVariable Long id)
throws JsonProcessingException {
return generateHtml2(jsonData, id);
}
public String generateHtml2(List<Map<String, Object>> jsonData, Long id) throws JsonProcessingException {
// LayoutBuilder_t layoutBuilder_t = layoutBuilder_Repository.findById(id).get();
//
// LayoutBuilderLines_t layoutBuilderLines_t = layoutBuilderLines_Repository.findById(id).get();
//
// String url = layoutBuilder_t.getUrl();
// String model = layoutBuilderLines_t.getModel();
//
// String serviceOrderId = "146";
//
// JsonParser parser = new JsonParser();
// JsonElement element = parser.parse(model);
// JsonArray models = element.getAsJsonArray();
// JsonObject getbodyobject = null;
// List<Map<String, Object>> replacerule = null;
// String operation = null;
// String replaceWith = null;
// String startstring = null;
// String endstring = null;
// String keyword = null;
// String linestring = null;
// String cellAddress = null;
// String ModifyfileName = null;
// String nodeName = null;
//
// String a_uri = url.replace("?", String.valueOf(serviceOrderId));
// System.out.println(a_uri);
//
// Object body = GET(a_uri).getBody();
// ObjectMapper objectMapper = new ObjectMapper();
// String json = objectMapper.writeValueAsString(body);
// JsonElement getbody = parser.parse(json);
// getbodyobject = getbody.getAsJsonObject();
//
//
//
// for (JsonElement mod : models) {
// JsonObject object = mod.getAsJsonObject();
//
// startstring = object.get("start_string").toString().replaceAll("\"", "");
// endstring = object.get("end_string").toString().replaceAll("\"", "");
// replaceWith = object.get("replace_with").toString().replaceAll("\"", "");
// keyword = object.get("Keyword").toString().replaceAll("\"", "");
// linestring = object.get("line_string").toString().replaceAll("\"", "");
// operation = object.get("operation").toString().replaceAll("\"", "");
// cellAddress = object.get("cellAddress").toString().replaceAll("\"", "");
//
// nodeName = object.get("nodeName").toString().replaceAll("\"", "");
//// // nodeName = "listOfItems"; // Set the desired node name
////
// JsonArray values = searchJsonKey(getbodyobject, replaceWith, nodeName);
//
// for (JsonElement element1 : values) {
// String individualValue = element1.getAsString();
//
// replaceWith = individualValue;
//
// System.out.println("Found value: " + individualValue);
//
// if (operation.contains("replacement")) {
// replacerule = replaceStringInJsonData(jsonData, replaceWith, keyword);
//
// }
// }
//
// }
//
// jsonData = replacerule;
StringBuilder htmlBuilder = new StringBuilder();
// Open the main card div
htmlBuilder.append("<div class=\"card\" style=\"padding: 10px; background-color: white;\">");
htmlBuilder.append(
"<div class=\"card-body\" style=\"display: grid; grid-template-columns: repeat(20, 1fr); grid-template-rows: repeat(29, 1fr); gap: 5px;\">");
for (Map<String, Object> item : jsonData) {
// Check for Table type
if ("Table".equals(item.get("type"))) {
htmlBuilder.append("<div style=\"grid-column: ").append(item.get("x")).append(" / span ")
.append(item.get("cols")).append("; grid-row: ").append(item.get("y")).append(" / span ")
.append(item.get("rows")).append(";\">");
// Open the card-title div for Table
htmlBuilder.append("<div class=\"title-card card-title\" style=\"text-align: ")
.append(item.get("alignment") != null ? item.get("alignment") : "left")
.append("; line-height: 1; font-family: Metropolis; font-size: 100%; font-style: normal; font-weight: ")
.append(item.get("bold") != null && (boolean) item.get("bold") ? "bold" : "normal")
.append("; text-decoration: none; background-color: white; color: black;\">");
// Add Table HTML code
htmlBuilder.append("<div style=\"max-width:100%; overflow: auto;\">");
htmlBuilder.append("<table class=\"table\" style=\"margin-top: 10px;\">");
htmlBuilder.append("<thead>");
htmlBuilder.append("<tr>");
// Add table header based on the JSON structure
List<Map<String, String>> values = (List<Map<String, String>>) item.get("values");
for (Map<String, String> value : values) {
htmlBuilder.append("<th>").append(value.get("label")).append("</th>");
}
htmlBuilder.append("</tr>");
htmlBuilder.append("</thead>");
htmlBuilder.append("<tbody>");
htmlBuilder.append("<tr>");
// Add table body content based on the JSON structure
for (Map<String, String> value : values) {
htmlBuilder.append("<td>").append(value.get("value")).append("</td>");
}
// // Add the additional values twice
// for (Map<String, String> additionalValue : values) {
// htmlBuilder.append("<td>").append(additionalValue.get("value")).append("</td>");
// }
htmlBuilder.append("</tr>");
htmlBuilder.append("</tbody>");
htmlBuilder.append("</table>");
htmlBuilder.append("</div>");
// Close the card-title and individual item div for Table
htmlBuilder.append("</div></div>");
}
// Check for Image type
else if ("Image".equals(item.get("type"))) {
htmlBuilder.append("<div style=\"grid-column: ").append(item.get("x")).append(" / span ")
.append(item.get("cols")).append("; grid-row: ").append(item.get("y")).append(" / span ")
.append(item.get("rows")).append(";\">");
// Open the card-title div for Image
htmlBuilder.append("<div class=\"title-card card-title\" style=\"text-align: ")
.append(item.get("alignment") != null ? item.get("alignment") : "left")
.append("; line-height: 1; font-family: Metropolis; font-size: 100%; font-style: normal; font-weight: ")
.append(item.get("bold") != null && (boolean) item.get("bold") ? "bold" : "normal")
.append("; text-decoration: none; background-color: white; color: black;\">");
// Add Image tag
htmlBuilder.append("<img src=\"").append(item.get("imageURL"))
.append("\" alt=\"Image\" style=\"width: ").append(item.get("imagewidth")).append("px;\">");
// Close the card-title and individual item div for Image
htmlBuilder.append("</div></div>");
} else if ("Line".equals(item.get("type"))) {
// Handle Line type
htmlBuilder.append("<div style=\"grid-column: ").append(item.get("x")).append(" / span ")
.append(item.get("cols")).append("; grid-row: ").append(item.get("y")).append(" / span ")
.append(item.get("rows")).append(";\">");
htmlBuilder.append("<hr></hr>");
htmlBuilder.append("</div>");
} else {
// Handle other types
// Open the individual item div
htmlBuilder.append("<div style=\"grid-column: ").append(item.get("x")).append(" / span ")
.append(item.get("cols")).append("; grid-row: ").append(item.get("y")).append(" / span ")
.append(item.get("rows")).append(";\">");
// Open the card-title div
htmlBuilder.append("<div class=\"title-card card-title\" style=\"text-align: ")
.append(item.get("alignment") != null ? item.get("alignment") : "left")
.append("; line-height: 1; font-family: Metropolis; font-size: 100%; font-style: normal; font-weight: ")
.append(item.get("bold") != null && (boolean) item.get("bold") ? "bold" : "normal")
.append("; text-decoration: none; background-color: white; color: black;\">");
// Append the fieldtext content
htmlBuilder.append(item.get("fieldtext"));
// Close the card-title and individual item div
htmlBuilder.append("</div></div>");
}
}
// Close the main card div
htmlBuilder.append("</div></div>");
return htmlBuilder.toString();
}
public ResponseEntity<Object> GET(String get) {
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<Object> u = restTemplate.getForEntity(get, Object.class);
return u;
}
private static JsonArray searchJsonKey(JsonObject jsonObject, String keyToSearch, String nodeName) {
JsonArray resultArray = new JsonArray();
for (Map.Entry<String, JsonElement> entry : jsonObject.entrySet()) {
String key = entry.getKey().replaceAll("\"", "");
JsonElement value = entry.getValue();
if (value.isJsonObject()) {
// Recursively search for the key in the nested object
JsonArray nestedValues = searchJsonKey(value.getAsJsonObject(), keyToSearch, nodeName);
resultArray.addAll(nestedValues);
} else if (nodeName == null || nodeName.isEmpty() || key.equalsIgnoreCase(nodeName)) {
// If nodeName is null or matches the current key, search for the keyToSearch
if (value.isJsonArray()) {
// Handle arrays by iterating through each element
JsonArray jsonArray = value.getAsJsonArray();
for (JsonElement arrayElement : jsonArray) {
if (arrayElement.isJsonObject()) {
JsonObject itemObject = arrayElement.getAsJsonObject();
if (itemObject.has(keyToSearch)) {
resultArray.add(itemObject.get(keyToSearch));
}
}
}
} else if (value.isJsonPrimitive() && key.equals(keyToSearch)) {
// If nodeName is null and the current key matches keyToSearch, add the value to
// the result
resultArray.add(value);
}
}
}
return resultArray;
}
public static List<Map<String, Object>> replaceStringInJsonData(List<Map<String, Object>> jsonData, String keyword,
String replaceWith) {
for (Map<String, Object> entry : jsonData) {
for (Map.Entry<String, Object> keyValue : entry.entrySet()) {
if (keyValue.getValue() instanceof String) {
String value = (String) keyValue.getValue();
if (value.contains(replaceWith)) {
entry.replace(keyValue.getKey(), value.replace(replaceWith, keyword));
}
}
}
}
return jsonData;
}
}

View File

@ -0,0 +1,40 @@
//package com.realnet.LayoutBuilder.Controllers;
//
//import org.w3c.dom.Element;
//import org.xhtmlrenderer.extend.ReplacedElement;
//import org.xhtmlrenderer.extend.ReplacedElementFactory;
//import org.xhtmlrenderer.extend.UserAgentCallback;
//import org.xhtmlrenderer.layout.LayoutContext;
//import org.xhtmlrenderer.render.BlockBox;
//import org.xhtmlrenderer.simple.extend.FormSubmissionListener;
//
//public class MyImageReplacedElementFactory implements ReplacedElementFactory{
//
// @Override
// public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth,
// int cssHeight) {
// // TODO Auto-generated method stub
// return null;
// }
//
// @Override
// public void reset() {
// // TODO Auto-generated method stub
//
// }
//
// @Override
// public void remove(Element e) {
// // TODO Auto-generated method stub
//
// }
//
// @Override
// public void setFormSubmissionListener(FormSubmissionListener listener) {
// // TODO Auto-generated method stub
//
// }
//
//}

View File

@ -0,0 +1,28 @@
package com.realnet.FabricIcard.Controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.FabricIcard.Entity.PageSource;
import com.realnet.FabricIcard.Repository.PageSourceRepository;
@RestController
@RequestMapping("/api/pages")
public class PageController {
@Autowired
private PageSourceRepository pageSourceRepository;
@PostMapping("/save")
public String savePageSource(@RequestBody String sourceCode) {
PageSource pageSource = new PageSource();
pageSource.setSourceCode(sourceCode);
// Save to the database
pageSourceRepository.save(pageSource);
return "Page source saved successfully!";
}
}

View File

@ -0,0 +1,108 @@
//package com.realnet.FabricIcard.Controllers;
//
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.fasterxml.jackson.databind.JsonNode;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.io.BufferedReader;
//import java.io.InputStreamReader;
//import java.net.HttpURLConnection;
//import java.net.URL;
//import java.util.ArrayList;
//import java.util.Iterator;
//import java.util.List;
//import java.util.Map;
//
//@RestController
//@RequestMapping("/token")
//public class TestCode {
// @GetMapping("/dynamicValues")
// public List<Map<String, String>> getDynamicValues() {
// try {
// // Make HTTP request to the first API
// String apiUrl = "http://3.109.61.114:30161/token/Billing/ServiceOrder/ServiceOrder/146";
// String response = sendHttpRequest(apiUrl);
//
// // Parse the response and extract the listOfItems
// return createValuesFromList(response);
// } catch (Exception e) {
// e.printStackTrace();
// return new ArrayList<>(); // Return an empty list in case of an error
// }
// }
//
// private String sendHttpRequest(String apiUrl) throws Exception {
// URL url = new URL(apiUrl);
// HttpURLConnection connection = (HttpURLConnection) url.openConnection();
// connection.setRequestMethod("GET");
//
// BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
// StringBuilder response = new StringBuilder();
//
// String line;
// while ((line = reader.readLine()) != null) {
// response.append(line);
// }
//
// reader.close();
// connection.disconnect();
//
// return response.toString();
// }
//
// private List<Map<String, String>> createValuesFromList(String jsonResponse) {
// List<Map<String, String>> values = new ArrayList<>();
//
// try {
// // Parse the JSON response using Jackson ObjectMapper
// ObjectMapper objectMapper = new ObjectMapper();
// JsonNode rootNode = objectMapper.readTree(jsonResponse);
//
// // Extract the listOfItems node
// JsonNode listOfItemsNode = rootNode.path("listOfItems");
//
// // Iterate through each item in the listOfItems
// Iterator<JsonNode> itemsIterator = listOfItemsNode.elements();
// while (itemsIterator.hasNext()) {
// JsonNode itemNode = itemsIterator.next();
//
// // Extract relevant information from the item
// String itemCode = itemNode.path("itemCode").asText();
// String unitPrice = itemNode.path("unitPrice").asText();
// String lineTotal = itemNode.path("lineTotal").asText();
//
// // Create the corresponding values
// Map<String, String> itemValues = Map.of(
// "label", "Item and Description",
// "value", itemCode
// );
// Map<String, String> qtyValues = Map.of(
// "label", "Qty",
// "value", "1"
// );
// Map<String, String> rateValues = Map.of(
// "label", "Rate",
// "value", unitPrice
// );
// Map<String, String> amountValues = Map.of(
// "label", "Amount",
// "value", lineTotal
// );
//
// // Add the values to the list
// values.add(itemValues);
// values.add(qtyValues);
// values.add(rateValues);
// values.add(amountValues);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
//
// return values;
// }
//}

View File

@ -0,0 +1,35 @@
package com.realnet.FabricIcard.Entity;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.realnet.FabricIcardLines.Entity.FabricIcardLines;
import lombok.Data;
@Entity
@Data
public class FabricIcard {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String description;
private boolean active;
private String url;
@JsonManagedReference
@OneToMany(cascade = CascadeType.ALL, mappedBy = "layoutBuilder_t")
private List<FabricIcardLines> fabricIcardLines = new ArrayList<>();
}

View File

@ -0,0 +1,19 @@
package com.realnet.FabricIcard.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Entity
@Data
public class PageSource {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String sourceCode;
// getters and setters
}

View File

@ -0,0 +1,12 @@
package com.realnet.FabricIcard.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.FabricIcard.Entity.FabricIcard;
@Repository
public interface FabricIcardRepository extends JpaRepository<FabricIcard, Long> {
}

View File

@ -0,0 +1,10 @@
package com.realnet.FabricIcard.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.FabricIcard.Entity.PageSource;
@Repository
public interface PageSourceRepository extends JpaRepository<PageSource, Long> {
}

View File

@ -0,0 +1,41 @@
package com.realnet.FabricIcard.Services;
import com.realnet.FabricIcard.Entity.FabricIcard;
import com.realnet.FabricIcard.Repository.FabricIcardRepository;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class FabricIcardService {
@Autowired
private FabricIcardRepository Repository;
public FabricIcard Savedata(FabricIcard data) {
return Repository.save(data);
}
public List<FabricIcard> getdetails() {
return (List<FabricIcard>) Repository.findAll();
}
public FabricIcard getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public FabricIcard update(FabricIcard data, Long id) {
FabricIcard old = Repository.findById(id).get();
old.setName(data.getName());
old.setDescription(data.getDescription());
old.setActive(data.isActive());
old.setUrl(data.getUrl());
final FabricIcard test = Repository.save(old);
return test;
}
}

View File

@ -0,0 +1,282 @@
package com.realnet.FabricIcard.Services;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.xhtmlrenderer.pdf.ITextRenderer;
@Service
public class LayoutPdfService {
public String generateForm(@RequestBody Map<String, Object> jsonData) {
// Convert JSON to HTML
String htmlForm = convertJsonToHtml(jsonData);
return htmlForm;
}
// public void convertToPdf(@RequestBody String htmlContent) throws IOException {
// // Render HTML content using Flying Saucer
// try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
// ITextRenderer renderer = new ITextRenderer();
// renderer.setDocumentFromString(htmlContent);
// renderer.layout();
// renderer.createPDF(outputStream);
//
//
// // Specify the directory and file name where you want to save the PDF
// String pdfFilePath = "/data/example.pdf";
//
// String path="/data";
//
// Path directory = Paths.get(path);
// if (!Files.exists(directory)) {
// try {
// Files.createDirectories(directory);
// } catch (IOException e) {
// e.printStackTrace();
// // Handle directory creation failure appropriately
// }
// }
//
//
// // Save the PDF to the specified file
// try (FileOutputStream fileOutputStream = new FileOutputStream(pdfFilePath)) {
// outputStream.writeTo(fileOutputStream);
// }
//
//
// // Set the response headers
//// response.setContentType("application/pdf");
//// response.setContentLength(outputStream.size());
//// response.setHeader("Content-Disposition", "inline; filename=example.pdf");
////
//// // Write the PDF to the response output stream
//// response.getOutputStream().write(outputStream.toByteArray());
//// response.getOutputStream().flush();
// } catch (Exception e) {
// e.printStackTrace();
// // Handle exceptions appropriately
// }
// }
public void convertToPdf(@RequestBody String htmlContent) throws IOException {
htmlContent="<!DOCTYPE html>\r\n"
+ "<html lang=\"en\">\r\n"
+ "<head>\r\n"
+ " <meta charset=\"UTF-8\"></meta>\r\n"
+ " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"></meta>\r\n"
+ " <title>FormName</title>\r\n"
+ " <style>\r\n"
+ " body {\r\n"
+ " font-family: Arial, sans-serif;\r\n"
+ " margin: 20px;\r\n"
+ " }\r\n"
+ " \r\n"
+ " .dashboard {\r\n"
+ " display: grid;\r\n"
+ " grid-template-columns: repeat(24, 1fr);\r\n"
+ " grid-template-rows: repeat(2, 1fr);\r\n"
+ " gap: 10px;\r\n"
+ " }\r\n"
+ " \r\n"
+ " .dashboard-item {\r\n"
+ " grid-column: span 6;\r\n"
+ " grid-row: span 2;\r\n"
+ " border: 1px solid #ccc;\r\n"
+ " padding: 10px;\r\n"
+ " box-sizing: border-box;\r\n"
+ " }\r\n"
+ " \r\n"
+ " .text-center {\r\n"
+ " text-align: center;\r\n"
+ " }\r\n"
+ " \r\n"
+ " .bold {\r\n"
+ " font-weight: bold;\r\n"
+ " }\r\n"
+ " \r\n"
+ " .italic {\r\n"
+ " font-style: italic;\r\n"
+ " }\r\n"
+ " \r\n"
+ " .underline {\r\n"
+ " text-decoration: underline;\r\n"
+ " }\r\n"
+ " \r\n"
+ " .larger {\r\n"
+ " font-size: larger;\r\n"
+ " }\r\n"
+ " </style>\r\n"
+ "</head>\r\n"
+ "<body>\r\n"
+ "\r\n"
+ "<div class=\"dashboard\">\r\n"
+ " <div class=\"dashboard-item text-center bold italic underline larger\" style=\"grid-column: span 3; grid-row: span 2;\">\r\n"
+ " Title\r\n"
+ " </div>\r\n"
+ " <div class=\"dashboard-item\" style=\"grid-column: span 6; grid-row: span 2;\">\r\n"
+ " <label for=\"first_name\">Gyanadipta</label>\r\n"
+ " <input type=\"text\" id=\"first_name\" name=\"first_name\">\r\n"
+ " </input>\r\n"
+ " </div>\r\n"
+ " <div class=\"dashboard-item\" style=\"grid-column: span 6; grid-row: span 2;\">\r\n"
+ " <label for=\"gender\">Male</label>\r\n"
+ " <input type=\"text\" id=\"gender\" name=\"gender\">\r\n"
+ " </input>\r\n"
+ " </div>\r\n"
+ "</div>\r\n"
+ "\r\n"
+ "</body>\r\n"
+ "</html>\r\n";
// Render HTML content using Flying Saucer
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
ITextRenderer renderer = new ITextRenderer();
renderer.setDocumentFromString(htmlContent);
renderer.layout();
renderer.createPDF(outputStream);
// Reset the position of the output stream before writing to the file
// outputStream.reset();
// Specify the directory and file name where you want to save the PDF
String pdfFilePath = "/data/example.pdf";
String path = "/data";
Path directory = Paths.get(path);
if (!Files.exists(directory)) {
try {
Files.createDirectories(directory);
} catch (IOException e) {
e.printStackTrace();
// Handle directory creation failure appropriately
}
}
// Save the PDF to the specified file
try (FileOutputStream fileOutputStream = new FileOutputStream(pdfFilePath)) {
outputStream.writeTo(fileOutputStream);
}
} catch (Exception e) {
e.printStackTrace();
// Handle exceptions appropriately
}
}
private String convertJsonToHtml(Map<String, Object> formData) {
StringBuilder htmlBuilder = new StringBuilder("<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n");
htmlBuilder.append(" <meta charset=\"UTF-8\"></meta>\n");
htmlBuilder.append(" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"></meta>\n");
htmlBuilder.append(String.format(" <title>%s</title>\n", formData.get("name")));
htmlBuilder.append(" <style>\n");
htmlBuilder.append(" body {\n");
htmlBuilder.append(" font-family: Arial, sans-serif;\n");
htmlBuilder.append(" margin: 20px;\n");
htmlBuilder.append(" }\n");
htmlBuilder.append(" .dashboard {\n");
htmlBuilder.append(" display: grid;\n");
htmlBuilder.append(" grid-template-columns: repeat(24, 1fr);\n");
htmlBuilder.append(" grid-template-rows: repeat(2, 1fr);\n");
htmlBuilder.append(" gap: 10px;\n");
htmlBuilder.append(" }\n");
htmlBuilder.append(" .dashboard-item {\n");
htmlBuilder.append(" border: 1px solid #ccc;\n");
htmlBuilder.append(" padding: 10px;\n");
htmlBuilder.append(" box-sizing: border-box;\n");
htmlBuilder.append(" }\n");
// Add styles for different classes (.text-center, .bold, .italic, .underline,
// .larger) if needed
htmlBuilder.append(" </style>\n</head>\n<body>\n\n<div class=\"dashboard\">\n");
// Iterate through the dashboard array
List<Map<String, Object>> dashboard = (List<Map<String, Object>>) formData.get("dashboard");
for (Map<String, Object> element : dashboard) {
htmlBuilder.append(generateFormField(element));
}
htmlBuilder.append("</div>\n\n</body>\n</html>");
return htmlBuilder.toString();
}
private String generateFormField(Map<String, Object> fieldData) {
StringBuilder fieldHtml = new StringBuilder();
String type = (String) fieldData.get("type");
if (type != null) {
fieldHtml.append(
String.format(" <div class=\"dashboard-item\" style=\"%s\">\n", getGridStyle(fieldData)));
fieldHtml.append(String.format(" <label for=\"%s\">%s</label>\n", fieldData.get("fieldName"),
fieldData.get("fieldtext")));
switch (type) {
case "text":
fieldHtml.append(String.format(" <input type=\"text\" id=\"%s\" name=\"%s\" %s/>\n",
fieldData.get("fieldName"), fieldData.get("fieldName"), getAdditionalAttributes(fieldData)));
break;
case "textarea":
fieldHtml.append(
String.format(" <textarea name=\"%s\"></textarea>\n", fieldData.get("fieldName")));
break;
case "select":
fieldHtml.append(String.format(" <select name=\"%s\">\n", fieldData.get("fieldName")));
fieldHtml.append(String.format(" <option>%s</option>\n", fieldData.get("fieldtext")));
fieldHtml.append(" </select>\n");
break;
// Add more cases for other form field types as needed
default:
// Handle unknown field types or add more specific cases
}
fieldHtml.append(" </div>\n");
}
return fieldHtml.toString();
}
private String getGridStyle(Map<String, Object> fieldData) {
int cols = (int) fieldData.get("cols");
int rows = (int) fieldData.get("rows");
int x = (int) fieldData.get("x");
int y = (int) fieldData.get("y");
return String.format("grid-column: span %d; grid-row: span %d; grid-column-start: %d; grid-row-start: %d;",
cols, rows, x, y);
}
private String getAdditionalAttributes(Map<String, Object> fieldData) {
StringBuilder attributes = new StringBuilder();
for (Map.Entry<String, Object> entry : fieldData.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (!Arrays.asList("type", "fieldName", "fieldtext", "cols", "rows", "x", "y").contains(key)
&& value != null) {
attributes.append(String.format(" %s=\"%s\"", key, value));
}
}
return attributes.toString();
}
}

View File

@ -0,0 +1,78 @@
package com.realnet.FabricIcardLines.Controllers;
import java.io.IOException;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.FabricIcardLines.Entity.Dummyfabric;
import com.realnet.FabricIcardLines.Entity.FabricIcardLines;
import com.realnet.FabricIcardLines.Services.FabricIcardLinesService;
@RequestMapping(value = "/FabricIcardLines")
@RestController
public class FabricIcardLinesController {
@Autowired
private FabricIcardLinesService Service;
@PostMapping("/FabricIcardLines")
public FabricIcardLines Savedata(@RequestBody FabricIcardLines data) {
FabricIcardLines save = Service.Savedata(data);
return save;
}
@GetMapping("/FabricIcardLines")
public List<FabricIcardLines> getdetails() {
List<FabricIcardLines> get = Service.getdetails();
return get;
}
@GetMapping("/FabricIcardLines/{id}")
public FabricIcardLines getdetailsbyId(@PathVariable Long id) {
FabricIcardLines get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/FabricIcardLines/{id}")
public void delete_by_id(@PathVariable Long id) {
Service.delete_by_id(id);
}
@PutMapping("/FabricIcardLines/{id}")
public FabricIcardLines update(@RequestBody FabricIcardLines data, @PathVariable Long id) {
FabricIcardLines update = Service.update(data, id);
return update;
}
// make xml file
@PutMapping("/FabricIcardLines/xml")
public FabricIcardLines makexmlfile(@RequestParam String id, @RequestBody Dummyfabric dummy) throws IOException {
String xml = dummy.getXml();
String json = dummy.getJson();
FabricIcardLines update = Service.makexmlfile(id, xml, json);
return update;
}
// get by headerid
@GetMapping("/FabricIcardLines/headerId/{id}")
public FabricIcardLines getdetailsbyheaderId(@PathVariable String id) {
FabricIcardLines get = Service.getbyheaderid(id);
return get;
}
// file read
@GetMapping("/FabricIcardLines/json/{id}")
public String readfile(@PathVariable String id) throws IOException {
String get = Service.readjson(id);
return get;
}
}

View File

@ -0,0 +1,117 @@
package com.realnet.FabricIcardLines.Controllers;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.realnet.FabricIcardLines.Entity.FabricIcardLines;
import com.realnet.FabricIcardLines.Services.FabricIcardLinesService;
@CrossOrigin("*")
@RequestMapping(value = "/FabricIcardLines")
@RestController
public class JsonKeysController {
@Autowired
private FabricIcardLinesService fabricIcardLinesService;
@PostMapping("/getJsonKeys")
public ResponseEntity<List<String>> getJsonKeys(@RequestBody String json) {
try {
// Parse JSON string into JsonNode
ObjectMapper objectMapper = new ObjectMapper();
JsonNode jsonNode = objectMapper.readTree(json);
// Get all keys from JsonNode
List<String> keys = getAllKeys(jsonNode);
return ResponseEntity.ok(keys);
} catch (Exception e) {
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
}
}
private List<String> getAllKeys(JsonNode jsonNode) {
List<String> keys = new ArrayList<>();
Iterator<String> fieldNames = jsonNode.fieldNames();
while (fieldNames.hasNext()) {
keys.add(fieldNames.next());
}
return keys;
}
// get key value from FabricIcardLinesService
@PostMapping("/FabricIcardLines/getKeyValuePairs/{id}")
public ResponseEntity<List<Map<String, String>>> getKeyValuePairs(@PathVariable String id) {
FabricIcardLines lines = fabricIcardLinesService.getbyheaderid(id);
if (lines == null) {
String message = "No lines found for ID: " + id;
return ResponseEntity.status(HttpStatus.NOT_FOUND)
.body(Collections.singletonList(Collections.singletonMap("message", message)));
}
String jsonData = lines.getLayoutModel();
try {
// Parse JSON string into JsonNode
ObjectMapper objectMapper = new ObjectMapper();
JsonNode rootNode = objectMapper.readTree(jsonData);
// Extract key-value pairs based on type
List<Map<String, String>> keyValuePairs = extractKeyValuePairs(rootNode);
return ResponseEntity.ok(keyValuePairs);
} catch (Exception e) {
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
}
}
private List<Map<String, String>> extractKeyValuePairs(JsonNode rootNode) {
List<Map<String, String>> keyValuePairs = new ArrayList<>();
JsonNode objectsNode = rootNode.get("objects");
if (objectsNode == null || !objectsNode.isArray()) {
return keyValuePairs; // Return empty list if objects array is missing or not an array
}
for (JsonNode node : objectsNode) {
Map<String, String> pair = new HashMap<>();
String type = node.path("type").asText();
if (type.equals("i-text")) {
JsonNode textNode = node.path("text");
if (!textNode.isMissingNode()) {
pair.put(type, textNode.asText());
}
} else if (type.equals("image")) {
JsonNode srcNode = node.path("src");
if (!srcNode.isMissingNode()) {
pair.put(type, node.get("src").asText());
}
}
if (!pair.isEmpty()) {
keyValuePairs.add(pair);
}
}
return keyValuePairs;
}
}

View File

@ -0,0 +1,19 @@
package com.realnet.FabricIcardLines.Entity;
import javax.persistence.Lob;
import lombok.Data;
@Data
public class Dummyfabric {
@Lob
private String json;
@Lob
private String xml;
}

View File

@ -0,0 +1,41 @@
package com.realnet.FabricIcardLines.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.realnet.FabricIcard.Entity.FabricIcard;
import lombok.Data;
@Entity
@Data
public class FabricIcardLines {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String header_id;
private String file_path;
private String xml_file_name;
private String json_file_name;
@Lob
private String mapping_model;
@Lob
private String Model;
@Lob
private String layoutModel;
@JsonBackReference
@ManyToOne
private FabricIcard layoutBuilder_t;
}

View File

@ -0,0 +1,15 @@
package com.realnet.FabricIcardLines.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.FabricIcardLines.Entity.FabricIcardLines;
@Repository
public interface FabricIcardLinesRepository extends JpaRepository<FabricIcardLines, Long> {
@Query(value = "select * from fabric_icard_lines where header_id=?1", nativeQuery = true)
FabricIcardLines getbyheaderId(String header_id);
}

View File

@ -0,0 +1,109 @@
package com.realnet.FabricIcardLines.Services;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.realnet.FabricIcard.Entity.FabricIcard;
import com.realnet.FabricIcard.Repository.FabricIcardRepository;
import com.realnet.FabricIcardLines.Entity.FabricIcardLines;
import com.realnet.FabricIcardLines.Repository.FabricIcardLinesRepository;
@Service
public class FabricIcardLinesService {
@Value("${projectPath}")
private String projectpath;
@Autowired
private FabricIcardRepository fabricIcardRepository;
@Autowired
private FabricIcardLinesRepository Repository;
public FabricIcardLines Savedata(FabricIcardLines data) {
return Repository.save(data);
}
public List<FabricIcardLines> getdetails() {
return (List<FabricIcardLines>) Repository.findAll();
}
public FabricIcardLines getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public FabricIcardLines update(FabricIcardLines data, Long id) {
FabricIcardLines old = Repository.findById(id).get();
old.setHeader_id(data.getHeader_id());
old.setModel(data.getModel());
old.setLayoutModel(data.getLayoutModel());
old.setFile_path(data.getFile_path());
old.setXml_file_name(data.getXml_file_name());
old.setJson_file_name(data.getJson_file_name());
old.setMapping_model(data.getMapping_model());
final FabricIcardLines test = Repository.save(old);
return test;
}
// make xml file
public FabricIcardLines makexmlfile(String headerid, String xml, String json) throws IOException {
FabricIcard fabricIcard = fabricIcardRepository.findById(Long.valueOf(headerid)).get();
String name = fabricIcard.getName();
String xmlfileName = name + ".xml";
String jsonfileName = name + ".txt";
String filePath = Paths.get(xmlfileName).toString();
FileWriter fr = new FileWriter(filePath);
fr.write(xml);
fr.close();
String jsonfilePath = Paths.get(jsonfileName).toString();
FileWriter jsonfr = new FileWriter(jsonfilePath);
jsonfr.write(json);
jsonfr.close();
FabricIcardLines old = Repository.getbyheaderId(headerid);
old.setFile_path(projectpath);
old.setXml_file_name(xmlfileName);
old.setJson_file_name(jsonfileName);
old.setHeader_id(headerid);
final FabricIcardLines test = Repository.save(old);
return test;
}
// get by header id
public FabricIcardLines getbyheaderid(String id) {
return Repository.getbyheaderId(id);
}
// read file
public String readjson(String id) throws IOException {
FabricIcardLines fLines = Repository.getbyheaderId(id);
String file_path = fLines.getFile_path();
String json_file_name = fLines.getJson_file_name();
String pathString = file_path + File.separator + json_file_name;
String readFileToString = FileUtils.readFileToString(new File(pathString), StandardCharsets.UTF_8);
return readFileToString;
}
}

View File

@ -0,0 +1,194 @@
package com.realnet.FileUpload.Controllers;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DataAccessException;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.realnet.FileUpload.Entity.Uploadeddocs;
import com.realnet.FileUpload.Services.FileuploadService;
import com.realnet.FileUpload.Services.UploadedFileService;
@RequestMapping(value = "/FileUpload")
//@CrossOrigin("*")
@RestController
public class UploadeddocsController {
@Autowired
private UploadedFileService Service;
@Value("${projectPath}")
private String projectPath;
@Autowired
private FileuploadService fileuploadService;
@PostMapping("/Uploadeddocs/{ref}/{table_name}")
public ResponseEntity<?> Savedata(@PathVariable String ref, @PathVariable String table_name,
@RequestParam MultipartFile file) throws JsonMappingException, JsonProcessingException {
Uploadeddocs tdata = new Uploadeddocs();
Date d = new Date();
String addString = "_" + d.getTime();
if (file.isEmpty()) {
return new ResponseEntity<>("file is empty", HttpStatus.BAD_REQUEST);
}
String UPLOAD_DIREC = File.separator + "Resources" + File.separator + "Files";
String originalFilename = file.getOriginalFilename();
String filetype = originalFilename.substring(originalFilename.lastIndexOf("."));
String filename = originalFilename.substring(0, originalFilename.lastIndexOf(".")) + addString;
String replacedfilename = filename + filetype;
System.out.println("file name is ..." + replacedfilename);
Uploadeddocs save = null;
System.out.println(file.getOriginalFilename());
boolean f = fileuploadService.uploadFile(file, addString);
if (f) {
System.out.println("file uploaded successfully");
tdata.setUploadedfile_path(projectPath + UPLOAD_DIREC);
tdata.setUploadedfile_name(replacedfilename);
tdata.setRef(ref);
tdata.setRef_table_name(table_name);
save = Service.Savedata(tdata);
return new ResponseEntity<>(save, HttpStatus.OK);
}
else {
return new ResponseEntity<>("file upload failed", HttpStatus.BAD_REQUEST);
}
}
@PutMapping("/Uploadeddocs/{id}")
public Uploadeddocs update(@RequestBody Uploadeddocs data, @PathVariable Integer id) {
Uploadeddocs update = Service.update(data, id);
return update;
}
@GetMapping("/Uploadeddocs")
public List<Uploadeddocs> getdetails() {
List<Uploadeddocs> get = Service.getdetails();
return get;
}
@GetMapping("/Uploadeddocs/{id}")
public Uploadeddocs getdetailsbyId(@PathVariable Integer id) {
Uploadeddocs get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/Uploadeddocs/{id}")
public void delete_by_id(@PathVariable Integer id) {
Service.delete_by_id(id);
}
// get by ref and ref table name
@GetMapping("/Uploadeddocs/{ref}/{ref_tablename}")
public List<Uploadeddocs> getbyrefandtablename(@PathVariable String ref, @PathVariable String ref_tablename) {
List<Uploadeddocs> get = Service.getbyrefandtablename(ref, ref_tablename);
return get;
}
@Autowired
private JdbcTemplate jdbcTemplate;
@PostMapping("/execute")
public ResponseEntity<String> executeDump(@RequestParam Boolean execute, @RequestParam String filePath) {
// Check if execution is allowed
if (!execute) {
return ResponseEntity.ok("Service not executed due to 'execute' flag being false.");
}
Path path = Paths.get(System.getProperty("user.dir")).resolve(filePath);
try {
// Check if file exists
if (!Files.exists(path)) {
return ResponseEntity.badRequest().body("File not found: " + filePath);
}
// File content ko read karo aur SQL commands extract karo
String sql = FileUtils.readFileToString(new File(filePath), StandardCharsets.UTF_8);
// SQL commands ko execute karo
// Split statements by semicolon
List<String> sqlStatements = Arrays.stream(sql.split(";")).map(String::trim)
.filter(statement -> !statement.isEmpty()) // Empty statements ko remove karo
.filter(statement -> !statement.startsWith("USE")) // "USE db;" ko ignore karo
.filter(statement -> !statement.startsWith("--")) // Comments ko ignore karo
.filter(statement -> !statement.startsWith("/*")) // Special MySQL commands ko ignore karo
.collect(Collectors.toList());
// Execute each statement
for (String statement : sqlStatements) {
try {
jdbcTemplate.execute(statement);
System.out.println(statement + " executed..");
} catch (DataAccessException e) {
// Specific SQL execution error ko catch karo aur log karo
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body("Error executing statement: " + statement + " | Error: " + e.getMessage());
}
}
System.out.println("Dump executed executed..");
// File ko delete karo
Files.delete(path);
System.out.println("File delete successfully...");
return ResponseEntity.ok("Dump executed and file deleted successfully!");
} catch (IOException e) {
System.out.println("io error.." + e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body("File reading/deletion error: " + e.getMessage());
} catch (DataAccessException e) {
System.out.println("DataAccessException error.." + e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body("SQL execution error: " + e.getMessage());
}
}
}

View File

@ -0,0 +1,25 @@
package com.realnet.FileUpload.Entity;
import lombok.*;
import javax.persistence.*;
import com.realnet.WhoColumn.Entity.Who_column;
import java.time.LocalDateTime;
import java.util.*;
@Entity
@Data
public class Uploadeddocs extends Who_column {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String ref;
private String ref_table_name;
private String uploadedfile_name;
private String uploadedfile_path;
}

View File

@ -0,0 +1,17 @@
package com.realnet.FileUpload.Repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.FileUpload.Entity.Uploadeddocs;
@Repository
public interface UploadFileRepository extends JpaRepository<Uploadeddocs, Integer> {
@Query(value = "select * from uploadeddocs where ref=?1 && ref_table_name=?2", nativeQuery = true)
List<Uploadeddocs> findbyrefAnsTableName(String ref, String ref_table_name);
}

View File

@ -0,0 +1,66 @@
package com.realnet.FileUpload.Services;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Component
public class FileuploadService {
@Value("${projectPath}")
private String projectPath;
public boolean uploadFile(MultipartFile multipartFile, String addString) {
boolean f = false;
String UPLOAD_DIREC = File.separator + "Resources" + File.separator + "Files";
String originalFilename = multipartFile.getOriginalFilename();
String filetype = originalFilename.substring(originalFilename.lastIndexOf("."));
String filename = originalFilename.substring(0, originalFilename.lastIndexOf(".")) + addString;
String replacedfilename = filename + filetype;
System.out.println("file name with replace is ..." + replacedfilename);
String Path1 = projectPath + UPLOAD_DIREC;
String filepath = Path1 + File.separator + replacedfilename;
try {
if (!UPLOAD_DIREC.isEmpty()) {
File projectdir = new File(Path1);
if (!projectdir.exists()) {
boolean mkdir = projectdir.mkdirs();
System.out.println(Path1 + " folder create = " + mkdir);
}
}
// reading data
InputStream is = multipartFile.getInputStream();
byte data[] = new byte[is.available()];
is.read(data);
// writing data
FileOutputStream fos = new FileOutputStream(filepath);
fos.write(data);
fos.close();
fos.flush();
f = true;
} catch (Exception e) {
log.error(e.getLocalizedMessage());
}
return f;
}
}

View File

@ -0,0 +1,43 @@
package com.realnet.FileUpload.Services;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.realnet.FileUpload.Entity.Uploadeddocs;
import com.realnet.FileUpload.Repository.UploadFileRepository;
@Service
public class UploadedFileService {
@Autowired
private UploadFileRepository Repository;
public Uploadeddocs Savedata(Uploadeddocs data) {
return Repository.save(data);
}
public List<Uploadeddocs> getdetails() {
return (List<Uploadeddocs>) Repository.findAll();
}
public Uploadeddocs getdetailsbyId(Integer id) {
return Repository.findById(id).get();
}
public void delete_by_id(Integer id) {
Repository.deleteById(id);
}
public Uploadeddocs update(Uploadeddocs data, Integer id) {
Uploadeddocs old = Repository.findById(id).get();
old.setUploadedfile_name(data.getUploadedfile_name());
final Uploadeddocs test = Repository.save(old);
return test;
}
// get by ref and table name
public List<Uploadeddocs> getbyrefandtablename(String ref, String ref_table_name) {
return (List<Uploadeddocs>) Repository.findbyrefAnsTableName(ref, ref_table_name);
}
}

View File

@ -0,0 +1,54 @@
//package com.realnet.FileUpload.controller;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.multipart.MultipartFile;
//
//import com.realnet.fileupload.helper.Fileupload_helper;
//
//@RestController
//@RequestMapping("/sureserve/api")
//public class Filecontroller {
//
// @Autowired
// private Fileupload_helper fileuploadhelper;
//
// @PostMapping("/test")
// public ResponseEntity<String> upload(@RequestParam("file") MultipartFile file) {
//
// /*
// * System.out.println(file.getOriginalFilename());
// * System.out.println(file.getSize());
// * System.out.println(file.getContentType());
// */
//
// try {
//
// if (file.isEmpty()) {
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("must contain file");
// }
// /*
// * if(!file.getContentType().equals("image/png")) {
// *
// * return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).
// * body("must contain png format"); }
// */
//
// boolean f = fileuploadhelper.uploadFile(file);
// if (f) {
// return ResponseEntity.ok("File uploaded successfully");
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
//
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("something went wrong");
//
// }
//
//}

View File

@ -0,0 +1,81 @@
package com.realnet.FileUpload.helper;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
@Component
public class Fileupload_helper {
@Value("${projectPath}")
private String projectPath;
public final String UPLOAD_DIREC = "/Files";
public boolean uploadFile(MultipartFile multipartFile) {
boolean f = false;
try {
File path = new File(projectPath + UPLOAD_DIREC);
File FileParentDir = new File(path.toString());
if (!FileParentDir.exists()) {
FileParentDir.mkdirs();
}
// reading data
InputStream is = multipartFile.getInputStream();
byte data[] = new byte[is.available()];
is.read(data);
// writing data
FileOutputStream fos = new FileOutputStream(
projectPath + UPLOAD_DIREC + File.separator + multipartFile.getOriginalFilename());
fos.write(data);
fos.close();
fos.flush();
f = true;
} catch (Exception e) {
e.printStackTrace();
}
return f;
}
public boolean uploadFilewithtimestamp(MultipartFile multipartFile, String timestamp) {
boolean f = false;
try {
File path = new File(projectPath + UPLOAD_DIREC);
File FileParentDir = new File(path.toString());
if (!FileParentDir.exists()) {
FileParentDir.mkdirs();
}
// reading data
InputStream is = multipartFile.getInputStream();
byte data[] = new byte[is.available()];
is.read(data);
// writing data
FileOutputStream fos = new FileOutputStream(
projectPath + UPLOAD_DIREC + File.separator + timestamp + multipartFile.getOriginalFilename());
fos.write(data);
fos.close();
fos.flush();
f = true;
} catch (Exception e) {
e.printStackTrace();
}
return f;
}
}

View File

@ -0,0 +1,95 @@
package com.realnet.FromExtensionJson.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t;
import com.realnet.FromExtensionJson.Repository.FromExtensionJson_Repository;
import com.realnet.FromExtensionJson.Services.FromExtensionJson_Service;
@RequestMapping(value = "/FromExtensionJson")
@RestController
public class FromExtensionJson_Controller {
@Autowired
private FromExtensionJson_Service Service;
@Autowired
private FromExtensionJson_Repository extensionJson_Repository;
@PostMapping("/ExtensionJson")
public FromExtensionJson_t Savedata(@RequestBody FromExtensionJson_t data) {
FromExtensionJson_t save = Service.Savedata(data);
return save;
}
@GetMapping("/ExtensionJson")
public List<FromExtensionJson_t> getdetails() {
List<FromExtensionJson_t> get = Service.getdetails();
return get;
}
@GetMapping("/ExtensionJson/{id}")
public FromExtensionJson_t getdetailsbyId(@PathVariable Long id) {
FromExtensionJson_t get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/ExtensionJson/{id}")
public void delete_by_id(@PathVariable Long id) {
Service.delete_by_id(id);
}
@PutMapping("/ExtensionJson/{id}")
public FromExtensionJson_t update(@RequestBody FromExtensionJson_t data, @PathVariable Long id) {
FromExtensionJson_t update = Service.update(data, id);
return update;
}
@GetMapping("/ExtensionJson/{formCode}")
public ResponseEntity<String> getdetailsbyFormcode(@PathVariable String formCode) {
FromExtensionJson_t get = extensionJson_Repository.getdetailsbyFormCode(formCode);
// return get;
if (get != null) {
String jsonObject = get.getJsonObject();
return ResponseEntity.ok().body(jsonObject);
} else {
return ResponseEntity.notFound().build();
}
}
@GetMapping("/ListExtensionJson/{formCode}")
public ResponseEntity<List<String>> getJsonObjectsByFormCodeList(@PathVariable String formCode) {
List<String> jsonObjects = extensionJson_Repository.getJsonObjectsByFormCode(formCode);
if (!jsonObjects.isEmpty()) {
return ResponseEntity.ok().body(jsonObjects);
} else {
return ResponseEntity.notFound().build();
}
}
}

View File

@ -0,0 +1,20 @@
package com.realnet.FromExtensionJson.Entity;
import lombok.*;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Entity
@Data
public class FromExtensionJson_t{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String form_code;
private String account_id;
@Lob
private String jsonObject;
}

View File

@ -0,0 +1,23 @@
package com.realnet.FromExtensionJson.Repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t;
@Repository
public interface FromExtensionJson_Repository extends JpaRepository<FromExtensionJson_t, Long> {
@Query(value="SELECT * FROM from_extension_json_t WHERE form_code = ?1", nativeQuery = true)
FromExtensionJson_t getdetailsbyFormCode(String formCode);
@Query(value = "SELECT json_object FROM from_extension_json_t WHERE form_code = ?1", nativeQuery = true)
List<String> getJsonObjectsByFormCode(String formCode);
}

View File

@ -0,0 +1,39 @@
package com.realnet.FromExtensionJson.Services;
import com.realnet.FromExtensionJson.Repository.FromExtensionJson_Repository;
import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class FromExtensionJson_Service {
@Autowired
private FromExtensionJson_Repository Repository;
public FromExtensionJson_t Savedata(FromExtensionJson_t data) {
return Repository.save(data);
}
public List<FromExtensionJson_t> getdetails() {
return (List<FromExtensionJson_t>) Repository.findAll();
}
public FromExtensionJson_t getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public FromExtensionJson_t update(FromExtensionJson_t data, Long id) {
FromExtensionJson_t old = Repository.findById(id).get();
old.setForm_code(data.getForm_code());
old.setAccount_id(data.getAccount_id());
old.setJsonObject(data.getJsonObject());
final FromExtensionJson_t test = Repository.save(old);
return test;
}
}

View File

@ -0,0 +1,68 @@
package com.realnet.Gaurav_testing.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.Gaurav_testing.Entity.Gaurav_testing_t;
import com.realnet.Gaurav_testing.Services.Gaurav_testing_Service;
@RequestMapping(value = "/Gaurav_testing")
@RestController
public class Gaurav_testing_Controller {
@Autowired
private Gaurav_testing_Service Service;
@PostMapping("/Gaurav_testing")
public Gaurav_testing_t Savedata(@RequestBody Gaurav_testing_t data) {
Gaurav_testing_t save = Service.Savedata(data);
return save;
}
@GetMapping("/Gaurav_testing_custom")
public Gaurav_testing_t getdetail() {
Gaurav_testing_t get = Service.getdetailcustom();
return get;
}
@PostMapping("/Gaurav_testing_custom")
public Gaurav_testing_t Savecustom(@RequestBody Gaurav_testing_t data) {
Gaurav_testing_t save = Service.savecustom(data);
return save;
}
@GetMapping("/Gaurav_testing")
public List<Gaurav_testing_t> getdetails() {
List<Gaurav_testing_t> get = Service.getdetails();
return get;
}
@GetMapping("/Gaurav_testing/{id}")
public Gaurav_testing_t getdetailsbyId(@PathVariable Integer id) {
Gaurav_testing_t get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/Gaurav_testing/{id}")
public void delete_by_id(@PathVariable Integer id) {
Service.delete_by_id(id);
}
@PutMapping("/Gaurav_testing/{id}")
public Gaurav_testing_t update(@RequestBody Gaurav_testing_t data, @PathVariable Integer id) {
Gaurav_testing_t update = Service.update(data, id);
return update;
}
}

Some files were not shown because too many files have changed in this diff Show More