base_project

This commit is contained in:
risadmin_prod 2024-10-19 05:17:29 +00:00
commit e1ac826d51
1716 changed files with 113699 additions and 0 deletions

View File

@ -0,0 +1,3 @@
.DS_Store
backend/src/.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,314 @@
<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/org/apache/pdfbox/pdfbox/2.0.28/pdfbox-2.0.28.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/pdfbox/fontbox/2.0.28/fontbox-2.0.28.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.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-security/2.2.5.RELEASE/spring-boot-starter-security-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-config/5.2.2.RELEASE/spring-security-config-5.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-web/5.2.2.RELEASE/spring-security-web-5.2.2.RELEASE.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/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/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/apache/poi/poi-ooxml/4.1.2/poi-ooxml-4.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml-schemas/4.1.2/poi-ooxml-schemas-4.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/virtuald/curvesapi/1.06/curvesapi-1.06.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-scratchpad/3.9/poi-scratchpad-3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi/4.1.2/poi-4.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/SparseBitSet/1.2/SparseBitSet-1.2.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.24/postgresql-42.2.24.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.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/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/security/oauth/boot/spring-security-oauth2-autoconfigure/2.3.3.RELEASE/spring-security-oauth2-autoconfigure-2.3.3.RELEASE.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/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/springframework/security/oauth/spring-security-oauth2/2.4.1.RELEASE/spring-security-oauth2-2.4.1.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-jwt/1.1.1.RELEASE/spring-security-jwt-1.1.1.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.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/security/spring-security-oauth2-client/5.2.2.RELEASE/spring-security-oauth2-client-5.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/oauth2-oidc-sdk/6.14/oauth2-oidc-sdk-6.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/mail/javax.mail/1.6.1/javax.mail-1.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/json-smart/2.3/json-smart-2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/nimbus-jose-jwt/9.37.3/nimbus-jose-jwt-9.37.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/5.2.2.RELEASE/spring-security-core-5.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-oauth2-core/5.2.2.RELEASE/spring-security-oauth2-core-5.2.2.RELEASE.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/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/20201115/json-20201115.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/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-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/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/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"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/ooxml-schemas/1.4/ooxml-schemas-1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/3.0.1/xmlbeans-3.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/jcraft/jsch/0.1.55/jsch-0.1.55.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/twilio/sdk/twilio/8.18.0/twilio-8.18.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/jsonwebtoken/jjwt-api/0.11.2/jjwt-api-0.11.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/jsonwebtoken/jjwt-jackson/0.11.2/jjwt-jackson-0.11.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/jsonwebtoken/jjwt-impl/0.11.2/jjwt-impl-0.11.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/xhtmlrenderer/flying-saucer-pdf/9.1.22/flying-saucer-pdf-9.1.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcmail-jdk14/1.64/bcmail-jdk14-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk14/1.64/bcpkix-jdk14-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bctsp-jdk14/1.46/bctsp-jdk14-1.46.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk14/1.64/bcprov-jdk14-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/xhtmlrenderer/flying-saucer-core/9.1.22/flying-saucer-core-9.1.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/lowagie/itext/2.1.7/itext-2.1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/bouncycastle/bcmail-jdk14/138/bcmail-jdk14-138.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/bouncycastle/bcprov-jdk14/138/bcprov-jdk14-138.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-api/3.141.59/selenium-api-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/3.141.59/selenium-chrome-driver-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-edge-driver/3.141.59/selenium-edge-driver-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/3.141.59/selenium-firefox-driver-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/3.141.59/selenium-ie-driver-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-opera-driver/3.141.59/selenium-opera-driver-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-remote-driver/3.141.59/selenium-remote-driver-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-safari-driver/3.141.59/selenium-safari-driver-3.141.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/seleniumhq/selenium/selenium-support/3.141.59/selenium-support-3.141.59.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/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/okhttp/3.14.7/okhttp-3.14.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okio/okio/1.14.0/okio-1.14.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/itextpdf/itextpdf/5.5.13.2/itextpdf-5.5.13.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mariadb/jdbc/mariadb-java-client/3.1.2/mariadb-java-client-3.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/waffle/waffle-jna/3.2.0/waffle-jna-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/dev/jna/jna/4.5.2/jna-4.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/dev/jna/jna-platform/4.5.2/jna-platform-4.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.30/jcl-over-slf4j-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/db2/jcc/11.5.5.0/jcc-11.5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mongodb/mongo-java-driver/3.12.12/mongo-java-driver-3.12.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/redis/clients/jedis/3.7.0/jedis-3.7.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-pool2/2.7.0/commons-pool2-2.7.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/firebirdsql/jdbc/jaybird/4.0.0.java11/jaybird-4.0.0.java11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/resource/connector-api/1.5/connector-api-1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr4-runtime/4.7.2/antlr4-runtime-4.7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/orientechnologies/orientdb-core/3.2.19/orientdb-core-3.2.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jnr/jnr-posix/3.1.15/jnr-posix-3.1.15.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jnr/jnr-ffi/2.2.11/jnr-ffi-2.2.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jnr/jffi/1.3.9/jffi-1.3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jnr/jffi/1.3.9/jffi-1.3.9-native.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/9.2/asm-9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-commons/9.2/asm-commons-9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-analysis/9.2/asm-analysis-9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-tree/9.2/asm-tree-9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-util/9.2/asm-util-9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jnr/jnr-a64asm/1.0.0/jnr-a64asm-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jnr/jnr-constants/0.10.3/jnr-constants-0.10.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/concurrentlinkedhashmap/concurrentlinkedhashmap-lru/1.4.2/concurrentlinkedhashmap-lru-1.4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/graalvm/sdk/graal-sdk/21.3.5/graal-sdk-21.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/graalvm/truffle/truffle-api/21.3.5/truffle-api-21.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/graalvm/js/js/21.3.5/js-21.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/graalvm/regex/regex/21.3.5/regex-21.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/icu/icu4j/71.1/icu4j-71.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/graalvm/js/js-scriptengine/21.3.5/js-scriptengine-21.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/graalvm/tools/profiler/21.3.5/profiler-21.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/graalvm/tools/chromeinspector/21.3.5/chromeinspector-21.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/orientechnologies/orientdb-jdbc/3.2.19/orientdb-jdbc-3.2.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/orientechnologies/orientdb-server/3.2.19/orientdb-server-3.2.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/orientechnologies/orientdb-tools/3.2.19/orientdb-tools-3.2.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-core/3.0.2/jaxb-core-3.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/orientechnologies/orientdb-client/3.2.19/orientdb-client-3.2.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/dynamodb/2.17.102/dynamodb-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/aws-json-protocol/2.17.102/aws-json-protocol-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/third-party-jackson-core/2.17.102/third-party-jackson-core-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/json-utils/2.17.102/json-utils-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/protocol-core/2.17.102/protocol-core-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/profiles/2.17.102/profiles-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/sdk-core/2.17.102/sdk-core-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/auth/2.17.102/auth-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/eventstream/eventstream/1.0.1/eventstream-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/http-client-spi/2.17.102/http-client-spi-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/regions/2.17.102/regions-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/annotations/2.17.102/annotations-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/utils/2.17.102/utils-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/aws-core/2.17.102/aws-core-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/metrics-spi/2.17.102/metrics-spi-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/apache-client/2.17.102/apache-client-2.17.102.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/software/amazon/awssdk/netty-nio-client/2.17.102/netty-nio-client-2.17.102.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-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-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-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-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-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-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/com/typesafe/netty/netty-reactive-streams-http/2.0.5/netty-reactive-streams-http-2.0.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/typesafe/netty/netty-reactive-streams/2.0.5/netty-reactive-streams-2.0.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/couchbase/client/java-client/3.1.5/java-client-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/couchbase/client/core-io/2.1.5/core-io-2.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/reactor-core/3.4.13/reactor-core-3.4.13.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/neo4j/neo4j-jdbc-bolt/5.0.0/neo4j-jdbc-bolt-5.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/paytm/pg/paytm-checksum/1.2.1/paytm-checksum-1.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/razorpay/razorpay-java/1.4.4/razorpay-java-1.4.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/logging-interceptor/3.14.7/logging-interceptor-3.14.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-text/1.3/commons-text-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-test/5.2.4.RELEASE/spring-test-5.2.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/fop/2.6/fop-2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/fop-util/2.6/fop-util-2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/xmlgraphics-commons/2.6/xmlgraphics-commons-2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/fop-events/2.6/fop-events-2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thoughtworks/qdox/qdox/1.12/qdox-1.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/fop-core/2.6/fop-core-2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-anim/1.14/batik-anim-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-css/1.14/batik-css-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-dom/1.14/batik-dom-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xalan/xalan/2.7.2/xalan-2.7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xalan/serializer/2.7.2/serializer-2.7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-ext/1.14/batik-ext-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-parser/1.14/batik-parser-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-shared-resources/1.14/batik-shared-resources-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-svg-dom/1.14/batik-svg-dom-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-util/1.14/batik-util-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-constants/1.14/batik-constants-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-i18n/1.14/batik-i18n-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-awt-util/1.14/batik-awt-util-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-bridge/1.14/batik-bridge-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-script/1.14/batik-script-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-xml/1.14/batik-xml-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-extension/1.14/batik-extension-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-gvt/1.14/batik-gvt-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-transcoder/1.14/batik-transcoder-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlgraphics/batik-svggen/1.14/batik-svggen-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-csv/1.4/commons-csv-1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/opencsv/opencsv/5.5/opencsv-5.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.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=builder
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

View File

@ -0,0 +1,79 @@
package com.realnet.Connector.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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.Connector.Entity.Connector;
import com.realnet.Connector.Repository.Connectorrepository;
import com.realnet.users.entity.Sys_Accounts;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
@RestController
@RequestMapping("/connector")
public class ConnectorController {
@Autowired
private Connectorrepository connectorrepository;
@Autowired
private AppUserServiceImpl userService;
//ADD DATA
@PostMapping("/Connectorjson")
public ResponseEntity<?> save(@RequestBody Connector connector) {
AppUser loggedInUser = userService.getLoggedInUser();
Long account_id = loggedInUser.getAccount().getAccount_id();
connector.setAccountId(account_id);
Connector save = connectorrepository.save(connector);
return new ResponseEntity<>(save, HttpStatus.OK);
}
//UPDATE BY ID
@PutMapping("/Connectorjson/{id}")
public ResponseEntity<?> update(@PathVariable Long id, @RequestBody Connector connector) {
Connector con = connectorrepository.findById(id).orElseThrow(null);
con.setName(connector.getName());
con.setConnector_json(connector.getConnector_json());
Connector save = connectorrepository.save(con);
return new ResponseEntity<>(save, HttpStatus.OK);
}
//GET ALL
@GetMapping("/Connectorjson")
public ResponseEntity<?> getall() {
List<Connector> save = connectorrepository.findAll();
return new ResponseEntity<>(save, HttpStatus.OK);
}
//GET BY ID
@GetMapping("/Connectorjson/{id}")
public ResponseEntity<?> getbyid(@PathVariable Long id) {
Connector con = connectorrepository.findById(id).orElseThrow(null);
return new ResponseEntity<>(con, HttpStatus.OK);
}
//DELETE BY ID
@DeleteMapping("/Connectorjson/{id}")
public void delete(@PathVariable Long id){
Connector con = connectorrepository.findById(id).orElseThrow(null);
connectorrepository.delete(con);
}
}

View File

@ -0,0 +1,81 @@
package com.realnet.Connector.Controller;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.realnet.Connector.Entity.Connector;
import com.realnet.Connector.Entity.Mapping;
import com.realnet.Connector.Repository.Connectorrepository;
@RestController
@RequestMapping("/token/connector/mapping")
public class MappingController {
@Autowired
private Connectorrepository connectorrepository;
@PostMapping("/mapping")
public Object connector(@RequestBody Mapping mapping) {
List<Object> list = new ArrayList<>();
// Map<String> param = new HashMap<String>();
String str =mapping.getMappingString();
JsonParser parser = new JsonParser();
JsonElement element = parser.parse(str);
JsonObject obj = element.getAsJsonObject();
//get key from get api
Set<Map.Entry<String, JsonElement>> entries = obj.entrySet();
for (Map.Entry<String, JsonElement> entry : entries) {
String key = entry.getKey();
String string = key.toString();
list.add(string);
}
return list;
}
@PostMapping("/mapping1")
public Object connector1(@RequestBody Mapping mapping) {
List<Object> list = new ArrayList<>();
// Map<String> param = new HashMap<String>();
String str =mapping.getMappingString();
JsonParser parser = new JsonParser();
JsonElement element = parser.parse(str);
JsonObject obj = element.getAsJsonObject();
//get values from get api
Set<Map.Entry<String, JsonElement>> entries = obj.entrySet();
for (Map.Entry<String, JsonElement> entry : entries) {
String string2 = entry.getValue().getAsString();
list.add(string2);
}
return list;
}
//get api for call connector by name for job(by gk)
@GetMapping("/connectorname/{name}")
public ResponseEntity<?> getconnector(@PathVariable String name) {
Connector save = connectorrepository.findconnectorbyname(name);
return new ResponseEntity<>(save, HttpStatus.OK);
}
}

View File

@ -0,0 +1,33 @@
package com.realnet.Connector.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Column;
import com.realnet.Dashboard1.Entity.dashbord_Who_collumn;
import lombok.Data;
@Entity
@Data
public class Connector extends dashbord_Who_collumn {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
@Column(length = 15000)
private String get_str;
@Lob
private String connector_json;
}

View File

@ -0,0 +1,9 @@
package com.realnet.Connector.Entity;
import lombok.Data;
@Data
public class Mapping {
private String mappingString;
}

View File

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

View File

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Error || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<main class="page error-page">
<section>
<h1>404</h1>
<h3>page not found</h3>
</section>
</main>
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

View File

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>About || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<main class="page">
<section class="about-page">
<article>
<h2>I'm baby coloring book poke taxidermy</h2>
<p>
Taxidermy forage glossier letterpress heirloom before they sold out
you probably haven't heard of them banh mi biodiesel chia.
</p>
<p>
Taiyaki tumblr flexitarian jean shorts brunch, aesthetic salvia
retro.
</p>
<a href="contact.html" class="btn"> contact </a>
</article>
<!-- needs fixes -->
<img
src="./assets/about.jpeg"
alt="Person Pouring Salt in Bowl"
class="img about-img"
/>
</section>
<section class="featured-recipes">
<h5 class="featured-title">Look At This Awesomesouce!</h5>
<div class="recipes-list">
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-1.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Carne Asada</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-2.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Greek Ribs</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-3.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Vegetable Soup</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
</div>
</section>
</main>
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contact || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<main class="page">
<section class="contact-container">
<article class="contact-info">
<h3>Want To Get In Touch?</h3>
<p>
Four dollar toast biodiesel plaid salvia actually pickled banjo
bespoke mlkshk intelligentsia edison bulb synth.
</p>
<p>Cardigan prism bicycle rights put a bird on it deep v.</p>
<p>
Hashtag swag health goth air plant, raclette listicle fingerstache
cold-pressed fanny pack bicycle rights cardigan poke.
</p>
</article>
<article>
<form class="form contact-form">
<div class="form-row">
<label html="name" class="form-label">your name</label>
<input type="text" name="name" id="name" class="form-input" />
</div>
<div class="form-row">
<label html="email" class="form-label">your email</label>
<input type="text" name="email" id="email" class="form-input" />
</div>
<div class="form-row">
<label html="message" class="form-label">message</label>
<textarea name="message" id="message" class="form-textarea"></textarea>
</div>
<button type="submit" class="btn btn-block">
submit
</button>
</form>
</article>
</section>
<!-- featured recipes -->
<section class="featured-recipes">
<h5 class="featured-title">Look At This Awesomesouce!</h5>
<div class="recipes-list">
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-1.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Carne Asada</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-2.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Greek Ribs</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-3.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Vegetable Soup</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
</div>
</section>
</main>
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

View File

@ -0,0 +1,746 @@
*,
::after,
::before {
box-sizing: border-box;
}
/* fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&family=Montserrat&display=swap');
html {
font-size: 100%;
} /*16px*/
:root {
/* colors */
--primary-100: #e2e0ff;
--primary-200: #c1beff;
--primary-300: #a29dff;
--primary-400: #837dff;
--primary-500: #645cff;
--primary-600: #504acc;
--primary-700: #3c3799;
--primary-800: #282566;
--primary-900: #141233;
/* grey */
--grey-50: #f8fafc;
--grey-100: #f1f5f9;
--grey-200: #e2e8f0;
--grey-300: #cbd5e1;
--grey-400: #94a3b8;
--grey-500: #64748b;
--grey-600: #475569;
--grey-700: #334155;
--grey-800: #1e293b;
--grey-900: #0f172a;
/* rest of the colors */
--black: #222;
--white: #fff;
--red-light: #f8d7da;
--red-dark: #842029;
--green-light: #d1e7dd;
--green-dark: #0f5132;
/* fonts */
--headingFont: 'Roboto', sans-serif;
--bodyFont: 'Nunito', sans-serif;
--smallText: 0.7em;
/* rest of the vars */
--backgroundColor: var(--grey-50);
--textColor: var(--grey-900);
--borderRadius: 0.25rem;
--letterSpacing: 1px;
--transition: 0.3s ease-in-out all;
--max-width: 1120px;
--fixed-width: 600px;
/* box shadow*/
--shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
--shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
0 4px 6px -2px rgba(0, 0, 0, 0.05);
--shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
body {
background: var(--backgroundColor);
font-family: var(--bodyFont);
font-weight: 400;
line-height: 1.75;
color: var(--textColor);
}
p {
margin-top: 0;
margin-bottom: 1.5rem;
max-width: 40em;
}
h1,
h2,
h3,
h4,
h5 {
margin: 0;
margin-bottom: 1.38rem;
font-family: var(--headingFont);
font-weight: 400;
line-height: 1.3;
text-transform: capitalize;
letter-spacing: var(--letterSpacing);
}
h1 {
margin-top: 0;
font-size: 3.052rem;
}
h2 {
font-size: 2.441rem;
}
h3 {
font-size: 1.953rem;
}
h4 {
font-size: 1.563rem;
}
h5 {
font-size: 1.25rem;
}
small,
.text-small {
font-size: var(--smallText);
}
a {
text-decoration: none;
}
ul {
list-style-type: none;
padding: 0;
}
.img {
width: 100%;
display: block;
object-fit: cover;
}
/* buttons */
.btn {
cursor: pointer;
color: var(--white);
background: var(--primary-500);
border: transparent;
border-radius: var(--borderRadius);
letter-spacing: var(--letterSpacing);
padding: 0.375rem 0.75rem;
box-shadow: var(--shadow-1);
transition: var(--transtion);
text-transform: capitalize;
display: inline-block;
}
.btn:hover {
background: var(--primary-700);
box-shadow: var(--shadow-3);
}
.btn-hipster {
color: var(--primary-500);
background: var(--primary-200);
}
.btn-hipster:hover {
color: var(--primary-200);
background: var(--primary-700);
}
.btn-block {
width: 100%;
}
/* alerts */
.alert {
padding: 0.375rem 0.75rem;
margin-bottom: 1rem;
border-color: transparent;
border-radius: var(--borderRadius);
}
.alert-danger {
color: var(--red-dark);
background: var(--red-light);
}
.alert-success {
color: var(--green-dark);
background: var(--green-light);
}
/* form */
.form {
width: 90vw;
max-width: var(--fixed-width);
background: var(--white);
border-radius: var(--borderRadius);
box-shadow: var(--shadow-2);
padding: 2rem 2.5rem;
margin: 3rem auto;
}
.form-label {
display: block;
font-size: var(--smallText);
margin-bottom: 0.5rem;
text-transform: capitalize;
letter-spacing: var(--letterSpacing);
}
.form-input,
.form-textarea {
width: 100%;
padding: 0.375rem 0.75rem;
border-radius: var(--borderRadius);
background: var(--backgroundColor);
border: 1px solid var(--grey-200);
}
.form-row {
margin-bottom: 1rem;
}
.form-textarea {
height: 7rem;
}
::placeholder {
font-family: inherit;
color: var(--grey-400);
}
.form-alert {
color: var(--red-dark);
letter-spacing: var(--letterSpacing);
text-transform: capitalize;
}
/* alert */
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
.loading {
width: 6rem;
height: 6rem;
border: 5px solid var(--grey-400);
border-radius: 50%;
border-top-color: var(--primary-500);
animation: spinner 0.6s linear infinite;
}
.loading {
margin: 0 auto;
}
/* title */
.title {
text-align: center;
}
.title-underline {
background: var(--primary-500);
width: 7rem;
height: 0.25rem;
margin: 0 auto;
margin-top: -1rem;
}
/*
===============
Navbar
===============
*/
.navbar {
display: flex;
align-items: center;
justify-content: center;
}
.nav-center {
width: 90vw;
max-width: var(--max-width);
}
.nav-header {
height: 6rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav-header img {
width: 200px;
}
.nav-logo {
display: flex;
align-items: flex-end;
}
.nav-btn {
padding: 0.15rem 0.75rem;
}
.nav-btn i {
font-size: 1.25rem;
}
.nav-links {
height: 0;
overflow: hidden;
display: flex;
flex-direction: column;
transition: var(--transition);
}
.show-links {
height: 23.9375rem;
}
.nav-link {
display: block;
text-align: center;
font-size: 1.25rem;
text-transform: capitalize;
color: var(--grey-900);
letter-spacing: var(--letterSpacing);
padding: 1rem 0;
border-top: 1px solid var(--grey-500);
transition: var(--transition);
}
.nav-link:hover {
color: var(--primary-500);
}
.contact-link a {
padding: 0.15rem 1rem;
}
@media screen and (min-width: 992px) {
.navbar {
height: 6rem;
}
.nav-center {
display: flex;
align-items: center;
}
.nav-header {
padding: 0;
margin-right: 2rem;
height: auto;
}
.nav-btn {
display: none;
}
.nav-links {
height: auto !important;
flex-direction: row;
align-items: center;
width: 100%;
}
.nav-link {
padding: 0;
border-top: none;
margin-right: 1rem;
font-size: 1rem;
}
.contact-link {
margin-right: 0;
margin-left: auto;
}
}
/*
===============
Page
===============
*/
.page {
width: 90vw;
max-width: var(--max-width);
margin: 0 auto;
}
.page {
padding-top: 2rem;
min-height: calc(100vh - (6rem + 4rem));
}
/*
===============
Footer
===============
*/
.page-footer {
text-align: center;
height: 4rem;
display: flex;
align-items: center;
justify-content: center;
background: var(--black);
color: var(--white);
}
.page-footer h5 {
margin-top: 0;
margin-bottom: 0;
}
.page-footer p {
margin-bottom: 0;
}
.page-footer .footer-logo,
.page-footer a {
color: var(--primary-500);
}
/*
===============
Hero
===============
*/
.hero {
height: 40vh;
position: relative;
margin-bottom: 2rem;
background: url('../assets/main.jpeg') center/cover no-repeat;
border-radius: var(--borderRadius);
}
.hero-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.4);
border-radius: var(--borderRadius);
}
.hero-text {
color: var(--white);
text-align: center;
}
@media only screen and (min-width: 768px) {
.hero-text h1 {
font-size: 4rem;
margin-bottom: 0;
}
}
/*
===============
Recipes
===============
*/
.recipes-container {
display: grid;
gap: 2rem 1rem;
}
.recipes-list {
display: grid;
gap: 2rem 1rem;
padding-bottom: 3rem;
}
.tags-container {
order: 1;
display: flex;
flex-direction: column;
padding-bottom: 3rem;
/* background: blue; */
}
.tags-container h4 {
margin-bottom: 0.5rem;
font-weight: 500;
}
.tags-list {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
.tags-list a {
text-transform: capitalize;
display: block;
color: var(--grey-500);
transition: var(--transition);
}
.tags-list a:hover {
color: var(--primary-500);
}
.recipe {
display: block;
}
.recipe-img {
height: 15rem;
border-radius: var(--borderRadius);
margin-bottom: 1rem;
}
.recipe h5 {
margin-bottom: 0;
margin-top: 0.25rem;
line-height: 1;
color: var(--grey-700);
}
.recipe p {
margin-bottom: 0;
line-height: 1;
color: var(--grey-500);
margin-top: 0.5rem;
letter-spacing: var(--letterSpacing);
}
@media screen and (min-width: 576px) {
.recipes-list {
grid-template-columns: 1fr 1fr;
}
.recipe-img {
height: 10rem;
}
}
@media screen and (min-width: 992px) {
.recipes-container {
grid-template-columns: 200px 1fr;
gap: 1rem;
}
.recipes-list {
grid-template-columns: 1fr 1fr;
}
.recipe p {
font-size: 0.85rem;
}
.tags-container {
order: 0;
/* background: blue; */
}
.tags-list {
display: grid;
grid-template-columns: 1fr;
}
}
@media screen and (min-width: 1200px) {
.recipe h5 {
font-size: 1.15rem;
}
.recipes-list {
grid-template-columns: 1fr 1fr 1fr;
}
}
/*
===============
Error
===============
*/
.error-page {
text-align: center;
padding-top: 5rem;
}
.error-page h1 {
font-size: 9rem;
}
/*
===============
About Page
===============
*/
.about-page h2 {
text-transform: none;
font-weight: bold;
}
.about-page {
display: grid;
gap: 2rem 4rem;
padding-bottom: 3rem;
}
.about-img {
border-radius: var(--borderRadius);
height: 300px;
}
@media screen and (min-width: 992px) {
.about-page {
grid-template-columns: 1fr 1fr;
grid-template-rows: 400px;
align-items: center;
}
.about-img {
height: 100%;
}
}
.featured-title {
text-align: center;
}
/*
===============
Contact Page
===============
*/
.contact-form {
width: 100%;
margin: 0;
}
.contact-container {
display: grid;
gap: 2rem 3rem;
padding-bottom: 3rem;
}
@media screen and (min-width: 992px) {
.contact-container {
grid-template-columns: 1fr 450px;
align-items: center;
}
}
/*
===============
Tags Page
===============
*/
.tags-wrapper {
display: grid;
gap: 2rem;
padding-bottom: 3rem;
}
.tag {
background: var(--grey-500);
border-radius: var(--borderRadius);
text-align: center;
color: var(--white);
transition: var(--transition);
padding: 0.75rem 0;
}
.tag:hover {
background: var(--primary-500);
}
.tag h5,
.tag p {
margin-bottom: 0;
}
.tag h5 {
font-weight: 600;
}
@media screen and (min-width: 576px) {
.tags-wrapper {
grid-template-columns: 1fr 1fr;
}
}
@media screen and (min-width: 992px) {
.tags-wrapper {
grid-template-columns: 1fr 1fr 1fr;
}
}
/*
===============
Recipe Template
===============
*/
.recipe-hero {
display: grid;
gap: 3rem;
}
.recipe-hero-img {
height: 300px;
border-radius: var(--borderRadius);
}
.recipe-info p {
color: var(--grey-600);
}
.recipe-icons {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin: 2rem 0;
text-align: center;
}
.recipe-icons i {
font-size: 1.5rem;
color: var(--primary-500);
}
.recipe-icons h5,
.recipe-icons p {
margin-bottom: 0;
font-size: 0.85em;
}
.recipe-icons p {
color: var(--grey-600);
}
.recipe-tags {
display: flex;
align-items: center;
flex-wrap: wrap;
font-size: 0.7em;
font-weight: 600;
}
.recipe-tags a {
background: var(--primary-500);
border-radius: var(--borderRadius);
color: var(--white);
padding: 0.05rem 0.5rem;
margin: 0 0.25rem;
text-transform: capitalize;
}
@media screen and (min-width: 992px) {
.recipe-hero {
grid-template-columns: 4fr 5fr;
align-items: center;
}
}
.recipe-content {
padding: 3rem 0;
display: grid;
gap: 2rem 5rem;
}
@media screen and (min-width: 992px) {
.recipe-content {
grid-template-columns: 2fr 1fr;
}
}
.single-instruction header {
display: grid;
grid-template-columns: auto 1fr;
gap: 1.5rem;
align-items: center;
}
.single-instruction header p {
text-transform: uppercase;
font-weight: 600;
color: var(--primary-500);
margin-bottom: 0;
}
.single-instruction > p {
color: var(--grey-700);
}
.single-instruction header div {
height: 2px;
background: var(--grey-300);
}
.second-column {
display: grid;
row-gap: 2rem;
}
.single-ingredient {
border-bottom: 2px solid var(--grey-300);
padding-bottom: 0.75rem;
color: var(--grey-700);
}
.single-tool {
border-bottom: 2px solid var(--grey-300);
padding-bottom: 0.75rem;
color: var(--primary-500);
text-transform: capitalize;
}

View File

@ -0,0 +1,351 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type='checkbox'],
[type='radio'] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View File

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simply Recipes || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<!-- main -->
<main class="page">
<!-- header -->
<header class="hero">
<div class="hero-container">
<div class="hero-text">
<h1>simply recipes</h1>
<h4>no fluff, just recipes</h4>
</div>
</div>
</header>
<!-- end of header -->
<section class="recipes-container">
<!-- tag container -->
<div class="tags-container">
<h4>recipes</h4>
<div class="tags-list">
<a href="tag-template.html">Beef (1)</a>
<a href="tag-template.html">Breakfast (2)</a>
<a href="tag-template.html">Carrots (3)</a>
<a href="tag-template.html">Food (4)</a>
</div>
</div>
<!-- end of tag container -->
<!-- recipes list -->
<div class="recipes-list">
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-1.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Carne Asada</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-2.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Greek Ribs</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-3.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Vegetable Soup</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-4.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Banana Pancakes</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
</div>
<!-- end of recipes list -->
</section>
</main>
<!-- end of main -->
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

View File

@ -0,0 +1,19 @@
const getElement = (selector) => {
const element = document.querySelector(selector)
if (element) return element
throw Error(
`Please double check your class names, there is no ${selector} class`
)
}
const links = getElement('.nav-links')
const navBtnDOM = getElement('.nav-btn')
navBtnDOM.addEventListener('click', () => {
links.classList.toggle('show-links')
})
const date = getElement('#date')
const currentYear = new Date().getFullYear()
date.textContent = currentYear

View File

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Recipes || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<!-- main -->
<main class="page">
<section class="recipes-container">
<!-- tag container -->
<div class="tags-container">
<h4>recipes</h4>
<div class="tags-list">
<a href="tag-template.html">Beef (1)</a>
<a href="tag-template.html">Breakfast (2)</a>
<a href="tag-template.html">Carrots (3)</a>
<a href="tag-template.html">Food (4)</a>
</div>
</div>
<!-- end of tag container -->
<!-- recipes list -->
<div class="recipes-list">
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-1.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Carne Asada</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-2.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Greek Ribs</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-3.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Vegetable Soup</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-4.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Banana Pancakes</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
</div>
</section>
</main>
<!-- end of main -->
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

View File

@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Single Recipe || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<main class="page">
<div class="recipe-page">
<section class="recipe-hero">
<img
src="./assets/recipes/recipe-4.jpeg"
class="img recipe-hero-img"
/>
<article class="recipe-info">
<h2>Banana Pancakes</h2>
<p>
Shabby chic humblebrag banh mi bushwick, banjo kale chips
meggings. Cred selfies sartorial, cloud bread disrupt blue bottle
seitan. Dreamcatcher tousled bitters, health goth vegan venmo
whatever street art lyft shabby chic pitchfork beard. Drinking
vinegar poke tbh, iPhone coloring book polaroid truffaut tousled
ramps pug trust fund letterpress. Portland four loko austin
chicharrones bitters single-origin coffee. Leggings letterpress
occupy pour-over.
</p>
<div class="recipe-icons">
<article>
<i class="fas fa-clock"></i>
<h5>prep time</h5>
<p>30 min.</p>
</article>
<article>
<i class="far fa-clock"></i>
<h5>cook time</h5>
<p>15 min.</p>
</article>
<article>
<i class="fas fa-user-friends"></i>
<h5>serving</h5>
<p>6 servings</p>
</article>
</div>
<p class="recipe-tags">
Tags : <a href="tag-template.html">beef</a>
<a href="tag-template.html">breakfast</a>
<a href="tag-template.html">pancakes</a>
<a href="tag-template.html">food</a>
</p>
</article>
</section>
<!-- content -->
<section class="recipe-content">
<article>
<h4>instructions</h4>
<!-- single instruction -->
<div class="single-instruction">
<header>
<p>step 1</p>
<div></div>
</header>
<p>
I'm baby mustache man braid fingerstache small batch venmo
succulents shoreditch.
</p>
</div>
<!-- end of single instruction -->
<!-- single instruction -->
<div class="single-instruction">
<header>
<p>step 2</p>
<div></div>
</header>
<p>
Pabst pitchfork you probably haven't heard of them, asymmetrical
seitan tousled succulents wolf banh mi man bun bespoke selfies
freegan ethical hexagon.
</p>
</div>
<!-- end of single instruction -->
<!-- single instruction -->
<div class="single-instruction">
<header>
<p>step 3</p>
<div></div>
</header>
<p>
Polaroid iPhone bitters chambray. Cornhole swag kombucha
live-edge.
</p>
</div>
<!-- end of single instruction -->
</article>
<article class="second-column">
<div>
<h4>ingredients</h4>
<p class="single-ingredient">1 1/2 cups dry pancake mix</p>
<p class="single-ingredient">1/2 cup flax seed meal</p>
<p class="single-ingredient">1 cup skim milk</p>
</div>
<div>
<h4>tools</h4>
<p class="single-tool">Hand Blender</p>
<p class="single-tool">Large Heavy Pot With Lid</p>
<p class="single-tool">Measuring Spoons</p>
<p class="single-tool">Measuring Cups</p>
</div>
</article>
</section>
</div>
</main>
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

View File

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Recipe Template || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<main class="page">
<div class="featured-recipes">
<h4>Beef</h4>
<!-- recipes list -->
<div class="recipes-list">
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-1.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Carne Asada</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-2.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Greek Ribs</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-3.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Vegetable Soup</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
<!-- single recipe -->
<a href="single-recipe.html" class="recipe">
<img
src="./assets/recipes/recipe-4.jpeg"
class="img recipe-img"
alt=""
/>
<h5>Banana Pancakes</h5>
<p>Prep : 15min | Cook : 5min</p>
</a>
<!-- end of single recipe -->
</div>
<!-- end of recipe list -->
</div>
</main>
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tags || Final</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<!-- nav -->
<nav class="navbar">
<div class="nav-center">
<div class="nav-header">
<a href="index.html" class="nav-logo">
<img src="./assets/logo.svg" alt="simply recipes" />
</a>
<button class="nav-btn btn">
<i class="fas fa-align-justify"></i>
</button>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link"> home </a>
<a href="about.html" class="nav-link"> about </a>
<a href="tags.html" class="nav-link"> tags </a>
<a href="recipes.html" class="nav-link"> recipes </a>
<div class="nav-link contact-link">
<a href="contact.html" class="btn"> contact </a>
</div>
</div>
</div>
</nav>
<!-- end of nav -->
<main class="page">
<section class="tags-wrapper">
<!-- single tag -->
<a href="tag-template.html" class="tag">
<h5>beef</h5>
<p>1 recipe</p>
</a>
<!-- end of single tag -->
<!-- single tag -->
<a href="tag-template.html" class="tag">
<h5>breakfast</h5>
<p>2 recipe</p>
</a>
<!-- end of single tag -->
<!-- single tag -->
<a href="tag-template.html" class="tag">
<h5>carrots</h5>
<p>3 recipe</p>
</a>
<!-- end of single tag -->
<!-- single tag -->
<a href="tag-template.html" class="tag">
<h5>dinner</h5>
<p>4 recipe</p>
</a>
<!-- end of single tag -->
<!-- single tag -->
<a href="tag-template.html" class="tag">
<h5>food</h5>
<p>1 recipe</p>
</a>
<!-- end of single tag -->
</section>
</main>
<!-- footer -->
<footer class="page-footer">
<p>
&copy; <span id="date"></span>
<span class="footer-logo">SimplyRecipes</span> Built by
<a href="https://www.johnsmilga.com/">Coding Addict</a>
</p>
</footer>
<script src="./js/app.js"></script>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Error || Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>Error Page</h1>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>About || Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>About Page</h1>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contact || Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>Contact Page</h1>
</body>
</html>

View File

@ -0,0 +1,262 @@
*,
::after,
::before {
box-sizing: border-box;
}
/* fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&family=Montserrat&display=swap');
html {
font-size: 100%;
} /*16px*/
:root {
/* colors */
--primary-100: #e2e0ff;
--primary-200: #c1beff;
--primary-300: #a29dff;
--primary-400: #837dff;
--primary-500: #645cff;
--primary-600: #504acc;
--primary-700: #3c3799;
--primary-800: #282566;
--primary-900: #141233;
/* grey */
--grey-50: #f8fafc;
--grey-100: #f1f5f9;
--grey-200: #e2e8f0;
--grey-300: #cbd5e1;
--grey-400: #94a3b8;
--grey-500: #64748b;
--grey-600: #475569;
--grey-700: #334155;
--grey-800: #1e293b;
--grey-900: #0f172a;
/* rest of the colors */
--black: #222;
--white: #fff;
--red-light: #f8d7da;
--red-dark: #842029;
--green-light: #d1e7dd;
--green-dark: #0f5132;
/* fonts */
--headingFont: 'Roboto', sans-serif;
--bodyFont: 'Nunito', sans-serif;
--smallText: 0.7em;
/* rest of the vars */
--backgroundColor: var(--grey-50);
--textColor: var(--grey-900);
--borderRadius: 0.25rem;
--letterSpacing: 1px;
--transition: 0.3s ease-in-out all;
--max-width: 1120px;
--fixed-width: 600px;
/* box shadow*/
--shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
--shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
0 4px 6px -2px rgba(0, 0, 0, 0.05);
--shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
body {
background: var(--backgroundColor);
font-family: var(--bodyFont);
font-weight: 400;
line-height: 1.75;
color: var(--textColor);
}
p {
margin-top: 0;
margin-bottom: 1.5rem;
max-width: 40em;
}
h1,
h2,
h3,
h4,
h5 {
margin: 0;
margin-bottom: 1.38rem;
font-family: var(--headingFont);
font-weight: 400;
line-height: 1.3;
text-transform: capitalize;
letter-spacing: var(--letterSpacing);
}
h1 {
margin-top: 0;
font-size: 3.052rem;
}
h2 {
font-size: 2.441rem;
}
h3 {
font-size: 1.953rem;
}
h4 {
font-size: 1.563rem;
}
h5 {
font-size: 1.25rem;
}
small,
.text-small {
font-size: var(--smallText);
}
a {
text-decoration: none;
}
ul {
list-style-type: none;
padding: 0;
}
.img {
width: 100%;
display: block;
object-fit: cover;
}
/* buttons */
.btn {
cursor: pointer;
color: var(--white);
background: var(--primary-500);
border: transparent;
border-radius: var(--borderRadius);
letter-spacing: var(--letterSpacing);
padding: 0.375rem 0.75rem;
box-shadow: var(--shadow-1);
transition: var(--transtion);
text-transform: capitalize;
display: inline-block;
}
.btn:hover {
background: var(--primary-700);
box-shadow: var(--shadow-3);
}
.btn-hipster {
color: var(--primary-500);
background: var(--primary-200);
}
.btn-hipster:hover {
color: var(--primary-200);
background: var(--primary-700);
}
.btn-block {
width: 100%;
}
/* alerts */
.alert {
padding: 0.375rem 0.75rem;
margin-bottom: 1rem;
border-color: transparent;
border-radius: var(--borderRadius);
}
.alert-danger {
color: var(--red-dark);
background: var(--red-light);
}
.alert-success {
color: var(--green-dark);
background: var(--green-light);
}
/* form */
.form {
width: 90vw;
max-width: var(--fixed-width);
background: var(--white);
border-radius: var(--borderRadius);
box-shadow: var(--shadow-2);
padding: 2rem 2.5rem;
margin: 3rem auto;
}
.form-label {
display: block;
font-size: var(--smallText);
margin-bottom: 0.5rem;
text-transform: capitalize;
letter-spacing: var(--letterSpacing);
}
.form-input,
.form-textarea {
width: 100%;
padding: 0.375rem 0.75rem;
border-radius: var(--borderRadius);
background: var(--backgroundColor);
border: 1px solid var(--grey-200);
}
.form-row {
margin-bottom: 1rem;
}
.form-textarea {
height: 7rem;
}
::placeholder {
font-family: inherit;
color: var(--grey-400);
}
.form-alert {
color: var(--red-dark);
letter-spacing: var(--letterSpacing);
text-transform: capitalize;
}
/* alert */
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
.loading {
width: 6rem;
height: 6rem;
border: 5px solid var(--grey-400);
border-radius: 50%;
border-top-color: var(--primary-500);
animation: spinner 0.6s linear infinite;
}
.loading {
margin: 0 auto;
}
/* title */
.title {
text-align: center;
}
.title-underline {
background: var(--primary-500);
width: 7rem;
height: 0.25rem;
margin: 0 auto;
margin-top: -1rem;
}
/*
===============
Navbar
===============
*/

View File

@ -0,0 +1,351 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type='checkbox'],
[type='radio'] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simply Recipes || Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>Home Page </h1>
</body>
</html>

View File

@ -0,0 +1,19 @@
const getElement = (selector) => {
const element = document.querySelector(selector)
if (element) return element
throw Error(
`Please double check your class names, there is no ${selector} class`
)
}
const links = getElement('.nav-links')
const navBtnDOM = getElement('.nav-btn')
navBtnDOM.addEventListener('click', () => {
links.classList.toggle('show-links')
})
const date = getElement('#date')
const currentYear = new Date().getFullYear()
date.textContent = currentYear

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Recipes || Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>Recipes Page</h1>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Single Recipe || Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>Single Recipe Page</h1>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Beef|| Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>Tag Template Page</h1>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tags || Starter</title>
<!-- favicon -->
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- normalize -->
<link rel="stylesheet" href="./css/normalize.css" />
<!-- font-awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
/>
<!-- main css -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<h1>Tags Page</h1>
</body>
</html>

View File

@ -0,0 +1,79 @@
package com.realnet.Connector.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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.Connector.Entity.Connector;
import com.realnet.Connector.Repository.Connectorrepository;
import com.realnet.users.entity.Sys_Accounts;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
@RestController
@RequestMapping("/connector")
public class ConnectorController {
@Autowired
private Connectorrepository connectorrepository;
@Autowired
private AppUserServiceImpl userService;
//ADD DATA
@PostMapping("/Connectorjson")
public ResponseEntity<?> save(@RequestBody Connector connector) {
AppUser loggedInUser = userService.getLoggedInUser();
Long account_id = loggedInUser.getAccount().getAccount_id();
connector.setAccountId(account_id);
Connector save = connectorrepository.save(connector);
return new ResponseEntity<>(save, HttpStatus.OK);
}
//UPDATE BY ID
@PutMapping("/Connectorjson/{id}")
public ResponseEntity<?> update(@PathVariable Long id, @RequestBody Connector connector) {
Connector con = connectorrepository.findById(id).orElseThrow(null);
con.setName(connector.getName());
con.setConnector_json(connector.getConnector_json());
Connector save = connectorrepository.save(con);
return new ResponseEntity<>(save, HttpStatus.OK);
}
//GET ALL
@GetMapping("/Connectorjson")
public ResponseEntity<?> getall() {
List<Connector> save = connectorrepository.findAll();
return new ResponseEntity<>(save, HttpStatus.OK);
}
//GET BY ID
@GetMapping("/Connectorjson/{id}")
public ResponseEntity<?> getbyid(@PathVariable Long id) {
Connector con = connectorrepository.findById(id).orElseThrow(null);
return new ResponseEntity<>(con, HttpStatus.OK);
}
//DELETE BY ID
@DeleteMapping("/Connectorjson/{id}")
public void delete(@PathVariable Long id){
Connector con = connectorrepository.findById(id).orElseThrow(null);
connectorrepository.delete(con);
}
}

View File

@ -0,0 +1,81 @@
package com.realnet.Connector.Controller;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.realnet.Connector.Entity.Connector;
import com.realnet.Connector.Entity.Mapping;
import com.realnet.Connector.Repository.Connectorrepository;
@RestController
@RequestMapping("/token/connector/mapping")
public class MappingController {
@Autowired
private Connectorrepository connectorrepository;
@PostMapping("/mapping")
public Object connector(@RequestBody Mapping mapping) {
List<Object> list = new ArrayList<>();
// Map<String> param = new HashMap<String>();
String str =mapping.getMappingString();
JsonParser parser = new JsonParser();
JsonElement element = parser.parse(str);
JsonObject obj = element.getAsJsonObject();
//get key from get api
Set<Map.Entry<String, JsonElement>> entries = obj.entrySet();
for (Map.Entry<String, JsonElement> entry : entries) {
String key = entry.getKey();
String string = key.toString();
list.add(string);
}
return list;
}
@PostMapping("/mapping1")
public Object connector1(@RequestBody Mapping mapping) {
List<Object> list = new ArrayList<>();
// Map<String> param = new HashMap<String>();
String str =mapping.getMappingString();
JsonParser parser = new JsonParser();
JsonElement element = parser.parse(str);
JsonObject obj = element.getAsJsonObject();
//get values from get api
Set<Map.Entry<String, JsonElement>> entries = obj.entrySet();
for (Map.Entry<String, JsonElement> entry : entries) {
String string2 = entry.getValue().getAsString();
list.add(string2);
}
return list;
}
//get api for call connector by name for job(by gk)
@GetMapping("/connectorname/{name}")
public ResponseEntity<?> getconnector(@PathVariable String name) {
Connector save = connectorrepository.findconnectorbyname(name);
return new ResponseEntity<>(save, HttpStatus.OK);
}
}

View File

@ -0,0 +1,33 @@
package com.realnet.Connector.Entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Column;
import com.realnet.Dashboard1.Entity.dashbord_Who_collumn;
import lombok.Data;
@Entity
@Data
public class Connector extends dashbord_Who_collumn {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
@Column(length = 15000)
private String get_str;
@Lob
private String connector_json;
}

View File

@ -0,0 +1,9 @@
package com.realnet.Connector.Entity;
import lombok.Data;
@Data
public class Mapping {
private String mappingString;
}

View File

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

View File

@ -0,0 +1,15 @@
package com.realnet.model;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
public class TestModel {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
private String name;
private String email;
private String mob_no;
}

View File

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

View File

@ -0,0 +1,18 @@
package com.realnet.Abc_1665647440047_back.Entity;
import lombok.*;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Entity
@Data
public class Abc{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private int name_id;
}

View File

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

View File

@ -0,0 +1,37 @@
package com.realnet.Abc_1665647440047_back.Services;
import com.realnet.Abc_1665647440047_back.Repository.AbcRepository;
import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class AbcService {
@Autowired
private AbcRepository Repository;
public Abc Savedata(Abc data) {
return Repository.save(data);
}
public List<Abc> getdetails() {
return (List<Abc>) Repository.findAll();
}
public Abc getdetailsbyId(Long id) {
return Repository.findById(id).get();
}
public void delete_by_id(Long id) {
Repository.deleteById(id);
}
public Abc update(Abc data,Long id) {
Abc old = Repository.findById(id).get();
old.setName(data.getName());
old.setName_id(data.getName_id());
final Abc test = Repository.save(old);
return test;}}

View File

@ -0,0 +1,15 @@
package com.realnet.model;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
public class TestModel {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
private String name;
private String email;
private String mob_no;
}

View File

@ -0,0 +1,537 @@
//package com.realnet.codeextractor.controller;
//
//import java.io.BufferedWriter;
//import java.io.File;
//import java.io.FileNotFoundException;
//import java.io.FileWriter;
//import java.io.IOException;
//import java.nio.charset.StandardCharsets;
//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.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.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
//import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params;
//import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service;
//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service;
//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service;
//import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service;
//import com.realnet.flf.service.FieldTypeService;
//import com.realnet.fnd.entity.Error;
//import com.realnet.fnd.entity.ErrorPojo;
//import com.realnet.fnd.entity.Success;
//import com.realnet.fnd.entity.SuccessPojo;
//import com.realnet.fnd.service.Rn_ModuleSetup_Service;
//import com.realnet.utils.Constant;
//
//import io.swagger.annotations.Api;
//
//@RestController
//@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
//@Api(tags = { "Build Master Builder" })
//public class BuildMasterBuilderController {
//
// @Value("${projectPath}")
// private String projectPath;
//
// @Value("${angularProjectPath}")
// private String angularProjectPath;
//
// @Autowired
// private Rn_ModuleSetup_Service rn_module_setup_service;
//
// @Autowired
// private Rn_Bcf_Extractor_Service rn_bcf_extractor_service;
//
// @Autowired
// private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service;
//
// @Autowired
// private Rn_Bcf_Rule_Library_Service rn_bcf_rule_library_service;
//
// @Autowired
// private Rn_Bcf_Exception_Rule_Library_Service rn_bcf_rule_exception_library_service;
//
// @Autowired
// private FieldTypeService fieldTypeService;
// //private static final Logger logger = Logger.getLogger(BuildMasterBuilderController.class);
//
// @GetMapping("/build_master_builder")
// public ResponseEntity<?> masterControllerBuilder(@RequestParam(value = "id") Integer id) throws IOException, FileNotFoundException {
// StringBuilder variablesDynamicCode = new StringBuilder();
// StringBuilder stringBuilderDynamicCode = new StringBuilder();
// StringBuilder moduleCode = new StringBuilder();
//
//
// // RN_BCF_CODE_EXTRACTOR_T ID
// //int eid = Integer.parseInt(id);
//
// Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(id);
// String technology_stack = extractor.getTech_stack();
// String object_type = extractor.getObject_type();
// String sub_object_type = extractor.getSub_object_type();
//
// // RN_BCF_CODE_EXTRACTOR_PARAMS_T VALUES
// //List<Rn_Bcf_Extractor_Params> params = rn_bcf_extractor_params_service.getByHeaderId(eid);
// List<Rn_Bcf_Extractor_Params> params = extractor.getRn_bcf_extractor_Params();
//
// // PARAMETERS TABLE VALUE
// int i = 0;
// int j=0;
// for (Rn_Bcf_Extractor_Params param : params)
// {
// boolean is_creation_enabled = param.isIs_creation_enabled();
// boolean is_extraction_enabled = param.isIs_extraction_enabled();
// String path = param.getMoved_address_string();
// File file = new File(path);
// String parentPath = file.getParent();
//
// String name = file.getName();
// String convertedFileName = "SE_" + name;
//
// // STATIC CODE DIRECTORY
// String staticFileParentDir = parentPath + File.separator + "static_code";
// File staticFile = new File(staticFileParentDir + File.separator + convertedFileName);
// String fileToString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8);
//
// // ex. controller_file (FROM PARAMS TABLE)
// String file_name_var = param.getFile_name_var();
//
// // ex. ui_name + "controller"
// String file_name_dynamic_string = param.getFile_name_dynamic_string();
//
// // ex. String controller_file = ui_name + "controller";
// variablesDynamicCode.append("String " + file_name_var + " = " + file_name_dynamic_string + ";\r\n");
//
// System.out.println("file name dynamic str "+file_name_dynamic_string);
// //change file name entity
//// String mainstr1=file_name_dynamic_string;
//// String saleesent1=mainstr1.replace(".java", " ");
//// System.out.println("updated filename"+saleesent1);
//// System.out.println(file_name_dynamic_string.contains(".java"));
//// System.out.println(file_name_dynamic_string.contains(".ts"));
//// System.out.println(file_name_dynamic_string.contains(".scss"));
//// System.out.println(file_name_dynamic_string.contains(".html"));
//
// if(file_name_dynamic_string.contains(".java")) {
// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+
// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".java\", \"\");\r\n"+
// "" + "\r\n"+"\n" );
// }else if(file_name_dynamic_string.contains(".ts")) {
// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+
// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".ts\", \"\");\r\n"+
// "" + "\r\n"+
// "String "+file_name_var+""+2+"=mainstr"+j+".replace(\".component.ts\", \"\");\r\n"+
// "" + "\r\n"+"\n"
// );
//
// }else if(file_name_dynamic_string.contains(".html")) {
// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+
// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".html\", \"\");\r\n"+
// "" + "\r\n"+"\n" );
// }else if(file_name_dynamic_string.contains(".scss")) {
// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+
// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".scss\", \"\");\r\n"+
// "" + "\r\n"+"\n" );
// }else {System.out.println("not found");}
//
//
//
// // ======= MODULE NAME SHOULD COME FROM THE SESSION ========
// //String moduleName = "\" + module_name + \"/\"";
// String moduleName = "\" + module_name + \"/";
//
// String modulePath = param.getTotal_project_path_dynamic_string();
// //System.out.println("MODULE PATH = " + modulePath);
// if(modulePath.endsWith(".java")) {
// String parent = modulePath.substring(0, modulePath.lastIndexOf("/")); // 1
// String lvl2Parent = parent.substring(0, parent.lastIndexOf("/")+1); // 2
// String tail0 = modulePath.substring(parent.lastIndexOf("/") +1); // 3
// tail0 = tail0.substring(0, tail0.lastIndexOf("/")+1); // remove the .java file name
// modulePath = lvl2Parent + moduleName + tail0;
// } else {
// // add module name in spring project
// modulePath = modulePath.substring(0, modulePath.lastIndexOf("/")+1);
// String data0 = modulePath.substring(0, modulePath.lastIndexOf("/") + 1);
// String tail0 = modulePath.substring(modulePath.lastIndexOf("/") + 1);
// data0 += moduleName + tail0;
// modulePath = data0;
// }
//// System.out.println("MANUPULATED module PATH = " + modulePath);
//
//// String ref_address_string = param.getReference_address_string();
//// ref_address_string = ref_address_string.substring(0, ref_address_string.lastIndexOf("/")+1);
//
// String total_address_path = param.getTotal_project_path_dynamic_string();
// total_address_path = total_address_path.substring(0, total_address_path.lastIndexOf("/")+1);
// System.out.println("total path : "+total_address_path +"\n");
// String module_dest_path = "";
// String finalDir = "";
//
//
//// module_dest_path = "angularProjectPath + \"" + modulePath;
//// // CREATE MODULE FOLDER STRUCTURE [DYNAMIC PATH]
//// moduleCode.append("File file" + (++i) + " = new File(" + module_dest_path +"\");\n"
//// + "if(!file" + (i) +".exists()) {\n"
//// + " file" + (i) + ".mkdirs();\n"
//// + "}\n");
//
// /*
// * MAKE {{test1}} dynamic
// * INPUT : /frontend/src/app/admin/test1/details/rn_header_test1-details.component.html
// * OUTPUT : /frontend/src/app/admin/{{test1}}/details/
// *
// * */
// // DYNAMIC FOLDER NAME LOGIC FOR ANGULAR
// // start
//// final String ng_prj_struct = "/frontend/src/app/admin/";
//// if (ref_address_string.contains(ng_prj_struct)) {
//// int len = ng_prj_struct.length();
//// String data = ref_address_string.substring(0,len) + "\" + ng_folder_name + \"";
//// int tail = ref_address_string.indexOf("/", len + 1);
//// String temp = ref_address_string.substring(tail);
//// data += temp;
//// ref_address_string = data;
//// }
////
// // end
// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + total_address_path;
// System.out.println("dest path : "+dest_path);
// // String finalDir = dirString + "/" + "\" + " + file_name_var;
// finalDir = dest_path + "\" + " + file_name_var;
// System.out.println(finalDir);
//
//
// //module_dest_path = "projectPath + \"" + "/Projects/\" + project_name + " + modulePath;
//// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + modulePath;
//
//
// // String finalDir = dirString + "/" + "\" + " + file_name_var;
// finalDir = dest_path + "\" + " + file_name_var;
// System.out.println("NIL FINAL DIR = " + finalDir+"\n");
//
// if(is_creation_enabled) {
// StringBuilder fileCode = new StringBuilder();
// // EMPTY FILE CODE WILL NOT GO IN THIS LOOP
// if(fileToString.isEmpty()) {
// fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n");
// } else {
// fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n");
// }
// stringBuilderDynamicCode.append(" StringBuilder " + file_name_var + "Code = new StringBuilder();\r\n"
// //+ " " + file_name_var + "Code.append(" + fileToString + ");\r\n"
// + fileCode
// + "\r\n"
// + " File " + file_name_var + "File = new File(" + finalDir + ");\r\n"
// + " System.out.println(\"Directory name = \" + " + file_name_var + "File);\r\n"
// //== CREATE PARENT DIR IF NOT EXIST===
// + " File " + file_name_var + "FileParentDir = new File(" + file_name_var + "File.getParent());\r\n"
// + " if(!" + file_name_var +"FileParentDir.exists()) {\r\n"
// + " " + file_name_var + "FileParentDir.mkdirs();\r\n"
// + " }\r\n"
// //==
// + " if (!" + file_name_var + "File.exists()) {\r\n"
// + " " + file_name_var + "File.createNewFile();\r\n"
// + " }\r\n"
// + " fw = new FileWriter(" + file_name_var + "File.getAbsoluteFile());\r\n"
// + " bw = new BufferedWriter(fw);\r\n"
// + " bw.write(" + file_name_var + "Code.toString());\r\n"
// + " bw.close();\r\n"
// + "\r\n");
//
// }
// j++;
// }
//
//
//
// // CHILD MASTER BUILDER NAME DEPENDS ON (TECH_STACK, OBJ_TYPE, SUB_OBJ_TYPE)
// String childMasterBuilderName = technology_stack + "_" + object_type + "_" + sub_object_type + "_Builder";
// childMasterBuilderName = childMasterBuilderName.replace(" ", "_");
// childMasterBuilderName = childMasterBuilderName.replaceAll("[-]+", "_");
//
// StringBuilder childMasterBuilderCode = new StringBuilder();
// childMasterBuilderCode.append(
// "package com.realnet.builders;\r\n"
// + "\r\n"
// + "import java.io.BufferedReader;\r\n"
// + "import java.io.BufferedWriter;\r\n"
// + "import java.io.File;\r\n"
// + "import java.io.FileNotFoundException;\r\n"
// + "import java.io.FileReader;\r\n"
// + "import java.io.FileWriter;\r\n"
// + "import java.io.IOException;\r\n"
// + "import java.util.List;\r\n"
// + "import java.util.stream.Collectors;\r\n"
// + "\r\n"
// + "import org.modelmapper.ModelMapper;\r\n"
// + "import org.springframework.beans.factory.annotation.Autowired;\r\n"
// + "import org.springframework.beans.factory.annotation.Value;\r\n"
// + "import org.springframework.http.HttpStatus;\r\n"
// + "import org.springframework.http.MediaType;\r\n"
// + "import org.springframework.http.ResponseEntity;\r\n"
// + "import org.springframework.web.bind.annotation.GetMapping;\r\n"
// + "import org.springframework.web.bind.annotation.RequestMapping;\r\n"
// + "import org.springframework.web.bind.annotation.RequestParam;\r\n"
// + "import org.springframework.web.bind.annotation.RestController;\r\n"
// + "\r\n"
// + "import com.realnet.actionbuilder.entity.Rn_cff_ActionBuilder_Header;\r\n"
// + "import com.realnet.actionbuilder.entity.Rn_cff_ActionBuilder_Header;\r\n"
// + "import com.realnet.actionbuilder.service.Rn_Cff_ActionBuilder_Service;\r\n"
// + "import com.realnet.flf.service.FieldTypeService;\r\n"
// + "import com.realnet.fnd.entity.Error;\r\n"
// + "import com.realnet.fnd.entity.ErrorPojo;\r\n"
// + "import com.realnet.fnd.entity.Rn_Lookup_Values;\r\n"
// + "import com.realnet.fnd.entity.Rn_Module_Setup;\r\n"
// + "import com.realnet.fnd.entity.Rn_Project_Setup;\r\n"
// + "import com.realnet.fnd.entity.Success;\r\n"
// + "import com.realnet.fnd.entity.SuccessPojo;\r\n"
// + "import com.realnet.fnd.service.Rn_LookUp_Service;\r\n"
// + "import com.realnet.utils.Constant;\r\n"
// + "import com.realnet.utils.RealNetUtils;\r\n"
// + "import com.realnet.wfb.entity.Rn_Fb_Header;\r\n"
// + "import com.realnet.wfb.entity.Rn_Fb_Line;\r\n"
// + "import com.realnet.wfb.entity.Rn_Fb_Line_DTO;\r\n"
// + "import com.realnet.wfb.service.Rn_WireFrame_Service;\r\n"
// + "\r\n"
// + "import io.swagger.annotations.Api;\r\n"
// + "\r\n"
// + "@RestController\r\n"
// // CONTROLLER NAME SHOULD CHANGE
// // DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE
// + "@RequestMapping(value = \"/api\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n"
// + "@Api(tags = { \"Master Builder\" })\r\n"
// + "public class " + childMasterBuilderName + " {\r\n" + "\r\n" + "\r\n"
// + " @Value(\"${angularProjectPath}\")\r\n"
// + " private String angularProjectPath;"
// + " @Value(\"${projectPath}\")\r\n"
// + " private String projectPath;"
//
// // DEPENDENCIES FOR WIREFRAME
// + " @Autowired\r\n"
// + " private Rn_WireFrame_Service wireFrameService;\r\n" +
// "\r\n" +
// " @Autowired\r\n"
// + " private Rn_LookUp_Service lookUpService;\r\n"
// + "\r\n"
// + " @Autowired\r\n"
// + " private Rn_Cff_ActionBuilder_Service actionBuilderService;\r\n"
// + "\r\n"
// + " @Autowired\r\n"
// + " private ModelMapper modelMapper;\r\n"
// + "\r\n"
// + " @Autowired\r\n"
// + " private FieldTypeService fieldTypeService;\r\n"
//
// + " @GetMapping(value = \"/" + childMasterBuilderName + "\")\r\n"
// + " public ResponseEntity<?> build_wireframe(@RequestParam(\"header_id\") Integer id) throws IOException {\r\n" + "\r\n"
// + " System.out.println(\"id ::\"+id);"
// + "\n lookUpService.createTable(id);"
// + " \n // extra button \n List<Rn_Fb_Line> extraButton = wireFrameService.getExtraButton(id);"
// + " \n // HEADER VALUE\r\n"
// + " Rn_Fb_Header rn_fb_header = wireFrameService.getById(id);\r\n"
// + " \r\n"
// + " // LINE VALUES\r\n"
// + " List<Rn_Fb_Line> rn_fb_lines = rn_fb_header.getRn_fb_lines();\r\n"
// + " \r\n"
// + " // MODULE DETAILS\r\n"
// + " Rn_Module_Setup module = rn_fb_header.getModule();\r\n"
// + " \r\n"
// + " // PROJECT DETAILS\r\n"
// + " Rn_Project_Setup project = module.getProject();\r\n"
// + " \r\n"
// // ATTRIBUTE FLEX
// + " // ATTRIBUTE FLEX VALUES\r\n"
// + " List<Rn_Lookup_Values> attribute_flex_values = lookUpService.getExtensions();\r\n"
// + " String project_name = project.getProjectName();\r\n"
// + " String module_name = module.getModuleName();"
//
// // header table values
// + " /*\r\n"
// + " * Header Table Values\r\n"
// + " * @GET UI_NAME\r\n"
// + " * @SET controller, model, repository, service name.\r\n"
// + " */\r\n"
// + " String technology_stack = rn_fb_header.getTechStack();\r\n"
// + " String ui_name = RealNetUtils.toFirstUpperCase(rn_fb_header.getUiName());\r\n"
// + " String form_code = rn_fb_header.getFormCode(); // value will come from db\r\n"
//
// + " String controller_name = ui_name.concat(\"_Controller\");\r\n"
// + " String dao_name = ui_name.concat(\"_Dao\");\r\n"
// + " String dao_name_lower = dao_name.toLowerCase();"
// + " String dao_impl_name = ui_name.concat(\"_DaoImpl\");\r\n"
// + " String repository_name = ui_name.concat(\"_Repository\");\r\n"
// + " String service_name = ui_name.concat(\"_Service\");\r\n"
// + " String service_impl_name = ui_name.concat(\"_ServiceImpl\");\r\n" + "\r\n"
// + " String table_name = ui_name.concat(\"_t\"); // For @Column(table=\"table_name\") && Model class name\r\n"
// + "\r\n"
// //+ " String line_table_name = ui_name.concat(\"_line_t\");\r\n" + "\r\n"
// + " /*----First Upper names (back-end)----------*/\r\n"
// + " String controller_name_first_upper = RealNetUtils.toFirstUpperCase(controller_name);\r\n"
// + " String repository_name_first_upper = RealNetUtils.toFirstUpperCase(repository_name);\r\n"
// + " String dao_name_first_upper = RealNetUtils.toFirstUpperCase(dao_name);\r\n"
// + " String dao_impl_name_first_upper = RealNetUtils.toFirstUpperCase(dao_impl_name);\r\n"
// + " String service_name_first_upper = RealNetUtils.toFirstUpperCase(service_name);\r\n"
// + " String service_impl_name_first_upper = RealNetUtils.toFirstUpperCase(service_impl_name);\r\n"
// + " String table_name_first_upper = RealNetUtils.toFirstUpperCase(table_name);\r\n"
// + " String table_name_upper = table_name.toUpperCase(); // For Model class\r\n" + "\r\n"
// //+ " String line_table_name_first_upper = RealNetUtils.toFirstUpperCase(line_table_name);\r\n"
// + " /*-------------lower names (back-end)----------*/\r\n"
// + " String table_name_lower = table_name.toLowerCase();\r\n"
// + " String repository_name_lower = repository_name.toLowerCase();\r\n"
// + " String service_name_lower = service_name.toLowerCase();\r\n"
// + "\r\n"
//
// //DTO APPROACH FOR CALLING A SERVICE
// + " List<Rn_Fb_Line_DTO> lineListDto = rn_fb_lines.stream().map(line -> modelMapper.map(line, Rn_Fb_Line_DTO.class))\r\n"
// + " .collect(Collectors.toList());\r\n"
// + " \r\n"
// + " // set table name in the dto class\r\n"
// + " for(Rn_Fb_Line_DTO dto : lineListDto) {\r\n"
// + " dto.setTable_name(table_name_lower);\r\n"
// + " }\r\n"
//
// // ======= NEED TO IMPLEMENT LOGIC FOR DIFFERENT TECHNOLOGY TYPE ====
// ); //
//
//
// // =========== FRONT-END OBJECT NAMES ==============
// childMasterBuilderCode.append("// ===========FRONT END FILE NAMES DEPENDS ON UI NAME===============\r\n"
// + " String ng_ui_name = RealNetUtils.toFirstUpperCase(ui_name);\r\n"
// + " String ng_model_ts_name = ng_ui_name.concat(\"_t\");\r\n"
// + " String ng_component_ts_name = ng_ui_name.concat(\"Component\");\r\n"
// + " String ng_module_ts_name = ng_ui_name.concat(\"Module\");\r\n"
// + " String ng_service_ts_name = ng_ui_name.concat(\"Service\");\r\n"
// + " String ng_routing_module_ts_name = ng_ui_name.concat(\"RoutingModule\");\r\n" + "\r\n"
// + " String ng_service_ts_name_lower = ui_name.toLowerCase().concat(\"Service\");\r\n"
// + " String ng_model_ts_name_lower = ng_model_ts_name.toLowerCase();\r\n"
// + " // Routing Path names\r\n"
// + " String ng_path_name = ui_name.toLowerCase();\r\n"
// + " // CRUD Components name\r\n"
// + " String ng_all_grid_view_component_name = \"All\" + ng_ui_name.concat(\"Component\");\r\n"
// + " String ng_add_form_component_name = \"Add\" + ng_ui_name.concat(\"Component\");\r\n"
// + " String ng_edit_component_name = \"Edit\" + ng_ui_name.concat(\"Component\");\r\n"
// + " String ng_read_only_component_name = ng_ui_name + \"DetailsComponent\";\r\n"
// + " // Extension Components name\r\n"
// + " String ng_extension_add_component_name = \"AddExt\" + ng_ui_name.concat(\"Component\");\r\n"
// + " // File Folder name\r\n"
// + " String ng_folder_name = ui_name.toLowerCase();\r\n"
// + " String ng_file_name = ui_name.toLowerCase();\r\n"
// + "\r\n");
//
// String action_builder_code = fieldTypeService.angular_action_builder_code();
//
// // DYNAMIC VARIABLE FOR FILE-NAME DEPENDS ON UI NAME
// childMasterBuilderCode.append(
// variablesDynamicCode // this is the file name with extension(from params table)
// + "\r\n"
// // MASTER CONTROLLER CODE START
// + " FileWriter fw = null;\r\n"
// + " BufferedWriter bw = null;\r\n"
// + " try { \r\n"
// // ACTION BUILDER CODE
// + action_builder_code
// + // =========== VARIABLE CODE WILL BE APPEND HERE ===============//
// stringBuilderDynamicCode
// + "\r\n");
//
// // UPDATE MENU
// // String angular_update_sidenav = "";
// childMasterBuilderCode.append(moduleCode +"\r\n" +
// // 22:30 UPDATE SIDE BAR START
// "/*-----------------------UPDATE ADMIN ROUTING TS FILE --------------------*/\r\n"
// + " // String frontEndDir = angularProjectPath.concat(\"/frontend/\");\n"
// + " File adminRoutingModule = new File(projectPath+\"/Projects/\"+project_name+ \"/webui/src/app/app-routing.module.ts\");\r\n"
// + " File tempRoutingModule = new File(projectPath+\"/Projects/\"+project_name+\"/webui/src/app/temp-routing.module.ts\");\r\n"
// + "\r\n" +
// " BufferedReader reader = new BufferedReader(new FileReader(adminRoutingModule));\r\n" +
// " BufferedWriter writer = new BufferedWriter(new FileWriter(tempRoutingModule));\r\n" +
// " String removeStr = \"]}];@NgModule({imports: [RouterModule.forChild(routes)],exports: [RouterModule]})export class AdminRoutingModule{}\";\r\n" +
// " String currentLine;\r\n" +
// " System.out.println(adminRoutingModule.getName());\r\n" +
// " while ((currentLine = reader.readLine()) != null) {\r\n" +
// " String trimmedLine = currentLine.trim();\r\n" +
// " if (trimmedLine.equals(removeStr)) {\r\n" +
// " currentLine = \"\";\r\n" +
// " }\r\n" +
// " writer.write(currentLine + System.getProperty(\"line.separator\"));\r\n" +
// "\r\n" +
// " }\r\n" +
// " writer.close();\r\n" +
// " reader.close();\r\n" +
// " boolean delete = adminRoutingModule.delete();\r\n" +
// " boolean b22 = tempRoutingModule.renameTo(adminRoutingModule);\r\n" +
// "\r\n" +
// " StringBuilder admin_routing_module_string = new StringBuilder();\r\n" +
// " admin_routing_module_string.append(\" \");\r\n" +
// " String adminRoutingModuleName = projectPath+\"/Projects/\"+project_name+ \"/webui/src/app/app-routing.module.ts\";\r\n" +
// "\r\n" +
// " fw = new FileWriter(adminRoutingModuleName, true);\r\n" +
// " fw.write(admin_routing_module_string.toString());\r\n" +
// " fw.close();\r\n" +
// "\r\n"
//
// );
//
// // MODULE CREATE CODE
// childMasterBuilderCode.append(" } catch (FileNotFoundException e) {\r\n"
// + " e.printStackTrace();\r\n"
// + " ErrorPojo errorPojo = new ErrorPojo();\r\n"
// + " Error error = new Error();\r\n"
// + " error.setTitle(Constant.FORM_BUILDER_API_TITLE);\r\n"
// + " error.setMessage(Constant.FORM_BUILD_FAILURE);\r\n"
// + " errorPojo.setError(error);\r\n"
// + " return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);\r\n"
// + " }\r\n"
// + " SuccessPojo successPojo = new SuccessPojo();\r\n"
// + " Success success = new Success();\r\n"
// + " success.setTitle(Constant.FORM_BUILDER_API_TITLE);\r\n"
// + " success.setMessage(Constant.FORM_BUILD_SUCCESS);\r\n"
// + " successPojo.setSuccess(success);\r\n"
// + " return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);\r\n"
// + "\r\n"
// +"\n}"
// +"}");
//
// // System.out.println(masterBuilderCode.toString());
//
// FileWriter fw = null;
// BufferedWriter bw = null;
// try {
// // FILE NAME SHOULD CHANGE DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE
// File masterBuilderFile = new File(
// projectPath + "/src/main/java/com/realnet/builders/" + childMasterBuilderName + ".java");
// if (!masterBuilderFile.exists()) {
// masterBuilderFile.createNewFile();
// }
// fw = new FileWriter(masterBuilderFile.getAbsoluteFile());
// bw = new BufferedWriter(fw);
// bw.write(childMasterBuilderCode.toString());
// bw.close();
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// ErrorPojo errorPojo = new ErrorPojo();
// Error error = new Error();
// error.setTitle(Constant.MASTER_BUILDER_API_TITLE);
// error.setMessage(Constant.MASTER_BUILDER_FAILURE);
// errorPojo.setError(error);
// return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
// }
//
// SuccessPojo successPojo = new SuccessPojo();
// Success success = new Success();
// success.setTitle(Constant.MASTER_BUILDER_API_TITLE);
// success.setMessage(Constant.MASTER_BUILDER_SUCCESS);
// successPojo.setSuccess(success);
// return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
// }
//}

View File

@ -0,0 +1,778 @@
package com.realnet.codeextractor.controller;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.validation.Valid;
import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
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.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.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.realnet.codeextractor.entity.FileDetails;
import com.realnet.codeextractor.entity.FileListDto;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params;
import com.realnet.codeextractor.response.CodeExtractorParamsResponse;
import com.realnet.codeextractor.response.CodeExtractorResponse;
import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service;
import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service;
import com.realnet.fnd.entity.Error;
import com.realnet.fnd.entity.ErrorPojo;
import com.realnet.fnd.entity.Success;
import com.realnet.fnd.entity.SuccessPojo;
import com.realnet.fnd.service.FileStorageService;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.utils.Constant;
import com.realnet.utils.RealNetUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.lingala.zip4j.ZipFile;
import net.lingala.zip4j.exception.ZipException;
@Slf4j
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
@RestController
@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = { "Code Extractor" })
public class CodeExtractorController {
@Autowired
private AppUserServiceImpl userService;
@Autowired
private FileStorageService fileStorageService;
@Autowired
private Rn_Bcf_Extractor_Service extractorService;
@Autowired
private Rn_Bcf_Extractor_Params_Service extractorParamsService;
@Value("${projectPath}")
private String projectPath;
// GET ALL SORTED AND PAGINATED DATA
@ApiOperation(value = "List of of Bcf Extractor", response = Rn_Bcf_Extractor.class)
@GetMapping("/bcf-extractor")
public CodeExtractorResponse getExtractors(
@RequestParam(value = "page", defaultValue = "0", required = false) Integer page,
@RequestParam(value = "size", defaultValue = "20", required = false) Integer size) {
// sorted data
Pageable paging = PageRequest.of(page, size, Sort.by("createdAt").descending());
Page<Rn_Bcf_Extractor> result = extractorService.getAll(paging);
CodeExtractorResponse resp = new CodeExtractorResponse();
resp.setPageStats(result, true);
resp.setItems(result.getContent());
// //Map<String, List<Rn_Bcf_Extractor>> extractorMap = Collections.singletonMap("extractior", result.getContent());
// return new ResponseEntity<Map<String, List<Rn_Bcf_Extractor>>>(extractorMap, HttpStatus.OK);
return resp;
}
// // GET ALL
// @ApiOperation(value = "List of Bcf Extractor")
// @GetMapping("/bcf-extractor")
// public ResponseEntity<?> getExtractors() {
// List<Rn_Bcf_Extractor> result = extractorService.getAll();
// Map<String, List<Rn_Bcf_Extractor>> extractorMap = Collections.singletonMap("extractior", result);
// System.out.println(extractorMap);
// return ResponseEntity.ok().body(result);
// }
// GET BY ID
@ApiOperation(value = "Get an Bcf Extractor", response = Rn_Bcf_Extractor.class)
@GetMapping("/bcf-extractor/{id}")
public ResponseEntity<?> getExtractorById(@PathVariable(value = "id") int id) {
Rn_Bcf_Extractor bcf_extractor = extractorService.getById(id);
// Map<String, Rn_Bcf_Extractor> extractorMap =
// Collections.singletonMap("extractior", bcf_extractor);
// return new ResponseEntity<Map<String, Rn_Bcf_Extractor>>(extractorMap,
// HttpStatus.OK);
// return ResponseEntity.ok().body(bcf_extractor);
return new ResponseEntity<Rn_Bcf_Extractor>(bcf_extractor, HttpStatus.OK);
}
// ========= SAVE AND UNZIP FILE AND MOVE TO A SPECIFIC PATH ========
@ApiOperation(value = "Add new Bcf Extractor")
@PostMapping(value = "/bcf-extractor")
public ResponseEntity<?> saveExtractor(// @Valid @RequestBody Rn_Bcf_Extractor bcf_extractor,
@RequestParam(value = "bcf_extractor", required = true) String extractorReq,
@RequestParam(value = "file", required = true) MultipartFile file)
throws IOException, JsonParseException, JsonMappingException {
System.out.println("extractorReq = " + extractorReq);
System.out.println("file = " + file.getOriginalFilename());
log.debug("extractorReq => {} ", extractorReq);
log.debug("file => {} ", file.getOriginalFilename());
ObjectMapper mapper = new ObjectMapper();
Rn_Bcf_Extractor bcf_extractor = mapper.readValue(extractorReq, Rn_Bcf_Extractor.class);
log.debug("bcf_extractor => {}", bcf_extractor);
AppUser loggedInUser = userService.getLoggedInUser();
bcf_extractor.setAccountId(loggedInUser.getAccount().getAccount_id());
bcf_extractor.setCreatedBy(loggedInUser.getUserId());
String techStackKey = RealNetUtils.getTechnologyStackKey(bcf_extractor.getTech_stack());
System.out.println("TECHNOLOGY STACK KEY = " + techStackKey);
bcf_extractor.setTech_stack_key(techStackKey);
// upload to directory
String uploadPath = projectPath.concat("/src/main/resources/zip-uploads/");
fileStorageService.uploadFile(file, uploadPath);
String fileName = file.getOriginalFilename();
System.out.println(
"UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileName + "\nFile Size = " + file.getSize());
// SAVE ZIP FILE NAME INTO DATABASE
bcf_extractor.setSample_file_name(fileName);
extractorService.save(bcf_extractor);
// ZIP TO UNZIP
String zipFilePath = uploadPath + fileName;
String fileNameWithOutExt = FilenameUtils.removeExtension(fileName);
Date d = new Date();
String destFolderName = fileNameWithOutExt + "_" + d.getTime();
String destPath = projectPath.concat("/src/main/resources/extracted-files/" + destFolderName);
System.out.println("ZIP FILE PATH = " + zipFilePath + "\nDESTINATION PATH = " + destPath);
try {
ZipFile zipFile = new ZipFile(zipFilePath);
/*
* // Get the list of file headers from the zip file List fileHeaderList =
* zipFile.getFileHeaders(); // Loop through the file headers for (int i = 0; i<
* fileHeaderList.size(); i++) { FileHeader fileHeader = (FileHeader)
* fileHeaderList.get(i); String name = fileHeader.getFileName();
* if(name.contains(".html") || name.contains(".css") || name.contains(".java")
* || name.contains(".jsp") || name.contains(".ts") ) {
* zipFile.extractFile(fileHeader, destPath); } }
*/
zipFile.extractAll(destPath);
} catch (ZipException e) {
e.printStackTrace();
}
int headerId = bcf_extractor.getId();
System.out.println("Code Extractor Parameter Header Id = " + headerId);
String tech_stack = bcf_extractor.getTech_stack();
String obj_type = bcf_extractor.getObject_type();
String sub_obj_type = bcf_extractor.getSub_object_type();
// MOVE FILES TO PARENT DIRECTORY & DELETE EMPTY FILES & SAVE PATHS INTO PARAMS
// TABLE
extractorService.saveListOFiles(headerId, tech_stack, obj_type, sub_obj_type, destPath);
// SAVE MOVED PATHS INTO DB
extractorService.moveFiles(headerId, destPath);
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
log.debug("Response {} ", successPojo);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
// Map<String, Boolean> response = new HashMap<>();
// response.put("SUCCESS", Boolean.TRUE);
// return ResponseEntity.status(HttpStatus.CREATED).body(response);
}
// UPDATE bcf extractor
@ApiOperation(value = "Update an Extension", response = Rn_Bcf_Extractor.class)
@PutMapping("/bcf-extractor/{id}")
public ResponseEntity<?> updateExtractor(
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
@PathVariable(value = "id") int id, @Valid @RequestBody Rn_Bcf_Extractor bcf_extractor) {
AppUser loggedInUser = userService.getLoggedInUser();
bcf_extractor.setUpdatedBy(loggedInUser.getUserId());
Rn_Bcf_Extractor updatedExtractor = extractorService.updateById(id, bcf_extractor);
if (bcf_extractor.getId() != updatedExtractor.getId()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.EXTRACTOR_NOT_DELETED);
errorPojo.setError(error);
// return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field);
}
// DELETE bcf extractor
@DeleteMapping("/bcf-extractor/{id}")
public ResponseEntity<?> deleteExtractor(@PathVariable(value = "id") int id) {
boolean deleted = extractorService.deleteById(id);
// Map<String, Boolean> response = new HashMap<>();
if (deleted) {
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_DELETED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
// response.put("deleted", Boolean.TRUE);
// return ResponseEntity.status(HttpStatus.OK).body(response);
}
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.EXTRACTOR_NOT_DELETED);
errorPojo.setError(error);
// return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
// =============== BCF CODE EXTRACTOR PARAMS ================
// GET ALL SORTED AND PAGINATED DATA BY HEADER ID
@ApiOperation(value = "List of of Bcf Extractor Parameters", response = Rn_Bcf_Extractor.class)
@GetMapping("/bcf-extractor-params")
public CodeExtractorParamsResponse codeExtractorParameters(
@RequestParam(value = "header_id", required = true) Integer headerId, // use param id to get data
@RequestParam(value = "page", defaultValue = "0", required = false) Integer page,
@RequestParam(value = "size", defaultValue = "20", required = false) Integer size) {
// sorted data
// Pageable paging = PageRequest.of(page, size,
// Sort.by("createdAt").descending());
List<Rn_Bcf_Extractor_Params> result = extractorParamsService.getByHeaderIdOrderByDate(headerId);
// log.debug("extractor params sorted data : {}", result.toString());
CodeExtractorParamsResponse resp = new CodeExtractorParamsResponse();
// resp.setPageStats(result, true);
resp.setItems(result);
return resp;
// Map<String, List<Rn_Bcf_Extractor_Params>> extractorMap = Collections.singletonMap("extractorParams", result);
// return new ResponseEntity<Map<String, Page<Rn_Bcf_Extractor_Params>>>(extractorMap, HttpStatus.OK);
}
// GET BY ID
@ApiOperation(value = "Get an Bcf Extractor Parameter", response = Rn_Bcf_Extractor_Params.class)
@GetMapping("/bcf-extractor-params/{id}")
public ResponseEntity<?> codeExtractorParamsById(@PathVariable(value = "id") int id) {
Rn_Bcf_Extractor_Params bcf_extractor_params = extractorParamsService.getById(id);
// Map<String, Rn_Bcf_Extractor_Params> extractorMap =
// Collections.singletonMap("extractorParams",bcf_extractor_params);
// return new ResponseEntity<Map<String, Rn_Bcf_Extractor_Params>>(extractorMap,
// HttpStatus.OK);
return new ResponseEntity<Rn_Bcf_Extractor_Params>(bcf_extractor_params, HttpStatus.OK);
}
@ApiOperation(value = "Add new Extractor Parameter", response = Rn_Bcf_Extractor_Params.class)
@PostMapping(value = "/bcf-extractor-params") // use param id to update data
public ResponseEntity<?> addNewExtractorParam(@RequestParam(value = "header_id", required = true) Integer headerId,
@Valid @RequestBody Rn_Bcf_Extractor_Params bcf_extractor_param) {
Rn_Bcf_Extractor extractor = extractorService.getById(headerId);
bcf_extractor_param.setRn_bcf_extractor(extractor); // set header id
Rn_Bcf_Extractor_Params savedParam = extractorParamsService.save(bcf_extractor_param);
if (savedParam == null) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.EXTRACTOR_NOT_CREATED);
errorPojo.setError(error);
// return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// UPDATE bcf extractor param
@ApiOperation(value = "Update an Extension Parameter", response = Rn_Bcf_Extractor_Params.class)
@PutMapping("/bcf-extractor-params/{id}")
public ResponseEntity<?> updatecodeExtractorParam(
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
@RequestParam(value = "header_id", required = false) Integer headerId, @PathVariable(value = "id") int id,
@Valid @RequestBody Rn_Bcf_Extractor_Params bcf_extractor_param) {
AppUser loggedInUser = userService.getLoggedInUser();
bcf_extractor_param.setUpdatedBy(loggedInUser.getUserId());
Rn_Bcf_Extractor_Params updatedExtractorParam = extractorParamsService.updateById(id, bcf_extractor_param);
if (bcf_extractor_param.getId() != updatedExtractorParam.getId()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.EXTRACTOR_NOT_UPDATED);
errorPojo.setError(error);
// return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// ========= TOGGLE BUTTON SERVICE FOR EXTRACTION AND CREATION ENABLE DISABLE
// BUTTON //
// EXTRACTION STATUS CHANGE
@GetMapping(value = "/bcf-extractor-params/extraction-status-change")
public ResponseEntity<?> extractionStatusChange(@RequestParam(value = "id") int id) throws IOException {
AppUser loggedInUser = userService.getLoggedInUser();
Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id);
log.debug("Extractor Param : {} ", param);
param.setIs_extraction_enabled(!param.isIs_extraction_enabled());
param.setUpdatedBy(loggedInUser.getUserId());
Rn_Bcf_Extractor_Params updatedParam = extractorParamsService.save(param);
log.debug("UPDATED Extractor Param : {} ", updatedParam);
if (param.getId() != updatedParam.getId()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.EXTRACTOR_NOT_UPDATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// CREATION STATUS CHANGE
@GetMapping(value = "/bcf-extractor-params/creation-status-change")
public ResponseEntity<?> creationStatusChange(@RequestParam(value = "id") int id) throws IOException {
AppUser loggedInUser = userService.getLoggedInUser();
Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id);
log.debug("Extractor Param : {} ", param);
param.setIs_creation_enabled(!param.isIs_creation_enabled());
param.setUpdatedBy(loggedInUser.getUserId());
Rn_Bcf_Extractor_Params updatedParam = extractorParamsService.save(param);
log.debug("UPDATED Extractor Param : {} ", updatedParam);
if (param.getId() != updatedParam.getId()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.EXTRACTOR_NOT_UPDATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// ========== FILE CODE EDITOR PART ============//
/*
* File list(from code extractor params table) for dropDown in file editor
*/
@ApiOperation(value = "Get Extracted File List", response = FileDetails.class)
@GetMapping("/bcf-extractor-file-list/{id}")
public ResponseEntity<?> getFileListBy(@PathVariable(value = "id") int headerId) {
List<Rn_Bcf_Extractor_Params> params = extractorParamsService.getByHeaderId(headerId);
ArrayList<FileListDto> response = new ArrayList<>();
for (Rn_Bcf_Extractor_Params param : params) {
int id = param.getId();
String fileName = param.getName_string();
FileListDto fileList = new FileListDto();
fileList.setId(id);
fileList.setFileName(fileName);
response.add(fileList);
}
if (response.isEmpty()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.FILE_LIST_API_TITLE);
error.setMessage(Constant.FILE_LIST_IS_EMPTY);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
} else {
return new ResponseEntity<List<FileListDto>>(response, HttpStatus.OK);
}
}
// =====read files and get file contents =========//
@ApiOperation(value = "Get an Bcf Extractor Parameter", response = FileDetails.class)
@GetMapping("/file-code-read/{id}")
public ResponseEntity<?> readFilesById(@PathVariable(value = "id") int id) {
Rn_Bcf_Extractor_Params params = extractorParamsService.getById(id);
String address_string = params.getAddress_string(); // uploaded path
String moved_address_string = params.getMoved_address_string(); // in a same folder
// String reference_address_string = params.getReference_address_string();
String filePath = moved_address_string.replace(projectPath, "");
filePath = projectPath.concat(filePath);
StringBuilder code = new StringBuilder();
File file = null;
try {
file = new File(filePath);
String fileName = file.getName();
// String fileType = FilenameUtils.getExtension(fileName);
log.info("File Name : {}", fileName);
// log.info("File Type : {} ", fileType);
// BufferedReader br = new BufferedReader(new FileReader(file));
// String fileString = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
String line;
while ((line = br.readLine()) != null) {
code.append(line + "\n");
}
fr.close();
br.close();
} catch (IOException e) {
log.debug("IO Exception Handled...");
log.error(e.getMessage());
e.getMessage();
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.FILE_OPERATION_API_TITLE);
error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
FileDetails fileDetails = new FileDetails();
fileDetails.setId(id);
fileDetails.setText(code.toString());
return new ResponseEntity<FileDetails>(fileDetails, HttpStatus.OK);
}
// ============= code editor (save data into file) =========
@ApiOperation(value = "Save File Data")
@PostMapping(value = "/file-code-save")
public ResponseEntity<?> codeSaveInFile(@Valid @RequestBody FileDetails fileDetails) {
int paramsId = fileDetails.getId();
String code = fileDetails.getText();
log.debug("updated code : {}", code);
Rn_Bcf_Extractor_Params params = extractorParamsService.getById(paramsId);
// String address_string = params.getAddress_string();
String moved_address_string = params.getMoved_address_string();
// String reference_address_string = params.getReference_address_string();
// projectPath
// String filePath = projectPath.concat(reference_address_string);
String filePath = moved_address_string.replace(projectPath, "");
filePath = projectPath.concat(filePath);
File file = null;
try {
file = new File(filePath);
String fileName = file.getName();
String fileType = FilenameUtils.getExtension(fileName);
log.info("File Name : {}", fileName);
log.info("File Type : {} ", fileType);
// if(fileType.equalsIgnoreCase("java") || fileType.equalsIgnoreCase("ts")|| fileType.equalsIgnoreCase("txt")) {
// code = Jsoup.parse(code).text();
// }
BufferedWriter bw = new BufferedWriter(new FileWriter(file, false)); // OVER WRITE FILE
bw.write(code);
bw.close();
} catch (FileNotFoundException e) {
log.debug("File Not Found Exception Handled...");
log.error(e.getMessage());
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.FILE_OPERATION_API_TITLE);
error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
} catch (IOException e) {
log.error(e.getMessage());
log.debug("IOException Handled...");
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.FILE_OPERATION_API_TITLE);
error.setMessage(Constant.FILE_CODE_SAVE_FAILURE);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.FILE_OPERATION_API_TITLE);
success.setMessage(Constant.FILE_CODE_SAVE_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// ======= STATIC CODE READ =========
@ApiOperation(value = "Read Static File and Return Code", response = FileDetails.class)
@GetMapping("/static-file-code-read/{id}")
public ResponseEntity<?> readStaticFilesById(@PathVariable(value = "id") int id) {
Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id);
String name_string = param.getName_string();
String moved_address_string = param.getMoved_address_string(); // in a same folder
String staticFileName = "SE_".concat(name_string);
String staticPath = moved_address_string.replace(projectPath, "");
staticPath = staticPath.substring(0, staticPath.lastIndexOf("/"));
staticPath = staticPath.concat("/static_code/"); // static code folder
staticPath = staticPath.concat(staticFileName); // static filde name
// projectPath
String filePath = projectPath.concat(staticPath);
// String filePath = staticPath; //by gk
StringBuilder code = new StringBuilder();
File file = null;
try {
file = new File(filePath);
String fileName = file.getName();
// String fileType = FilenameUtils.getExtension(fileName);
log.info("Static File Name : {}", fileName);
// BufferedReader br = new BufferedReader(new FileReader(file));
// String fileString = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
String line;
while ((line = br.readLine()) != null) {
code.append(line + "\n");
}
fr.close();
br.close();
} catch (IOException e) {
log.debug("IO Exception Handled...");
log.error(e.getMessage());
e.getMessage();
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.FILE_OPERATION_API_TITLE);
error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
String codee = code.substring(0, code.lastIndexOf("\n")); // remove last line break
FileDetails fileDetails = new FileDetails();
fileDetails.setId(id);
fileDetails.setText(codee);
return new ResponseEntity<FileDetails>(fileDetails, HttpStatus.OK);
}
// ======= STATIC CODE SAVE INTO FILE =========
@ApiOperation(value = "Save File Data")
@PostMapping(value = "/static-file-code-save")
public ResponseEntity<?> staticCodeSaveInFile(@Valid @RequestBody FileDetails fileDetails) {
int paramsId = fileDetails.getId();
String code = fileDetails.getText();
// log.debug("updated code : {}", code);
Rn_Bcf_Extractor_Params param = extractorParamsService.getById(paramsId);
// String address_string = param.getAddress_string();
String name_string = param.getName_string();
String moved_address_string = param.getMoved_address_string(); // in a same folder
String staticFileName = "SE_".concat(name_string);
String staticPath = moved_address_string.replace(projectPath, "");
staticPath = staticPath.substring(0, staticPath.lastIndexOf("/"));
staticPath = staticPath.concat("/static_code/"); // static code folder
staticPath = staticPath.concat(staticFileName); // static file name
// projectPath
String filePath = projectPath.concat(staticPath);
File file = null;
try {
file = new File(filePath);
String fileName = file.getName();
log.info("Static File Name : {}", fileName);
BufferedWriter bw = new BufferedWriter(new FileWriter(file, false)); // OVER WRITE FILE
bw.write(code);
bw.close();
} catch (FileNotFoundException e) {
log.debug("File Not Found Exception Handled...");
e.printStackTrace();
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.FILE_OPERATION_API_TITLE);
error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
} catch (IOException e) {
e.printStackTrace();
log.debug("IOException Handled...");
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.FILE_OPERATION_API_TITLE);
error.setMessage(Constant.FILE_CODE_SAVE_FAILURE);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.FILE_OPERATION_API_TITLE);
success.setMessage(Constant.FILE_CODE_SAVE_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// @PostMapping("/upload")
@PostMapping(value = "/upload-file", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<?> uploadToLocalFileSystem(@RequestParam("file") MultipartFile file) {
System.out.println("calling upload controller");
String fileName = StringUtils.cleanPath(file.getOriginalFilename());
Path path = Paths.get(projectPath + fileName);
try {
Files.copy(file.getInputStream(), path, StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
e.printStackTrace();
}
String fileDownloadUri = ServletUriComponentsBuilder.fromCurrentContextPath().path("/files/download/")
.path(fileName).toUriString();
return ResponseEntity.ok(fileDownloadUri);
}
@RequestMapping(value = "/redirect", produces = { MediaType.APPLICATION_JSON_VALUE }, method = RequestMethod.POST)
public ResponseEntity<?> registerBatchUser(@RequestParam("file") MultipartFile file) {
if (!file.isEmpty()) {
try {
byte[] bytes = file.getBytes();
BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(new File(projectPath)));
stream.write(bytes);
stream.close();
} catch (Exception e) {
Map<String, Object> FeedBackStatus = new HashMap<String, Object>();
return ResponseEntity.ok(FeedBackStatus);
}
}
return ResponseEntity.ok(null);
}
@PostMapping(value = "/uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public String uploadFile(@RequestParam("file") MultipartFile file) throws IOException {
String fileName = file.getOriginalFilename();
return fileName;
}
@RequestMapping(value = "/upload-file-2", method = RequestMethod.POST)
public @ResponseBody ResponseEntity<Map<String, Object>> handleFileUpload(
@RequestParam("file") MultipartFile file) {
String name = file.getName();
System.out.println(name);
Map<String, Object> FeedBackStatus = new HashMap<String, Object>();
FeedBackStatus.put("status", "success");
return ResponseEntity.ok(FeedBackStatus);
}
/*
* @PostMapping(value = "/uploadFile", consumes =
* MediaType.MULTIPART_FORM_DATA_VALUE) public String
* uploadFile2(@RequestParam("file") MultipartFile file)throws IOException {
* Path tempFile = Files.createTempFile(null, null);
*
* Files.write(tempFile, MultipartFile.getBytes()); File fileToSend =
* tempFile.toFile();
*
* MultiValueMap<String, Object> parameters = new LinkedMultiValueMap<>();
*
* parameters.add("file", new FileSystemResource(fileToSend));
*
* HttpHeaders headers = new HttpHeaders(); headers.set("Content-Type",
* "multipart/form-data");
*
* HttpEntity httpEntity = new HttpEntity<>(parameters, headers);
*
* try { restTemplate.exchange(apiUrl, HttpMethod.POST, httpEntity,
* MyClazz.class); } finally { fileAEnviar.delete(); }
*
* }
*/
@PostMapping("/upload-gb")
public ResponseEntity<String> uploadFileGb(@RequestParam("file") MultipartFile file) {
return ResponseEntity.ok("working");
}
}

View File

@ -0,0 +1,352 @@
package com.realnet.codeextractor.controller;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
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.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.hibernate.boot.model.source.spi.CascadeStyleSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params;
import com.realnet.codeextractor.entity.Rn_Bcf_Rules;
import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service;
import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service;
import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service;
import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service;
import com.realnet.fnd.entity.Error;
import com.realnet.fnd.entity.ErrorPojo;
import com.realnet.fnd.entity.Success;
import com.realnet.fnd.entity.SuccessPojo;
import com.realnet.logging.LogExecutionTime;
import com.realnet.utils.Constant;
import com.realnet.utils.RealNetUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = { "Code Extractor" })
public class DynamicCodeExtractionController {
@Value("${projectPath}")
private String projectPath;
@Autowired
private Rn_Bcf_Extractor_Service rn_bcf_extractor_service;
@Autowired
private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service;
@Autowired
private Rn_Bcf_Rule_Library_Service bcfRuleLibraryService;
// @Autowired
// private RealNetUtils utils;
@Autowired
Rn_Bcf_Exception_Rule_Library_Service rn_bcf_rule_exception_library_service;
@LogExecutionTime
@ApiOperation(value = "Dynamic Code Extraction")
@GetMapping(value = "/dynamic_code_extraction")
public ResponseEntity<?> dynamicCodeExtraction(@RequestParam(value = "header_id") Integer headerId)
throws IOException
{
Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(headerId);
String technology_stack = extractor.getTech_stack();
String object_type = extractor.getObject_type();
String sub_object_type = extractor.getSub_object_type();
System.out.println("FROM Rn_Bcf_Extractor = " + technology_stack + " || " + object_type + " || " + sub_object_type+"||"+headerId);
// PARAMS
List<Rn_Bcf_Extractor_Params> params = extractor.getRn_bcf_extractor_Params();
//
// // FILE NAME VARIABLE NAMES IN BUILDER CODE
// Map<String, String> map = new HashMap<String, String>();
// map.put("controller_name_first_upper", "Nil_final_controller");
// map.put("table_name_first_upper", "Rn_nil_final");
// map.put("table_name_lower", "rn_nil_final");
// map.put("table_name_upper", "RN_NIL_FINAL");
// map.put("service_name_first_upper", "Nil_final_service");
// map.put("service_name_lower", "nil_final_service");
// map.put("service_impl_name_first_upper", "Nil_final_serviceimpl");
// map.put("repository_name_first_upper", "Rn_header_test1_repository");
// map.put("repository_name_lower", "rn_header_test1_repository");
// map.put("ng_add_form_component_name", "AddRn_header_test1Component");
// map.put("ng_all_grid_view_component_name", "AllRn_header_test1Component");
// map.put("ng_read_only_component_name", "Rn_header_test1DetailsComponent");
// map.put("ng_edit_component_name", "EditRn_header_test1Component");
// map.put("ng_extension_add_component_name", "AddExtRn_header_test1Component");
// map.put("ng_routing_module_ts_name", "Rn_header_test1RoutingModule");
// map.put("ng_component_ts_name", "Rn_header_test1Component");
// map.put("ng_module_ts_name", "Rn_header_test1Module");
// map.put("ng_service_ts_name", "Rn_header_test1Service");
// map.put("ng_model_ts_name ", "Rn_header_test1_t");
// STATIC FILES ( SE_FILE_NAME.EXT)
ArrayList<String> staticFiles = new ArrayList<String>();
try {
// PARAMETERS TABLE VALUE
for (Rn_Bcf_Extractor_Params param : params)
{
// System.out.println("---Exception rule for loop--");
boolean is_extraction_enabled = param.isIs_extraction_enabled();
boolean is_creation_enabled = param.isIs_creation_enabled();
String path = param.getMoved_address_string();
File file = new File(path);
String parentPath = file.getParent();
String name = file.getName();
String ConvertedFileName = "SE_" + name;
// STATIC FILES DIRECTORY
String staticFileParentDir = parentPath + File.separator + "static_code";
File staticFile = new File(staticFileParentDir + File.separator + ConvertedFileName);
// STATIC FILE PATH
String staticFileDir = staticFile.getAbsolutePath().replace("\\", "/");
// ADD STATIC FILE PATH TO ARRAYLIST
if (is_extraction_enabled && is_creation_enabled) {
// System.out.println("STATIC FILE DIR ADDED TO ARRAYLIST = " + staticFileDir);
staticFiles.add(staticFileDir);
}
}
// package part MODULE_NAME ADD
for (String staticDir : staticFiles)
{
File file = new File(staticDir);
Path path = Paths.get(staticDir);
StringBuilder code = new StringBuilder();
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
for (String line : lines)
{
if (line.startsWith("\"package"))
{
int i = line.lastIndexOf(".");
String head = line.substring(0, i + 1);
String tail = line.substring(i);
String moduleName = "\" + module_name + \"";
line = head + moduleName + tail;
}
code.append(line + "\n");
}
//System.out.println(code);
BufferedWriter br = new BufferedWriter(new FileWriter(file)); // replaced string
br.write(code.toString());
br.close();
}
int count=0;
for (String staticDir : staticFiles)
{
File file1 = new File(staticDir);
Path path1 = Paths.get(staticDir);
StringBuilder code = new StringBuilder();
StringBuilder code2 = new StringBuilder();
List<String> lines = Files.readAllLines(path1, StandardCharsets.UTF_8);
for (String line : lines)
{
if (line.startsWith("\"public class"))
{
//
String file_name_var=params.get(count).getFile_name_var();
// System.out.println("file namevar "+file_name_var);
line = "\"public class \" + "+file_name_var+""+1+" + \"{\"+";
}
if (line.startsWith("\"public interface"))
{
//
String file_name_var=params.get(count).getFile_name_var();
// System.out.println("file namevar "+file_name_var);
line = "\"public interface \" + "+file_name_var+""+1+" + \"{\"+";
}
if (line.startsWith("\" templateUrl"))
{
// " templateUrl: './readonly.component.html'," + "\r\n" +
String file_name_var=params.get(count).getFile_name_var();
// System.out.println("file namevar "+file_name_var);
line = " \" templateUrl: './\"+"+file_name_var+""+1+"+\".html',\"" + "\r\n \n" +"+" ;
}
if (line.startsWith("\" styleUrls"))
{
// " styleUrls: ['./readonly.component.scss']" + "\r\n" +
String file_name_var=params.get(count).getFile_name_var();
// System.out.println("file namevar "+file_name_var);
line = " \" styleUrls: ['./\"+"+file_name_var+""+1+"+\".scss']\"" + "\r\n \n"+"+" ;
}
if (line.startsWith("\"export class"))
{
// "export class ReadonlyComponent implements OnInit {" + "\r\n" +
String file_name_var=params.get(count).getFile_name_var();
// System.out.println("file namevar "+file_name_var);
line = "\"export class \"+"+file_name_var+""+2+"+\"Component implements OnInit {\"" + "\r\n"+"+" ;
}
code.append(line + "\n");
}
count++;
BufferedWriter br = new BufferedWriter(new FileWriter(file1)); // replaced string
br.write(code.toString());
br.close();
}
// APPLY ALL RULES PRESENT HERE
List<Rn_Bcf_Rules> rules = bcfRuleLibraryService.getAll();
int rulesOuterCount = 0;
for (Rn_Bcf_Rules rule : rules)
{
rulesOuterCount++;
// System.out.println("RULES FOR COUNT = " + ++rulesOuterCount);
String start = rule.getIdentifier_start_string();
String end = rule.getIdentifier_end_string();
String replaceWith = rule.getReplacement_string();
String tech_stack = rule.getTech_stack();
String sub_object_type2 = rule.getSub_object_type();
String object_type2 = rule.getObject_type();
replaceWith = replaceWith.concat("");
if(technology_stack.equals(tech_stack) && sub_object_type.equals(sub_object_type2) && object_type.equals(object_type2))
{
// System.out.println("main tech stack"+technology_stack+" new "+tech_stack);
// System.out.println("main subobject "+sub_object_type+" new "+sub_object_type2);
// System.out.println("main object "+object_type+" new "+object_type2);
int dirCount = 0;
for (String staticDir : staticFiles)
{
dirCount++;
File staticFile = new File(staticDir);
String staticFileName = staticFile.getName();
// System.out.println("========" + staticFileName + "=============");
String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8);
String fileType = FilenameUtils.getExtension(staticFileName);
// don't check empty file for replacement..
if (!fileString.isEmpty()) {
// RULE APPLY
String finalString = RealNetUtils.stringReplace(fileString, start, end, replaceWith,
fileType);
BufferedWriter bw = new BufferedWriter(new FileWriter(staticFile, false)); // replaced
// string
bw.write(finalString);
bw.close();
}
}
}
// System.out.println("loop count::"+dirCount);
}
System.out.println("rules outer countt::"+rulesOuterCount);
} catch (FileNotFoundException e) {
e.printStackTrace();
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.DYNAMIC_EXTRACTION_FAILED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.DYNAMIC_EXTRACTION_SUCCESS);
successPojo.setSuccess(success);
log.debug("Response {} ", successPojo);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
}

View File

@ -0,0 +1,39 @@
package com.realnet.codeextractor.controller;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.fasterxml.jackson.databind.SerializationFeature;
//@JsonIgnoreProperties(ignoreUnknown=true)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
//@JacksonFeatures(serializationDisable = {SerializationFeature.FAIL_ON_EMPTY_BEANS})
@JsonSerialize
@RestController
public class FileUploadController {
@PostMapping("/upload-gb")
public ResponseEntity<Void> uploadFileGb(@RequestParam("file") MultipartFile file[]){
for(MultipartFile files:file) {
System.out.println("File name::"+files.getOriginalFilename());
}
return new ResponseEntity<Void>(HttpStatus.OK);
}
@PostMapping("/upload-string")
public ResponseEntity<String> uploadFileString(){
return ResponseEntity.ok("working");
}
}

View File

@ -0,0 +1,684 @@
package com.realnet.codeextractor.controller;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
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.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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params;
import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service;
import com.realnet.flf.service.FieldTypeService;
import com.realnet.fnd.entity.Error;
import com.realnet.fnd.entity.ErrorPojo;
import com.realnet.fnd.entity.Success;
import com.realnet.fnd.entity.SuccessPojo;
import com.realnet.utils.Constant;
import io.swagger.annotations.Api;
@RestController
@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = { "Build Master Builder" })
public class MasterCodeBuild_gk {
@Value("${projectPath}")
private String projectPath;
@Value("${angularProjectPath}")
private String angularProjectPath;
@Autowired
private Rn_Bcf_Extractor_Service rn_bcf_extractor_service;
@Autowired
private FieldTypeService fieldTypeService;
// private static final Logger logger =
// Logger.getLogger(BuildMasterBuilderController.class);
@GetMapping("/build_master_builder")
public ResponseEntity<?> masterControllerBuilder(@RequestParam(value = "id") Integer id)
throws IOException, FileNotFoundException {
StringBuilder variablesDynamicCode = new StringBuilder();
StringBuilder stringBuilderDynamicCode = new StringBuilder();
// StringBuilder stringBuilder = new StringBuilder();
// RN_BCF_CODE_EXTRACTOR_T ID
// int eid = Integer.parseInt(id);
Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(id);
String technology_stack = extractor.getTech_stack();
String object_type = extractor.getObject_type();
String sub_object_type = extractor.getSub_object_type();
// RN_BCF_CODE_EXTRACTOR_PARAMS_T VALUES
// List<Rn_Bcf_Extractor_Params> params =
// rn_bcf_extractor_params_service.getByHeaderId(eid);
List<Rn_Bcf_Extractor_Params> params = extractor.getRn_bcf_extractor_Params();
int j = 0;
for (Rn_Bcf_Extractor_Params param : params) {
boolean is_creation_enabled = param.isIs_creation_enabled();
// param.isIs_extraction_enabled();
String path = param.getMoved_address_string();
File file = new File(path);
String parentPath = file.getParent();
String name = file.getName();
String convertedFileName = "SE_" + name;
// STATIC CODE DIRECTORY
String staticFileParentDir = parentPath + File.separator + "static_code";
File staticFile = new File(staticFileParentDir + File.separator + convertedFileName);
// HERE WE GET FILE INSIDE DATA
String fileToString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8);
// ex. controller_file (FROM PARAMS TABLE)
String file_name_var = param.getFile_name_var() + j;
// ex. ui_name + "controller"
String file_name_dynamic_string = param.getFile_name_dynamic_string();
// ex. String controller_file = ui_name + "controller";
variablesDynamicCode
.append("String " + file_name_var + " = " + "\"" + file_name_dynamic_string + "\"" + ";\r\n");
System.out.println("file name dynamic str " + file_name_dynamic_string);
// change file name entity
// String mainstr1=file_name_dynamic_string;
// String saleesent1=mainstr1.replace(".java", " ");
// System.out.println("updated filename"+saleesent1);
// System.out.println(file_name_dynamic_string.contains(".java"));
// System.out.println(file_name_dynamic_string.contains(".ts"));
// System.out.println(file_name_dynamic_string.contains(".scss"));
// System.out.println(file_name_dynamic_string.contains(".html"));
// HERE WE CHECK AND APPEND FILE NAME
if (file_name_dynamic_string.contains(".java")) {
variablesDynamicCode
.append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + ""
+ 1 + "=mainstr" + j + ".replace(\".java\", \"\");\r\n" + "" + "\r\n" + "\n");
} else if (file_name_dynamic_string.contains(".ts")) {
variablesDynamicCode.append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String "
+ file_name_var + "" + 1 + "=mainstr" + j + ".replace(\".ts\", \"\");\r\n" + "" + "\r\n"
+ "String " + file_name_var + "" + 2 + "=mainstr" + j + ".replace(\".component.ts\", \"\");\r\n"
+ "" + "\r\n" + "\n");
} else if (file_name_dynamic_string.contains(".html")) {
variablesDynamicCode
.append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + ""
+ 1 + "=mainstr" + j + ".replace(\".html\", \"\");\r\n" + "" + "\r\n" + "\n");
} else if (file_name_dynamic_string.contains(".scss")) {
variablesDynamicCode
.append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + ""
+ 1 + "=mainstr" + j + ".replace(\".scss\", \"\");\r\n" + "" + "\r\n" + "\n");
} else {
System.out.println("not found");
}
// ======= MODULE NAME SHOULD COME FROM THE SESSION ========
// String moduleName = "\" + module_name + \"/\"";
String moduleName = "\" + module_name + \"/";
String modulePath = param.getTotal_project_path_dynamic_string();
// System.out.println("MODULE PATH = " + modulePath);
if (modulePath.endsWith(".java")) {
String parent = modulePath.substring(0, modulePath.lastIndexOf("/")); // 1
String lvl2Parent = parent.substring(0, parent.lastIndexOf("/") + 1); // 2
String tail0 = modulePath.substring(parent.lastIndexOf("/") + 1); // 3
tail0 = tail0.substring(0, tail0.lastIndexOf("/") + 1); // remove the .java file name
modulePath = lvl2Parent + moduleName + tail0;
} else {
// add module name in spring project
modulePath = modulePath.substring(0, modulePath.lastIndexOf("/") + 1);
String data0 = modulePath.substring(0, modulePath.lastIndexOf("/") + 1);
String tail0 = modulePath.substring(modulePath.lastIndexOf("/") + 1);
data0 += moduleName + tail0;
modulePath = data0;
}
// System.out.println("MANUPULATED module PATH = " + modulePath);
// String ref_address_string = param.getReference_address_string();
// ref_address_string = ref_address_string.substring(0, ref_address_string.lastIndexOf("/")+1);
String total_address_path = param.getTotal_project_path_dynamic_string();
total_address_path = total_address_path.substring(0, total_address_path.lastIndexOf("/") + 1);
System.out.println("total path : " + total_address_path + "\n");
String finalDir = "";
//
// here we set file path
String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + total_address_path;
System.out.println("dest path : " + dest_path);
// String finalDir = dirString + "/" + "\" + " + file_name_var;
finalDir = dest_path + "\" + " + file_name_var;
System.out.println(finalDir);
// module_dest_path = "projectPath + \"" + "/Projects/\" + project_name + " +
// modulePath;
// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + modulePath;
// String finalDir = dirString + "/" + "\" + " + file_name_var;
finalDir = dest_path + "\" + " + file_name_var;
System.out.println("NIL FINAL DIR = " + finalDir + "\n");
if (is_creation_enabled) {
StringBuilder fileCode = new StringBuilder();
if (file_name_dynamic_string.contains("entity")) {
// String entity = entity(path, "test");
if (fileToString.isEmpty()) {
fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n");
} else {
fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n");
}
} else if (file_name_dynamic_string.contains("repository")
|| file_name_dynamic_string.contains("repo")) {
// String repo = repo(path, "test");
if (fileToString.isEmpty()) {
fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n");
} else {
fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n");
}
} else if (file_name_dynamic_string.contains("service")) {
// String service = service(path, "test");
if (fileToString.isEmpty()) {
fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n");
} else {
fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n");
}
} else if (file_name_dynamic_string.contains("controller")) {
// String controller = controller(path, "test");
if (fileToString.isEmpty()) {
fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n");
} else {
fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n");
}
} else {
// String other = other(path, "test");
if (file_name_dynamic_string.isEmpty()) {
fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\"\r\n");
} else {
fileCode.append(" " + file_name_var + "Code.append(" + fileToString + "\r\n");
}
}
// EMPTY FILE CODE WILL NOT GO IN THIS LOOP
stringBuilderDynamicCode.append(" StringBuilder " + file_name_var + "Code = new StringBuilder();\r\n"
// + " " + file_name_var + "Code.append(" + fileToString + ");\r\n"
+ fileCode + "\r\n"
+ " File " + file_name_var + "File = new File(" + finalDir + ");\r\n"
+ " System.out.println(\"Directory name = \" + " + file_name_var + "File);\r\n"
// == CREATE PARENT DIR IF NOT EXIST===
+ " File " + file_name_var + "FileParentDir = new File(" + file_name_var
+ "File.getParent());\r\n" + " if(!" + file_name_var + "FileParentDir.exists()) {\r\n" + " "
+ file_name_var + "FileParentDir.mkdirs();\r\n" + " }\r\n"
// ==
+ " if (!" + file_name_var + "File.exists()) {\r\n" + " " + file_name_var
+ "File.createNewFile();\r\n" + " }\r\n" + " " + "fw = new FileWriter("
+ file_name_var + "File.getAbsoluteFile());\r\n" + " bw = new BufferedWriter(fw);\r\n"
+ " " + " bw.write(" + file_name_var + "Code.toString());\r\n" + " bw.close();\r\n"
+ "\r\n");
}
j++;
}
// CHILD MASTER BUILDER NAME DEPENDS ON (TECH_STACK, OBJ_TYPE, SUB_OBJ_TYPE)
String childMasterBuilderName = technology_stack + "_" + object_type + "_" + sub_object_type + "_Builder";
childMasterBuilderName = childMasterBuilderName.replace(" ", "_");
childMasterBuilderName = childMasterBuilderName.replaceAll("[-]+", "_");
StringBuilder childMasterBuilderCode = new StringBuilder();
// String action_builder_code = fieldTypeService.angular_action_builder_code();
childMasterBuilderCode.append("package com.realnet.builders;\r\n" + "\r\n"
+ "import java.io.BufferedWriter;\r\n" + "import java.io.File;\r\n" + "import java.io.FileWriter;\r\n"
+ "import java.io.IOException;\r\n" + "import java.util.ArrayList;\r\n" + "import java.util.Date;\r\n"
+ "import java.util.List;\r\n" + "import java.util.Optional;\r\n" + "\r\n"
+ "import org.modelmapper.ModelMapper;\r\n"
+ "import org.springframework.beans.factory.annotation.Autowired;\r\n"
+ "import org.springframework.beans.factory.annotation.Value;\r\n"
+ "import org.springframework.http.HttpStatus;\r\n" + "import org.springframework.http.MediaType;\r\n"
+ "import org.springframework.http.ResponseEntity;\r\n"
+ "import org.springframework.web.bind.annotation.GetMapping;\r\n"
+ "import org.springframework.web.bind.annotation.PathVariable;\r\n"
+ "import org.springframework.web.bind.annotation.RequestMapping;\r\n"
+ "import org.springframework.web.bind.annotation.RestController;\r\n" + "\r\n"
+ "import com.google.gson.JsonElement;\r\n" + "import com.google.gson.JsonObject;\r\n"
+ "import com.google.gson.JsonParser;\r\n" + "import com.google.gson.JsonArray;\r\n" + "\r\n"
+ "import com.realnet.actionbuilder.service.Rn_Cff_ActionBuilder_Service;\r\n"
+ "import com.realnet.flf.service.FieldTypeService;\r\n"
+ "import com.realnet.fnd.service.Rn_LookUp_Service;\r\n"
+ "import com.realnet.formdrag.repository.Rn_wf_lines_3Repository;\r\n"
+ "import com.realnet.formdrag.entity.Rn_wf_lines_3;\r\n" + ""
+ "import com.realnet.wfb.service.Rn_WireFrame_Service;\r\n" + "\r\n"
+ "import io.swagger.annotations.Api;"
+ "\r\n" + "@RestController\r\n"
// CONTROLLER NAME SHOULD CHANGE
// DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE
+ "@RequestMapping(value = \"/api\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n"
+ "@Api(tags = { \"Master Builder\" })\r\n" + "public class " + childMasterBuilderName + " {\r\n"
+ "\r\n" + "\r\n" + " @Value(\"${angularProjectPath}\")\r\n" + " private String angularProjectPath;"
+ " @Value(\"${projectPath}\")\r\n" + " private String projectPath;"
// DEPENDENCIES FOR WIREFRAME
+ " @Autowired\r\n" + " private Rn_WireFrame_Service wireFrameService;\r\n" + "\r\n" +
" @Autowired\r\n" + " private Rn_LookUp_Service lookUpService;\r\n" + "@Autowired\r\n"
+ " private Rn_wf_lines_3Repository repo;\n"
+ "\r\n" + " @Autowired\r\n" + " private Rn_Cff_ActionBuilder_Service actionBuilderService;\r\n"
+ "\r\n" + " @Autowired\r\n" + " private ModelMapper modelMapper;\r\n" + "\r\n" + " @Autowired\r\n"
+ " private FieldTypeService fieldTypeService;\r\n\n\n" + "@GetMapping(value = \"/"
+ childMasterBuilderName + "/{header_id}\")\r\n"
+ " public ResponseEntity<?> createbyjson(@PathVariable Integer header_id) throws IOException {\r\n"
+ " Optional<Rn_wf_lines_3> wireframe = repo.findheader(header_id);\r\n" + "\r\n"
+ " List<String> tablename = new ArrayList<>();\r\n"
+ " List<String> entityname = new ArrayList<>();\r\n" + "\r\n"
+ " JsonParser parser = new JsonParser();\r\n"
+ " JsonElement element = parser.parse(wireframe.get().getModel());\r\n"
+ " JsonObject jsonObject = element.getAsJsonObject();\r\n" + "\r\n"
+ " JsonElement name = jsonObject.get(\"name\");\r\n" + " System.out.println(name);\r\n"
+ " tablename.add(name.getAsString());\r\n" + "\r\n"
+ " JsonElement desc = jsonObject.get(\"description\");\r\n"
+ " System.out.println(desc);\r\n" + "// keys.add(\"desc :\"+desc.getAsString());\r\n"
+ "\r\n" + " JsonElement element2 = jsonObject.get(\"attributes\");\r\n"
+ " System.out.println(element2);\r\n" + "\r\n"
+ " JsonArray jsonArray = element2.getAsJsonArray();\r\n"
+ " System.out.println(jsonArray);\r\n" + "\r\n" + " for (JsonElement ar : jsonArray) {\r\n"
+ "\r\n" + " JsonObject obj = ar.getAsJsonObject();\r\n" + "\r\n"
+ " JsonElement type = obj.get(\"type\");\r\n" + " System.out.println(type);\r\n"
+ "// keys.add(\"type :\"+type.getAsString());\r\n" + "\r\n"
+ " JsonElement description = obj.get(\"description\");\r\n"
+ " System.out.println(description);\r\n"
+ "// keys.add(\"description :\"+description.getAsString());\r\n" + "\r\n"
+ " JsonElement placeholder = obj.get(\"placeholder\");\r\n"
+ "// System.out.println(placeholder);\r\n"
+ "// keys.add(\"placeholder :\"+placeholder.getAsString());\r\n" + "\r\n"
+ " JsonElement label = obj.get(\"label\");\r\n" + " System.out.println(label);\r\n"
+ " entityname.add(label.getAsString());\r\n" + "\r\n" + " }\r\n" + "\r\n"
+ " Date d = new Date();\r\n" + " String addString = \"_\";\r\n" + "\r\n"
+ " // CALL BACKEND\r\n"
// + " backendservice.buildbackend(tablename, entityname, addString);\r\n" + "\r\n"
// + " // CALL FRONTEND\r\n"
// + " frontendservice.buildFrontend(tablename, entityname, addString);\r\n"
// + ""
// + "\r\n" + " System.out.println(\"id ::\"+id);"
// + "\n lookUpService.createTable(id);"
// + " \n // extra button \n List<Rn_Fb_Line> extraButton = wireFrameService.getExtraButton(id);"
// + " \n // HEADER VALUE\r\n" + " Rn_Fb_Header rn_fb_header = wireFrameService.getById(id);\r\n"
// + " \r\n" + " // LINE VALUES\r\n"
// + " List<Rn_Fb_Line> rn_fb_lines = rn_fb_header.getRn_fb_lines();\r\n" + " \r\n"
// + " // MODULE DETAILS\r\n" + " Rn_Module_Setup module = rn_fb_header.getModule();\r\n"
// + " \r\n" + " // PROJECT DETAILS\r\n"
// + " Rn_Project_Setup project = module.getProject();\r\n" + " \r\n"
// // ATTRIBUTE FLEX
// + " // ATTRIBUTE FLEX VALUES\r\n"
// + " List<Rn_Lookup_Values> attribute_flex_values = lookUpService.getExtensions();\r\n"
// + " String project_name = project.getProjectName();\r\n"
+ " String project_name =" + "\"" + "test" + j + "\"" + ";\r\n"
// + " String module_name = module.getModuleName();\r\n\n"
+ "\r\r\rFileWriter fw = null;\r\n" + "BufferedWriter bw = null;\r\n" + variablesDynamicCode);
childMasterBuilderCode.append(""
// ACTION BUILDER CODE
+ // =========== VARIABLE CODE WILL BE APPEND HERE ===============//
"\n" + stringBuilderDynamicCode.toString() + "\r\n"
+ " return new ResponseEntity<>(\"created\", HttpStatus.CREATED);\r\n" + "}\r\n }");
//
FileWriter fw = null;
BufferedWriter bw = null;
try {
// FILE NAME SHOULD CHANGE DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE
File masterBuilderFile = new File(
projectPath + "/src/main/java/com/realnet/builders/" + childMasterBuilderName + ".java");
if (!masterBuilderFile.exists()) {
masterBuilderFile.createNewFile();
}
fw = new FileWriter(masterBuilderFile.getAbsoluteFile());
bw = new BufferedWriter(fw);
bw.write(childMasterBuilderCode.toString());
bw.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.MASTER_BUILDER_API_TITLE);
error.setMessage(Constant.MASTER_BUILDER_FAILURE);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.MASTER_BUILDER_API_TITLE);
success.setMessage(Constant.MASTER_BUILDER_SUCCESS);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
}
public String entity(String path, String classname) throws IOException {
return UpdateEntity(path, classname);
}
public String repo(String path, String classname) throws IOException {
return UpdateRepo(path, classname);
}
public String service(String path, String classname) throws IOException {
return UpdateService(path, classname);
}
public String controller(String path, String classname) throws IOException {
return UpdateController(path, classname);
}
public String other(String path, String classname) throws IOException {
return UpdateRepo(path, classname);
}
public String UpdateEntity(String path, String classname) throws IOException {
// String path = "C:\\Users\\Aniket\\Documents\\Entity.txt";
// String classname = "gk";
String addition = "for (int i = 0; i < entityname.size(); i++) {\r\n"
+ " String string = entityname.get(i);\r\n"
+ " String lowerCase = string.replaceAll(\" \", \"_\").toLowerCase();\r\n"
+ " String add = \"\\n private \" + \"String\" + \" \" + lowerCase + \";\";\r\n"
+ " intialize.append(add);\r\n"
+ " }";
/*
* RandomAccessFile writer=new
* RandomAccessFile("C:/Users/lenovo/Documents/demo.txt","rw");
*
* writer.seek(position); writer.writeBytes(addition); writer.close();
*/
String line = "";
StringBuilder intialize = new StringBuilder();
StringBuilder class_name = new StringBuilder();
StringBuilder middle = new StringBuilder();
StringBuilder end = new StringBuilder();
BufferedReader br = new BufferedReader(new FileReader(path));
while ((line = br.readLine()) != null) {
String[] data = line.split(",");
for (String d : data) {
if (d.contains("import") || d.contains("@Data") || d.contains("@Entity")) {
intialize.append("\"");
intialize.append(d);
intialize.append("\"+\n");
} else if (d.contains("public")) {
class_name.append("\"public class "+classname +" {\"+ \n");
// intialize.append("\"+\n");
} else if (d.contains("}")) {
intialize.append("\"");
end.append(d);
intialize.append("\"+\n");
}
}
}
br.close();
middle.append(addition);
StringBuilder finalstring = new StringBuilder();
finalstring.append("\"StringBuilder intialize = new StringBuilder();\"+\r\n"
+ "\" intialize.append(\"+");
finalstring.append(intialize.toString());
finalstring.append(class_name.toString());
finalstring.append("\t\"@Id\"+\r\n"
+ "\" @GeneratedValue(strategy = GenerationType.IDENTITY)\"+\r\n"
+ "\" private int id;\");\n");
finalstring.append(middle.toString());
return finalstring.toString();
}
public String UpdateRepo(String path, String classname) throws IOException {
String line = "";
StringBuilder intialize = new StringBuilder();
StringBuilder class_name = new StringBuilder();
StringBuilder middle = new StringBuilder();
StringBuilder end = new StringBuilder();
BufferedReader br = new BufferedReader(new FileReader(path));
intialize.append("\"");
while ((line = br.readLine()) != null) {
String[] data = line.split(",");
for (String d : data) {
if (d.contains("import") || d.contains("@Repository") ) {
intialize.append("\""+d);
intialize.append("\"+\n");
} else if (d.contains("public")) {
class_name.append("\""+"public class "+classname +" extends JpaRepository<"+classname + ", Long> " +"{"+"\"+");
class_name.append("\n");
}
}
}
br.close();
StringBuilder finalstring = new StringBuilder();
finalstring.append(" \""+" StringBuilder repo = new StringBuilder();"+"\"+\n"
+" \""+""
+" "+ "repo.append(");
finalstring.append(intialize.toString());
finalstring.append(class_name.toString());
finalstring.append("\"+}\"");
finalstring.append("\");"+"\"");
return finalstring.toString();
}
public String UpdateService(String path, String classname) throws IOException {
String line = "";
String apiName ="Api";
StringBuilder intialize = new StringBuilder();
StringBuilder class_name = new StringBuilder();
StringBuilder middle = new StringBuilder();
StringBuilder end = new StringBuilder();
BufferedReader br = new BufferedReader(new FileReader(path));
intialize.append("\"import java.util.List;\"+\r\n"
+ "\r\n" + "\"import org.springframework.beans.factory.annotation.Autowired;\"+\r\n"
+ "\" import org.springframework.stereotype.Service;\"+\n");
intialize.append("\n\"@Service\"+\n");
intialize.append("\"@RequestMapping(value = " +"\"/"+ apiName+ "\")\"+\n"
+ "\"@RestController\"+\r\n");
class_name.append("\"public class "+ classname +"Service {\"+\r\n"
+ "\" @Autowired\"+\r\n"
+ "\" private " + classname+ "Service Service;\"+\n");
middle.append(
"\" @Autowired\r\n" + "private " + classname + "Repository " + "Repository;\"+\n");
middle.append("\"public "+ classname +" Savedata("+classname+ " data) {\"+\r\n"
+ " \" return Repository.save(data);\"+ \r\n" + " \" }\"+\r\n" + "\r\n"
+ " \" \r\n" + "public List<" + classname + "> getdetails() {\"+\r\n"
+ " \" return (List<" + classname + ">) Repository.findAll();\"+\r\n" + " }\r\n"
+ "\r\n" + "\r\n" + "\"public "+ classname +" getdetailsbyId(Long id) {\"+\r\n"
+ "\" return Repository.findById(id).get();\"+\r\n" + "\" }\"+\r\n" + "\r\n" + "\r\n"
+ "\" public void delete_by_id(Long id) {\"+\r\n"
+ "\" Repository.deleteById(id);\"+\r\n" + "}\"+\r\n" + "\r\n" + "\r\n");
middle.append("\"public "+ classname +" update("+ classname +" data,Long id) {\"+\n"
+ " \""+ classname +" old = Repository.findById(id).get();\"+\n");
// middle.append(" for (EntityBuild en : ent) {
// String name = en.getName();
//
// String string = name.substring(0,1).toUpperCase()+name.substring(1);
// middle.append("old.set"+string+ "(data.get"+string+"());\r\n");
// }
middle.append("\"final "+ classname +" test = Repository.save(old);\"+\r\n"
+ " \" return test;\"+"
+ "\"}\"+"
+ "\"}\"+");
br.close();
StringBuilder finalstring = new StringBuilder();
finalstring.append("\" StringBuilder service = new StringBuilder();\"+\r\n"
+ "\" service.append(\"+");
finalstring.append(intialize.toString());
finalstring.append(class_name.toString());
finalstring.append(middle.toString());
finalstring.append("\");");
//
// FileWriter fw = null;
// BufferedWriter bw = null;
// File masterBuilderFile = new File(newpath + "test" + ".java");
// if (!masterBuilderFile.exists()) {
// masterBuilderFile.createNewFile();
// }
// fw = new FileWriter(masterBuilderFile.getAbsoluteFile());
// bw = new BufferedWriter(fw);
// bw.write(finalstring.toString());
// bw.close();
return finalstring.toString();
}
public String UpdateController(String path, String classname) throws IOException {
String line = "";
String apiName ="Api";
StringBuilder intialize = new StringBuilder();
StringBuilder class_name = new StringBuilder();
StringBuilder middle = new StringBuilder();
StringBuilder end = new StringBuilder();
BufferedReader br = new BufferedReader(new FileReader(path));
intialize.append("import org.springframework.beans.factory.annotation.Autowired;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.DeleteMapping;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.GetMapping;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.PathVariable;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.PostMapping;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.PutMapping;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.RequestBody;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.RequestParam;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.RestController;\"+\r\n"
+ "\" import org.springframework.web.bind.annotation.*;\"+\r\n");
intialize.append("\" @RequestMapping(value = " +"\"/"+ apiName+ "\")\"+\n"
+ "\" @RestController \"+\r\n ");
class_name.append("\" public class "+ classname +"Controller {\"+\r\n"
+ "\" @Autowired \"+ \r\n"
+ "\" private " + classname+ "Service Service; \"+\n");
middle.append( "\" @PostMapping("+"\"/" + classname+")\"+\r\n"
+ " \r\n"
+ " \" public " + classname+ " Savedata(@RequestBody " + classname+ " data) { \"+ \r\n"
+ " \" " + classname+ " save = Service.Savedata(data) ;\"+\r\n"
+ " \" return save;\"+\r\n"
+ " \"+ }\"+\r\n"
// + " \" \r\n \"+"
// + " \" \r\n \"+"
+ " \" @GetMapping(\"/" + classname+ "\")\"+\r\n"
+ " \" public List<" + classname+ "> getdetails() { \"+ \r\n"
+ " \" List<" + classname+ "> get = Service.getdetails(); \"+ \r\n"
+ " \" return get;\"+\r\n\" } \"+\n"
+ "\" @GetMapping(\"/" + classname+ "/{id}\")\"+\r\n"
+ " \" public " + classname+ " getdetailsbyId(@PathVariable Long id ) {\"+\r\n"
+ " \" " + classname+ " get = Service.getdetailsbyId(id);\"+\r\n"
+ "\" return get;\"+\r\n"
+ " \" }\"+\n"
+ "\" @DeleteMapping(\"/" + classname+ "/{id}\")\"+\r\n"
+ " \" public void delete_by_id(@PathVariable Long id ) {\"+\r\n"
+ " \" Service.delete_by_id(id);\"+\r\n"
// + " \" \"+ \r\n"
+ " \"\"+ }\n"
+ "\" @PutMapping(\"/" + classname+"/{id}\")\"+\r\n"
+ "\" public " + classname+ " update(@RequestBody " + classname+ " data,@PathVariable Long id ) {\"+\r\n"
+ " \" " + classname+ " update = Service.update(data,id);\"+\r\n"
+ "\" return update;\"+\r\n"
+ "\" }\"+\n\"}\"+");
br.close();
StringBuilder finalstring = new StringBuilder();
finalstring.append("\" StringBuilder controller = new StringBuilder();\"+\r\n"
+ "\"controller.append(");
finalstring.append(intialize.toString());
finalstring.append(class_name.toString());
finalstring.append(middle.toString());
// finalstring.append("}");
finalstring.append("\");");
//
// FileWriter fw = null;
// BufferedWriter bw = null;
// File masterBuilderFile = new File(newpath + "test" + ".java");
// if (!masterBuilderFile.exists()) {
// masterBuilderFile.createNewFile();
// }
// fw = new FileWriter(masterBuilderFile.getAbsoluteFile());
// bw = new BufferedWriter(fw);
// bw.write(finalstring.toString());
// bw.close();
return finalstring.toString();
}
}

View File

@ -0,0 +1,69 @@
package com.realnet.codeextractor.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.codeextractor.entity.NamingConvension;
import com.realnet.codeextractor.repository.NamingConvension_Repository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@RestController
@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = { "Naming Convension" })
public class NamingConvensionController {
@Autowired
private NamingConvension_Repository namingConvensionRepository;
// @Autowired
// private TokenUtil tokenUtil;
// GET ALL
@ApiOperation(value = "List of Naming", response = NamingConvension.class)
@GetMapping("/naming-convension")
public ResponseEntity<?> getAll() {
List<NamingConvension> namingConvension = namingConvensionRepository.findAll();
return ResponseEntity.status(HttpStatus.OK).body(namingConvension);
}
// // GET BY ID
// @ApiOperation(value = "Get a Form", response = NamingConvension.class)
// @GetMapping("/form_setup/{id}")
// public ResponseEntity<NamingConvension> getFormsById(@PathVariable(value = "id") int id) {
// NamingConvension NamingConvension = NamingConvension_service.getById(id);
// return ResponseEntity.ok().body(NamingConvension);
// }
// // SAVE
// @ApiOperation(value = "naming-convension", response = NamingConvension.class)
// @PostMapping("/naming-convension")
// public ResponseEntity<NamingConvension> create(
// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
// @Valid @RequestBody NamingConvension namingConvension) {
// NamingConvension savedNamingConvension = namingConvensionRepository.save(namingConvension);
// return ResponseEntity.status(HttpStatus.CREATED).body(savedNamingConvension);
// }
// // UPDATE
// @ApiOperation(value = "Update A Form", response = NamingConvension.class)
// @PutMapping("/form_setup/{id}")
// public ResponseEntity<NamingConvension> updateNamingConvension(
// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
// @PathVariable(value = "id") Integer id, @Valid @RequestBody List<NamingConvension> NamingConvensionRequest) {
//
// NamingConvension namingConvension = namingConvensionRepository.findById(id).get();
//
//
// NamingConvension updatedNamingConvension = namingConvensionRepository.update(id, NamingConvension);
// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedNamingConvension);
// }
}

View File

@ -0,0 +1,161 @@
package com.realnet.codeextractor.controller;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.FileUtils;
import org.json.simple.parser.ParseException;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.codeextractor.service.Rule_library_service_gk;
@RestController
@RequestMapping("/codeextractor/rulelib_new")
public class RuleLibraryNew_gk {
@Autowired
private Rule_library_service_gk rule_service;
@GetMapping("/test13")
public ResponseEntity<?> getKeysInJsonUsingMaps(@RequestParam String keyword) throws ParseException, IOException {
//ENTITY
if (keyword.contains("entity_package")) {
String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java";
String start ="package com";
String end =";\r\n"
+ "\r\n"
+ "import javax.persistence.GeneratedValue;";
String replaceWith ="Test_1";
rule_service.rule(path,start,end,replaceWith);
}
if (keyword.contains("ENTITYCLASS")) {
String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java";
String start ="public class";
String end ="{";
String replaceWith ="Test";
rule_service.rule(path,start,end,replaceWith);
}
if (keyword.contains("entity_loop")) {
String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java";
String start ="private int id;";
String end ="}";
String replaceWith =" \nfor (int i = 0; i < entityname.size(); i++) {\r\n"
+ " String string = entityname.get(i);\r\n"
+ " String lowerCase = string.replaceAll(\" \", \"_\").toLowerCase();\r\n"
+ " String add = \"\\n private \" + \"String\" + \" \" + lowerCase + \";\";\r\n"
+ " entityclass.append(add);\r\n"
+ " }";
rule_service.rule(path,start,end,replaceWith);
}
//REPOSITORY
if (keyword.contains("repo_class")) {
String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Repository/AbcRepository.java";
String start ="public interface";
String end ="JpaRepository<Abc, Long> { ";
String replaceWith ="Test_1";
rule_service.rule(path,start,end,replaceWith);
}
//SERVICE
if (keyword.contains("service_class")) {
String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Services/AbcService.java";
String start ="public class";
String end ="{";
String replaceWith ="Test_1";
rule_service.rule(path,start,end,replaceWith);
}
if (keyword.contains("service_body")) {
String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Services/AbcService.java";
File staticFile = new File(path);
String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8);
int length = fileString.length();
String start ="@Autowired";
String end ="";
String replaceWith ="sericeclass.append(\"\\r\\n\" + \"private \" + table_name + addString + \"Repository \" + \"Repository;\\n\");\r\n"
+ "\r\n"
+ " sericeclass.append(\"public \" + table_name + addString + \" Savedata(\" + table_name + addString + \" data) {\\r\\n\"\r\n"
+ " + \" return Repository.save(data); \\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \" \\r\\n\"\r\n"
+ " + \"public List<\" + table_name + addString + \"> getdetails() {\\r\\n\" + \" return (List<\"\r\n"
+ " + table_name + addString + \">) Repository.findAll();\\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \"\\r\\n\"\r\n"
+ " + \"public \" + table_name + addString + \" getdetailsbyId(Long id) {\\r\\n\"\r\n"
+ " + \" return Repository.findById(id).get();\\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \"\\r\\n\"\r\n"
+ " + \" public void delete_by_id(Long id) {\\r\\n\" + \" Repository.deleteById(id);\\r\\n\" + \"}\\r\\n\" + \"\\r\\n\"\r\n"
+ " + \"\\r\\n\");\r\n"
+ "\r\n"
+ " sericeclass.append(\"public \" + table_name + addString + \" update(\" + table_name + addString\r\n"
+ " + \" data,Long id) {\\n\" + \" \" + table_name + addString + \" old = Repository.findById(id).get();\\n\");\r\n"
+ " for (int i = 0; i < entityname.size(); i++) {\r\n"
+ " String name1 = entityname.get(i);\r\n"
+ " String name3 = name1.replaceAll(\" \", \"_\").toLowerCase();\r\n"
+ " String string = name3.substring(0, 1).toUpperCase() + name3.substring(1);\r\n"
+ " sericeclass.append(\"old.set\" + string + \"(data.get\" + string + \"());\\r\\n\");\r\n"
+ " }\r\n"
+ " sericeclass.append(\"final \" + table_name + addString + \" test = Repository.save(old);\\r\\n\"\r\n"
+ " + \" return test;\" + \"}}\" + \"\");\r\n"
+ "";
rule_service.rule(path,start,end,replaceWith);
}
//CONTROLLER
if (keyword.contains("controller_class")) {
String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Controllers/AbcController.java";
String start ="public class";
String end ="{";
String replaceWith ="Test_1";
rule_service.rule(path,start,end,replaceWith);
}
if (keyword.contains("controller_body")) {
String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Controllers/AbcController.java";
String start ="@Autowired";
String end ="";
String replaceWith ="controllerclass.append(\"\r\n"
+ " + \" private \" + table_name + addString + \"Service Service;\\n\\n\"\r\n"
+ "\r\n"
+ " + \" @PostMapping(\" + \"\\\"/\" + table_name + \"\\\")\\r\\n\" + \" public \" + table_name + addString\r\n"
+ " + \" Savedata(@RequestBody \" + table_name + addString + \" data) {\\r\\n\" + \" \" + table_name\r\n"
+ " + addString + \" save = Service.Savedata(data) ;\\r\\n\" + \" return save;\\r\\n\" + \" }\\r\\n\"\r\n"
+ " + \" \\r\\n\" + \" \\r\\n\" + \" @GetMapping(\\\"/\" + table_name + \"\\\")\\r\\n\" + \" public List<\"\r\n"
+ " + table_name + addString + \"> getdetails() {\\r\\n\" + \" List<\" + table_name + addString\r\n"
+ " + \"> get = Service.getdetails(); \\r\\n\" + \" return get;\\r\\n}\\n\" + \"@GetMapping(\\\"/\"\r\n"
+ " + table_name + \"/{id}\\\")\\r\\n\" + \" public \" + table_name + addString\r\n"
+ " + \" getdetailsbyId(@PathVariable Long id ) {\\r\\n\" + \" \" + table_name + addString\r\n"
+ " + \" get = Service.getdetailsbyId(id);\\r\\n\" + \" return get;\\r\\n\" + \" }\\n\" + \"@DeleteMapping(\\\"/\"\r\n"
+ " + table_name + \"/{id}\\\")\\r\\n\" + \" public void delete_by_id(@PathVariable Long id ) {\\r\\n\"\r\n"
+ " + \" Service.delete_by_id(id);\\r\\n\" + \" \\r\\n\" + \" }\\n\" + \"@PutMapping(\\\"/\" + table_name\r\n"
+ " + \"/{id}\\\")\\r\\n\" + \" public \" + table_name + addString + \" update(@RequestBody \" + table_name\r\n"
+ " + addString + \" data,@PathVariable Long id ) {\\r\\n\" + \" \" + table_name + addString\r\n"
+ " + \" update = Service.update(data,id);\\r\\n\" + \" return update;\\r\\n\" + \" }\\n}\");\r\n"
+ "";
rule_service.rule(path,start,end,replaceWith);
}
return new ResponseEntity<>("created", HttpStatus.CREATED);
}
}

View File

@ -0,0 +1,378 @@
package com.realnet.codeextractor.controller;
import java.util.List;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
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.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.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules;
import com.realnet.codeextractor.entity.Rn_Bcf_Rules;
import com.realnet.codeextractor.entity.RuleCopyDTO;
import com.realnet.codeextractor.response.ExceptionRuleLibraryResponse;
import com.realnet.codeextractor.response.RuleLibraryResponse;
import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service;
import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service;
import com.realnet.fnd.entity.Error;
import com.realnet.fnd.entity.ErrorPojo;
import com.realnet.fnd.entity.Success;
import com.realnet.fnd.entity.SuccessPojo;
import com.realnet.userDTO.User;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserService;
import com.realnet.utils.Constant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = { "Rule Library" })
public class Rule_Library_Controller {
@Autowired
private AppUserService userService;
@Autowired
private Rn_Bcf_Rule_Library_Service ruleLibraryService;
@Autowired
private Rn_Bcf_Exception_Rule_Library_Service exceptionRuleLibraryService;
// @Autowired
// private TokenUtil tokenUtil;
// ==== RULE LIBRARY AND EXCEPTION RULE LIBRARY REST APIS ==== //
// COPY RULES
@ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Rules.class)
@PostMapping("/rule-copy")
public ResponseEntity<?> copyRule(@Valid @RequestBody RuleCopyDTO ruleReq) {
AppUser user = userService.getLoggedInUser();
Long userId = user.getUserId();
Long accId = user.getAccount().getAccount_id();
String from_tech_stack = ruleReq.getFrom_tech_stack();
String from_object_type = ruleReq.getFrom_object_type();
String from_sub_object_type = ruleReq.getFrom_sub_object_type();
String to_tech_stack = ruleReq.getTo_tech_stack();
String to_object_type = ruleReq.getTo_object_type();
String to_sub_object_type = ruleReq.getTo_sub_object_type();
// GET ALL RULES
List<Rn_Bcf_Rules> rules = ruleLibraryService.copyRules2(from_tech_stack, from_object_type, from_sub_object_type);
log.debug("RULE COPPIED {}", rules);
for (Rn_Bcf_Rules rule : rules) {
Rn_Bcf_Rules newRule = new Rn_Bcf_Rules();
newRule.setCreatedBy(userId);
newRule.setAccountId(accId);
newRule.setGroup_id(rule.getGroup_id());
newRule.setFile_code(rule.getFile_code());
newRule.setRule_name(rule.getRule_name());
newRule.setRule_type(rule.getRule_type());
newRule.setTech_stack(to_tech_stack);
newRule.setObject_type(to_object_type);
newRule.setSub_object_type(to_sub_object_type);
newRule.setIdentifier_start_string(rule.getIdentifier_start_string());
newRule.setIdentifier_end_string(rule.getIdentifier_end_string());
newRule.setReplacement_string(rule.getReplacement_string());
Rn_Bcf_Rules savedRule = ruleLibraryService.save(newRule);
log.debug("SAVED RULE {}", savedRule);
if (savedRule == null) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.RULE_NOT_CREATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
}
// GET ALL
@ApiOperation(value = "List of Rules", response = RuleLibraryResponse.class)
@GetMapping("/rule-library")
public RuleLibraryResponse getAllRules(
@RequestParam(value = "page", defaultValue = "0", required = false) Integer page,
@RequestParam(value = "size", defaultValue = "20", required = false) Integer size) {
RuleLibraryResponse resp = new RuleLibraryResponse();
Pageable paging = PageRequest.of(page, size);
Page<Rn_Bcf_Rules> result = ruleLibraryService.getAll(paging);
resp.setPageStats(result, true);
resp.setItems(result.getContent());
return resp;
}
// GET BY ID
@ApiOperation(value = "Get a Rule", response = Rn_Bcf_Rules.class)
@GetMapping("/rule-library/{id}")
public ResponseEntity<Rn_Bcf_Rules> getRuleDetails(@PathVariable(value = "id") int id) {
Rn_Bcf_Rules rule = ruleLibraryService.getById(id);
return ResponseEntity.ok().body(rule);
}
// SAVE
@ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Rules.class)
@PostMapping("/rule-library")
public ResponseEntity<?> createRule(
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
@Valid @RequestBody Rn_Bcf_Rules bcf_rule) {
// String userId = tokenUtil.getUserId(authToken);
// rn_forms_setup.setCreatedBy(userId);
// rn_forms_setup.setAccountId(userId);
Long userId = userService.getLoggedInUserId();
bcf_rule.setCreatedBy(userId);
Rn_Bcf_Rules savedRule = ruleLibraryService.save(bcf_rule);
if (savedRule == null) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.RULE_NOT_CREATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
}
/* for testing purpose */
// SAVE LIST OF DATA
@ApiOperation(value = "Add AList Of New Rules", response = Rn_Bcf_Rules.class)
@PostMapping("/rule-library/all")
public ResponseEntity<?> createListOfRules(@RequestBody List<@Valid Rn_Bcf_Rules> bcf_rule) {
for (Rn_Bcf_Rules rule : bcf_rule) {
Long userId = userService.getLoggedInUserId();
rule.setCreatedBy(userId);
Rn_Bcf_Rules savedRule = ruleLibraryService.save(rule);
if (savedRule == null) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.RULE_NOT_CREATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
}
// UPDATE
@ApiOperation(value = "Update A Form", response = Rn_Bcf_Rules.class)
@PutMapping("/rule-library/{id}")
public ResponseEntity<?> updateRule(
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
@PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Bcf_Rules rule) {
// String userId = tokenUtil.getUserId(authToken);
// rn_forms_setup.setUpdatedBy(userId);
Long userId = userService.getLoggedInUserId();
rule.setUpdatedBy(userId);
Rn_Bcf_Rules updatedRule = ruleLibraryService.updateById(id, rule);
if (id != updatedRule.getId()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.RULE_NOT_UPDATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.RULE_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// DELETE
@DeleteMapping("/rule-library/{id}")
public ResponseEntity<?> deleteRule(@PathVariable(value = "id") Integer id) {
boolean deleted = ruleLibraryService.deleteById(id);
if (deleted) {
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.RULE_DELETED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
} else {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.RULE_NOT_DELETED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
}
// =========== EXCEPTION RULE =================== //
// GET ALL
@ApiOperation(value = "List of Exception Rules", response = ExceptionRuleLibraryResponse.class)
@GetMapping("/exception-rule-library")
public ExceptionRuleLibraryResponse getAllExceptionRules(
@RequestParam(value = "page", defaultValue = "0", required = false) Integer page,
@RequestParam(value = "size", defaultValue = "20", required = false) Integer size) {
ExceptionRuleLibraryResponse resp = new ExceptionRuleLibraryResponse();
Pageable paging = PageRequest.of(page, size);
Page<Rn_Bcf_Exception_Rules> result = exceptionRuleLibraryService.getAll(paging);
resp.setPageStats(result, true);
resp.setItems(result.getContent());
return resp;
}
// GET BY ID
@ApiOperation(value = "Get a Exception Rule", response = Rn_Bcf_Exception_Rules.class)
@GetMapping("/exception-rule-library/{id}")
public ResponseEntity<Rn_Bcf_Exception_Rules> getExceptionRuleDetails(@PathVariable(value = "id") int id) {
Rn_Bcf_Exception_Rules rule = exceptionRuleLibraryService.getById(id);
return ResponseEntity.ok().body(rule);
}
// SAVE
@ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Exception_Rules.class)
@PostMapping("/exception-rule-library")
public ResponseEntity<?> createExceptionRule(
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
@Valid @RequestBody Rn_Bcf_Exception_Rules bcf_rule) {
// String userId = tokenUtil.getUserId(authToken);
// rn_forms_setup.setCreatedBy(userId);
// rn_forms_setup.setAccountId(userId);
Long userId = userService.getLoggedInUserId();
bcf_rule.setCreatedBy(userId);
Rn_Bcf_Exception_Rules savedRule = exceptionRuleLibraryService.save(bcf_rule);
if (savedRule == null) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.EXCEPTION_RULE_NOT_CREATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.EXCEPTION_RULE_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
}
/* for testing purpose */
// SAVE LIST OF DATA
@ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Exception_Rules.class)
@PostMapping("/exception-rule-library/all")
public ResponseEntity<?> createListOfExceptionRule(@RequestBody List<@Valid Rn_Bcf_Exception_Rules> bcf_rule) {
Long userId = userService.getLoggedInUserId();
for (Rn_Bcf_Exception_Rules rule : bcf_rule) {
rule.setCreatedBy(userId);
Rn_Bcf_Exception_Rules savedRule = exceptionRuleLibraryService.save(rule);
if (savedRule == null) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.EXCEPTION_RULE_NOT_CREATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.EXCEPTION_RULE_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
}
// UPDATE
@ApiOperation(value = "Update A Form", response = Rn_Bcf_Exception_Rules.class)
@PutMapping("/exception-rule-library/{id}")
public ResponseEntity<?> updateExcetionRule(
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
@PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Bcf_Exception_Rules rule) {
// String userId = tokenUtil.getUserId(authToken);
// rn_forms_setup.setUpdatedBy(userId);
Long userId = userService.getLoggedInUserId();
rule.setUpdatedBy(userId);
Rn_Bcf_Exception_Rules updatedRule = exceptionRuleLibraryService.updateById(id, rule);
if (id != updatedRule.getId()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.EXCEPTION_RULE_NOT_UPDATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.EXCEPTION_RULE_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// DELETE
@DeleteMapping("/exception-rule-library/{id}")
public ResponseEntity<?> deleteExceptionRule(@PathVariable(value = "id") Integer id) {
boolean deleted = exceptionRuleLibraryService.deleteById(id);
if (deleted) {
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
success.setMessage(Constant.EXCEPTION_RULE_DELETED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
} else {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE);
error.setMessage(Constant.EXCEPTION_RULE_NOT_DELETED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
}
}

View File

@ -0,0 +1,53 @@
package com.realnet.codeextractor.controller;
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.codeextractor.entity.Rule_library_keyword;
import com.realnet.codeextractor.service.Rule_library_keywordService;
@RequestMapping(value = "/code_extractor/rule_keyword")
@RestController
public class Rule_library_keywordController {
@Autowired
private Rule_library_keywordService Service;
@PostMapping("/Rule_library_keyword")
public Rule_library_keyword Savedata(@RequestBody Rule_library_keyword data) {
Rule_library_keyword save = Service.Savedata(data);
return save;
}
@GetMapping("/Rule_library_keyword")
public List<Rule_library_keyword> getdetails() {
List<Rule_library_keyword> get = Service.getdetails();
return get;
}
@GetMapping("/Rule_library_keyword/{id}")
public Rule_library_keyword getdetailsbyId(@PathVariable Integer id) {
Rule_library_keyword get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/Rule_library_keyword/{id}")
public void delete_by_id(@PathVariable Integer id) {
Service.delete_by_id(id);
}
@PutMapping("/Rule_library_keyword/{id}")
public Rule_library_keyword update(@RequestBody Rule_library_keyword data, @PathVariable Integer id) {
Rule_library_keyword update = Service.update(data, id);
return update;
}
}

View File

@ -0,0 +1,164 @@
package com.realnet.codeextractor.controller;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
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.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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params;
import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service;
import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service;
import com.realnet.fnd.entity.ErrorPojo;
import com.realnet.fnd.entity.Success;
import com.realnet.fnd.entity.SuccessPojo;
import com.realnet.utils.Constant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = { "Code Extractor" })
public class StaticCodeExtractionController {
@Value("${projectPath}")
private String projectPath;
@Autowired
private Rn_Bcf_Extractor_Service bcf_extractorService;
@Autowired
private Rn_Bcf_Extractor_Params_Service bcf_extractor_params_service;
@ApiOperation(value = "Static Code Extraction")
@GetMapping(value = "/static_code_extraction")
public ResponseEntity<?> staticCodeExtraction(@RequestParam(value = "header_id") Integer headerId) throws IOException {
Rn_Bcf_Extractor bcf_extractor = bcf_extractorService.getById(headerId);
List<Rn_Bcf_Extractor_Params> bcf_extractor_params_t_values = bcf_extractor.getRn_bcf_extractor_Params();
log.debug("bcf_extractor_params_t_values {}", bcf_extractor_params_t_values);
List<Rn_Bcf_Extractor_Params> bcf_extractor_params = bcf_extractor_params_service.getByHeaderId(headerId);
log.debug("bcf_extractor_params {}", bcf_extractor_params);
for (Rn_Bcf_Extractor_Params params : bcf_extractor_params_t_values) {
String path = params.getMoved_address_string();
boolean is_extraction_enabled = params.isIs_extraction_enabled();
boolean is_creation_enabled = params.isIs_creation_enabled();
if (is_creation_enabled && is_extraction_enabled) {
try {
File file = new File(path);
// STEP 1. CONVERT THE FILE INTO STRING
String fileContents = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
//if (!fileContents.isEmpty()) {
fileContents = fileContents.replace("\\", "\\\\");
fileContents = fileContents.replace("\"", (File.separator + "\""));
// STEP 2. CREATE A TEMP FILE AND WRITE THE CONVERTED STRING
String parentPath = file.getParent();
String name = file.getName();
String fileName = "temp_" + name;
File tempFile = new File(parentPath + File.separator + fileName);
if (tempFile.createNewFile()) {
System.out.println("------ TEMP FILE CREATED-------\n" + tempFile.getAbsolutePath());
}
BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));
writer.write(fileContents);
writer.close();
System.out.println("Successfully wrote to the file...");
StringBuilder code = new StringBuilder();
// STEP 3. READ THE TEMP FILE AND MAKE IT "STRING"
BufferedReader br = new BufferedReader(new FileReader(tempFile));
String line = br.readLine();
while (line != null) {
code.append("\"" + line + "\" + \"\\r\\n\" + \r\n");
line = br.readLine();
}
br.close();
// STEP 4: REMOVING WHITE SPACE
String finalString = code.toString().trim();
if (!finalString.isEmpty()) {
// STEP 5: REMOVING LAST CHARS(+ "\r\n" +)
finalString = finalString.substring(0, finalString.length() - 10);
// System.out.println(finalString);
}
boolean deleted = tempFile.delete();
if(deleted) {
log.info(tempFile.getName(), "{} File deleted");
}
// MODIFIED NAME
// CONVERT EVERY FILE INTO .JAVA FILE
// String ext = FilenameUtils.getExtension(name);
// String fileNameWithOutExt = FilenameUtils.removeExtension(name);
String ConvertedFileName = "SE_" + name;
// STAIC CODE OUTPUT DIRECTORY & PATH
String staticDirString = parentPath + File.separator + "static_code";
File staticDir = new File(staticDirString);
if (!staticDir.exists()) {
staticDir.mkdir();
}
File staticFile = new File(staticDirString + File.separator + ConvertedFileName);
System.out.println("FILES WITH STATIC CODE DIRECTORY = " + staticFile);
if (!staticFile.exists()) {
staticFile.createNewFile();
}
BufferedWriter writer2 = new BufferedWriter(new FileWriter(staticFile.getAbsoluteFile()));
writer2.write(finalString);
writer2.close();
/*
* //===========DELETE MAIN FILES=========== if(deleted) { file.delete();
* logger.info("Deleted = " + file.getName() + " File"); }
*/
//}
} catch (FileNotFoundException e) {
log.error("File Not Found... " + e);
ErrorPojo errorPojo = new ErrorPojo();
com.realnet.fnd.entity.Error error = new com.realnet.fnd.entity.Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.STATIC_EXTRACTION_FAILED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
}
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.STATIC_EXTRACTION_SUCCESS);
successPojo.setSuccess(success);
log.debug("Response {} ", successPojo);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
}

View File

@ -0,0 +1,295 @@
package com.realnet.codeextractor.controller;
import java.io.File;
import java.io.FileDescriptor;
import java.io.IOException;
import java.util.List;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
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.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.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.realnet.codeextractor.entity.ActiveTechStack_DTO;
import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1;
import com.realnet.codeextractor.repository.Rn_Bcf_TechnologyStack_Repository1;
import com.realnet.codeextractor.response.TechnologyStackResponse;
import com.realnet.codeextractor.service.Rn_Bcf_TechnologyStack_Service;
import com.realnet.fnd.entity.Error;
import com.realnet.fnd.entity.ErrorPojo;
import com.realnet.fnd.entity.Success;
import com.realnet.fnd.entity.SuccessPojo;
import com.realnet.fnd.service.FileStorageService;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserService;
import com.realnet.utils.Constant;
import com.realnet.utils.RealNetUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.lingala.zip4j.ZipFile;
import net.lingala.zip4j.exception.ZipException;
@JsonIgnoreProperties(ignoreUnknown = true)
@Slf4j
@RestController
@RequestMapping(value = "/codeextractor/technologystack", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = { "Technology Stack" })
public class TechnologyStackController_codeextractor {
@Autowired
private AppUserService userService;
@Autowired
private FileStorageService fileStorageService;
@Autowired
private Rn_Bcf_TechnologyStack_Service technologyStackService;
@Autowired
private Rn_Bcf_TechnologyStack_Repository1 technologyStackRepo;
@Value("${projectPath}")
private String projectPath;
// GET ALL SORTED AND PAGINATED DATA
@ApiOperation(value = "List of Technology Stack", response = Rn_Bcf_Technology_Stack1.class)
@GetMapping("/technology-stack")
public TechnologyStackResponse getTechnologyStack(
@RequestParam(value = "page", defaultValue = "0", required = false) Integer page,
@RequestParam(value = "size", defaultValue = "20", required = false) Integer size) {
// sorted data
Pageable paging = PageRequest.of(page, size, Sort.by(Constant.SORT_BY_CREATION_DATE).descending());
Page<Rn_Bcf_Technology_Stack1> result = technologyStackService.getAll(paging);
System.out.println("ganesh bute"+result.getContent());
TechnologyStackResponse resp = new TechnologyStackResponse();
resp.setPageStats(result, true);
resp.setItems(result.getContent());
return resp;
}
// GET BY ID
@ApiOperation(value = "Get A Technology Stack", response = Rn_Bcf_Technology_Stack1.class)
@GetMapping("/technology-stack/{id}")
public ResponseEntity<?> getTechnologyStackDetails(@PathVariable(value = "id") int id) {
Rn_Bcf_Technology_Stack1 bcf_tech_stack = technologyStackService.getById(id);
// Map<String, Rn_Bcf_Technology_Stack1> extractorMap =
// Collections.singletonMap("extractior", bcf_extractor);
// return new ResponseEntity<Map<String, Rn_Bcf_Technology_Stack1>>(extractorMap,
// HttpStatus.OK);
// return ResponseEntity.ok().body(bcf_extractor);
return new ResponseEntity<Rn_Bcf_Technology_Stack1>(bcf_tech_stack, HttpStatus.OK);
}
// ========= SAVE AND UNZIP FILE AND MOVE TO A SPECIFIC PATH ========
@ApiOperation(value = "Add new Technology Stack")
@PostMapping(value = "/technology-stack")
public ResponseEntity<?> saveTechnologyStack(// @Valid @RequestBody Rn_Bcf_Technology_Stack1 bcf_extractor,
@RequestParam(value = "bcf_technology_stack", required = true) String techStackRequest,
@RequestParam(value = "file", required = true) MultipartFile file)
throws IOException, JsonParseException, JsonMappingException {
System.out.println("techStackRequest = " + techStackRequest);
System.out.println("file = " + file.getOriginalFilename());
log.debug("techStackRequest => {} ", techStackRequest);
log.debug("file => {} ", file.getOriginalFilename());
ObjectMapper mapper = new ObjectMapper();
mapper.configOverride(FileDescriptor.class).setIsIgnoredType(true);
//mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, true);
mapper.setVisibility(mapper.getVisibilityChecker()
.withFieldVisibility(JsonAutoDetect.Visibility.ANY));
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
Rn_Bcf_Technology_Stack1 bcf_tech_stack = mapper.readValue(techStackRequest, Rn_Bcf_Technology_Stack1.class);
log.debug("bcf_tech_stack => {}", bcf_tech_stack);
AppUser loggedInUser = userService.getLoggedInUser();
bcf_tech_stack.setAccountId(loggedInUser.getAccount().getAccount_id());
bcf_tech_stack.setCreatedBy(loggedInUser.getUserId());
String techStackKey = RealNetUtils.getTechnologyStackKey(bcf_tech_stack.getTech_stack());
bcf_tech_stack.setTech_stack_key(techStackKey);
// upload to directory
String uploadPath = projectPath.concat("/src/main/resources/technology-stack-zip-uploads/");
fileStorageService.uploadFile(file, uploadPath);
String fileName = file.getOriginalFilename();
String folderName = fileName.substring(0, fileName.lastIndexOf("."));
System.out.println("UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileName + "\nFile Size = " + file.getSize());
// SAVE ZIP FILE NAME INTO DATABASE
bcf_tech_stack.setBase_prj_file_name(folderName);
bcf_tech_stack.setActive(false);
System.out.println("before save");
Rn_Bcf_Technology_Stack1 savedTechnology = technologyStackService.save(bcf_tech_stack);
System.out.println("after save");
if (savedTechnology == null) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE);
error.setMessage(Constant.TECHNOLOGY_STACK_NOT_CREATED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
/*
* ZIP TO UNZIP
*/
// ZIP FILE BASE PATH
String zipFilePath = uploadPath + fileName;
String tech_stack = savedTechnology.getTech_stack();
// UNZIP DESTINATION PATH
String destPath = projectPath.concat("/BaseProject/" + tech_stack);
File path = new File(destPath);
if (!path.exists()) {
path.mkdirs();
}
System.out.println("ZIP FILE PATH = " + zipFilePath + "\nDESTINATION PATH = " + destPath);
try {
ZipFile zipFile = new ZipFile(zipFilePath);
zipFile.extractAll(destPath);
} catch (ZipException e) {
e.printStackTrace();
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE);
error.setMessage(Constant.UNZIP_EXCEPTION);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE);
success.setMessage(Constant.TECHNOLOGY_STACK_CREATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.CREATED);
}
// UPDATE
@ApiOperation(value = "Update Technology Stack", response = Rn_Bcf_Technology_Stack1.class)
@PutMapping("/technology-stack/{id}")
public ResponseEntity<?> updateTechnology(
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken,
@PathVariable(value = "id") int id, @Valid @RequestBody Rn_Bcf_Technology_Stack1 bcf_tech_stack) {
AppUser loggedInUser = userService.getLoggedInUser();
bcf_tech_stack.setUpdatedBy(loggedInUser.getUserId());
Rn_Bcf_Technology_Stack1 updatedTech = technologyStackService.updateById(id, bcf_tech_stack);
if (bcf_tech_stack.getId() != updatedTech.getId()) {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.EXTRACTOR_API_TITLE);
error.setMessage(Constant.EXTRACTOR_NOT_DELETED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.EXTRACTOR_API_TITLE);
success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// DELETE
@DeleteMapping("/technology-stack/{id}")
public ResponseEntity<?> deleteTechnologyStack(@PathVariable(value = "id") int id) {
boolean deleted = technologyStackService.deleteById(id);
if (deleted) {
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE);
success.setMessage(Constant.TECHNOLOGY_STACK_DELETED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
} else {
ErrorPojo errorPojo = new ErrorPojo();
Error error = new Error();
error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE);
error.setMessage(Constant.TECHNOLOGY_STACK_NOT_DELETED);
errorPojo.setError(error);
return new ResponseEntity<ErrorPojo>(errorPojo, HttpStatus.EXPECTATION_FAILED);
}
}
// ACTIVE
@GetMapping(value = "/tech-stack-active")
public ResponseEntity<?> technologyActive(@RequestParam(value = "id") int id) throws IOException {
//log.info("technologyActive controller start {}", id);
AppUser loggedInUser = userService.getLoggedInUser();
Rn_Bcf_Technology_Stack1 tech_stack = technologyStackService.getById(id);
log.debug("TECH STACK : {} ", tech_stack);
if (tech_stack.isActive() == false) {
tech_stack.setActive(true);
} else if (tech_stack.isActive()) {
tech_stack.setActive(false);
}
//tech_stack.setActive(!tech_stack.isActive()); // LOL
tech_stack.setUpdatedBy(loggedInUser.getUserId());
Rn_Bcf_Technology_Stack1 tech = technologyStackService.save(tech_stack);
log.debug("UPDATED TECH STACK : {} ", tech);
System.out.println("UPDATED TECH STACK : " + tech);
SuccessPojo successPojo = new SuccessPojo();
Success success = new Success();
success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE);
success.setMessage(Constant.TECHNOLOGY_STACK_UPDATED_SUCCESSFULLY);
successPojo.setSuccess(success);
return new ResponseEntity<SuccessPojo>(successPojo, HttpStatus.OK);
}
// get activate technology stack list (id and name)
@ApiOperation(value = "Get Activate Technology Stack List ", response = ActiveTechStack_DTO.class)
@GetMapping("/active-technology")
@ResponseBody
public List<ActiveTechStack_DTO> getActiveTechnology() {
//List<Rn_Bcf_Technology_Stack1> technologyStack = technologyStackService.getAll();
List<ActiveTechStack_DTO> activeTechDTO = technologyStackService.getListOfActivateTechnology();
return activeTechDTO;
}
}

View File

@ -0,0 +1,23 @@
package com.realnet.codeextractor.entity;
import lombok.Data;
@Data
public class ActiveTechStack_DTO {
private int id;
private String Name;
// public Integer getId() {
// return id;
// }
// public void setId(Integer id) {
// this.id = id;
// }
// public Integer getName() {
// return Name;
// }
// public void setName(Integer name) {
// Name = name;
// }
}

View File

@ -0,0 +1,12 @@
package com.realnet.codeextractor.entity;
import java.io.Serializable;
import lombok.Data;
@Data
public class FileDetails implements Serializable {
private static final long serialVersionUID = 1L;
private int id;
private String text;
}

View File

@ -0,0 +1,15 @@
package com.realnet.codeextractor.entity;
import java.io.Serializable;
import lombok.Data;
@Data
public class FileListDto implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private int id;
private String fileName;
}

View File

@ -0,0 +1,27 @@
package com.realnet.codeextractor.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
@Data
@Entity
@Table(name = "NAMING_CONVENSION")
public class NamingConvension {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Integer id;
@Column(name = "VARIABLE_NAME")
private String variableName;
@Column(name = "OBJECT_NAME_DYNAMIC_STRING")
private String objectNameDynamicString;
}

View File

@ -0,0 +1,132 @@
package com.realnet.codeextractor.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.realnet.fnd.entity.Rn_Who_AccId_Column;
import lombok.ToString;
@ToString
@Entity
@Table(name = "RN_BCF_EXCEPTION_RULES")
public class Rn_Bcf_Exception_Rules extends Rn_Who_AccId_Column {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Integer id;
@Column(name = "TECH_STACK")
private String tech_stack;
@Column(name = "OBJECT_TYPE")
private String object_type;
@Column(name = "SUB_OBJECT_TYPE")
private String sub_object_type;
@Column(name = "OBJECT_NAME_VARIABLE")
private String object_name_variable;
@Column(name = "OBJECT_NAME_DYNAMIC_STRING")
private String object_name_dynamic_string;
public Rn_Bcf_Exception_Rules() {
super();
// TODO Auto-generated constructor stub
}
public Rn_Bcf_Exception_Rules(Integer id, String tech_stack, String object_type, String sub_object_type,
String object_name_variable, String object_name_dynamic_string) {
super();
this.id = id;
this.tech_stack = tech_stack;
this.object_type = object_type;
this.sub_object_type = sub_object_type;
this.object_name_variable = object_name_variable;
this.object_name_dynamic_string = object_name_dynamic_string;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTech_stack() {
return tech_stack;
}
public void setTech_stack(String tech_stack) {
this.tech_stack = tech_stack;
}
public String getObject_type() {
return object_type;
}
public void setObject_type(String object_type) {
this.object_type = object_type;
}
public String getSub_object_type() {
return sub_object_type;
}
public void setSub_object_type(String sub_object_type) {
this.sub_object_type = sub_object_type;
}
public String getObject_name_variable() {
return object_name_variable;
}
public void setObject_name_variable(String object_name_variable) {
this.object_name_variable = object_name_variable;
}
public String getObject_name_dynamic_string() {
return object_name_dynamic_string;
}
public void setObject_name_dynamic_string(String object_name_dynamic_string) {
this.object_name_dynamic_string = object_name_dynamic_string;
}
// // WHO COLUMNS
// @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;
//
// @Temporal(TemporalType.TIMESTAMP)
// @Column(name = "UPDATED_AT", nullable = false)
// @LastModifiedDate
// private Date updatedAt;
//
// @Column(name = "CREATED_BY", updatable = false)
// private Long createdBy;
//
// @Column(name = "UPDATED_BY")
// private Long updatedBy;
//
// @Column(name = "ACCOUNT_ID")
// private Long accountId;
}

View File

@ -0,0 +1,196 @@
package com.realnet.codeextractor.entity;
import java.util.List;
import javax.persistence.CascadeType;
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.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.realnet.fnd.entity.Rn_Who_Columns;
@Entity
@Table(name = "RN_BCF_EXTRACTOR_T")
public class Rn_Bcf_Extractor extends Rn_Who_Columns {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Integer id;
@Column(name = "TECH_STACK")
private String tech_stack;
@Column(name = "TECH_STACK_KEY")
private String tech_stack_key;
@Column(name = "OBJECT_TYPE")
private String object_type;
@Column(name = "SUB_OBJECT_TYPE")
private String sub_object_type;
@Column(name = "FORM_TYPE_NAME")
private String form_type_name;
@Column(name = "STD_WF_NAME")
private String std_wf_name;
@Column(name = "ICON_FILE_NAME")
private String icon_file_name;
@Column(name = "SAMPLE_FILE_NAME")
private String sample_file_name;
@Column(name = "EXTRACTOR_STAGE")
private String extractor_stage;
@OneToMany(mappedBy = "rn_bcf_extractor", targetEntity = Rn_Bcf_Extractor_Params.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JsonManagedReference
private List<Rn_Bcf_Extractor_Params> rn_bcf_extractor_Params;
// SYSTEM ACCOUNT ID
@Column(name = "ACCOUNT_ID")
private long accountId;
public Rn_Bcf_Extractor() {
super();
}
public Rn_Bcf_Extractor(Integer id, String tech_stack, String tech_stack_key, String object_type,
String sub_object_type, String form_type_name, String std_wf_name, String icon_file_name,
String sample_file_name, String extractor_stage, List<Rn_Bcf_Extractor_Params> rn_bcf_extractor_Params,
long accountId) {
super();
this.id = id;
this.tech_stack = tech_stack;
this.tech_stack_key = tech_stack_key;
this.object_type = object_type;
this.sub_object_type = sub_object_type;
this.form_type_name = form_type_name;
this.std_wf_name = std_wf_name;
this.icon_file_name = icon_file_name;
this.sample_file_name = sample_file_name;
this.extractor_stage = extractor_stage;
this.rn_bcf_extractor_Params = rn_bcf_extractor_Params;
this.accountId = accountId;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTech_stack() {
return tech_stack;
}
public void setTech_stack(String tech_stack) {
this.tech_stack = tech_stack;
}
public String getTech_stack_key() {
return tech_stack_key;
}
public void setTech_stack_key(String tech_stack_key) {
this.tech_stack_key = tech_stack_key;
}
public String getObject_type() {
return object_type;
}
public void setObject_type(String object_type) {
this.object_type = object_type;
}
public String getSub_object_type() {
return sub_object_type;
}
public void setSub_object_type(String sub_object_type) {
this.sub_object_type = sub_object_type;
}
public String getForm_type_name() {
return form_type_name;
}
public void setForm_type_name(String form_type_name) {
this.form_type_name = form_type_name;
}
public String getStd_wf_name() {
return std_wf_name;
}
public void setStd_wf_name(String std_wf_name) {
this.std_wf_name = std_wf_name;
}
public String getIcon_file_name() {
return icon_file_name;
}
public void setIcon_file_name(String icon_file_name) {
this.icon_file_name = icon_file_name;
}
public String getSample_file_name() {
return sample_file_name;
}
public void setSample_file_name(String sample_file_name) {
this.sample_file_name = sample_file_name;
}
public String getExtractor_stage() {
return extractor_stage;
}
public void setExtractor_stage(String extractor_stage) {
this.extractor_stage = extractor_stage;
}
public List<Rn_Bcf_Extractor_Params> getRn_bcf_extractor_Params() {
return rn_bcf_extractor_Params;
}
public void setRn_bcf_extractor_Params(List<Rn_Bcf_Extractor_Params> rn_bcf_extractor_Params) {
this.rn_bcf_extractor_Params = rn_bcf_extractor_Params;
}
public long getAccountId() {
return accountId;
}
public void setAccountId(long accountId) {
this.accountId = accountId;
}
@Override
public String toString() {
return "Rn_Bcf_Extractor [id=" + id + ", tech_stack=" + tech_stack + ", tech_stack_key=" + tech_stack_key
+ ", object_type=" + object_type + ", sub_object_type=" + sub_object_type + ", form_type_name="
+ form_type_name + ", std_wf_name=" + std_wf_name + ", icon_file_name=" + icon_file_name
+ ", sample_file_name=" + sample_file_name + ", extractor_stage=" + extractor_stage
+ ", rn_bcf_extractor_Params=" + rn_bcf_extractor_Params + ", accountId=" + accountId + "]";
}
}

View File

@ -0,0 +1,39 @@
package com.realnet.codeextractor.entity;
import java.io.Serializable;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
@Data
@JsonSerialize
public class Rn_Bcf_Extractor_DTO implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private Integer id;
private String tech_stack;
private String tech_stack_key;
private String object_type;
private String sub_object_type;
private String form_type_name;
private String std_wf_name;
private String icon_file_name;
private String sample_file_name;
// private String extractor_stage;
// private long accountId;
}

View File

@ -0,0 +1,270 @@
package com.realnet.codeextractor.entity;
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.Table;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.realnet.fnd.entity.Rn_Who_Columns;
@Entity
@Table(name = "RN_BCF_EXTRACTOR_PARAMS_T")
public class Rn_Bcf_Extractor_Params extends Rn_Who_Columns {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Integer id;
// @Column(name = "HEADER_ID")
// private int header_id;
@Column(name = "TECH_STACK")
private String tech_stack;
@Column(name = "OBJECT_TYPE")
private String object_type;
@Column(name = "SUB_OBJECT_TYPE")
private String sub_object_type;
@Column(name = "FILE_CODE")
private String file_code;
@Column(name = "NAME_STRING")
private String name_string;
@Column(name = "ADDRESS_STRING")
private String address_string;
@Column(name = "MOVED_ADDRESS_STRING")
private String moved_address_string;
@Column(name = "REFERENCE_ADDRESS_STRING")
private String reference_address_string;
@Column(name = "DESCRIPTION")
private String description;
@Column(name = "FILE_NAME_VAR")
private String file_name_var;
@Column(name = "FILE_NAME_DYNAMIC_STRING")
private String file_name_dynamic_string;
@Column(name = "IS_EXTRACTION_ENABLED")
private boolean is_extraction_enabled;
@Column(name = "IS_CREATION_ENABLED")
private boolean is_creation_enabled;
@Column(name = "Total_Project_Path_Dynamic_String")
private String total_project_path_dynamic_string;
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "HEADER_ID")
@JsonBackReference
private Rn_Bcf_Extractor rn_bcf_extractor;
// @JsonIgnore
// private int headerId;
//
// public int getHeaderId() {
// return headerId;
// }
//
// public void setHeaderId(int headerId) {
// this.headerId = headerId;
// }
// SYSTEM ACCOUNT ID
@Column(name = "ACCOUNT_ID")
private long accountId;
public Rn_Bcf_Extractor_Params() {
super();
}
public Rn_Bcf_Extractor_Params(Integer id, String tech_stack, String object_type, String sub_object_type,
String file_code, String name_string, String address_string, String moved_address_string,
String reference_address_string, String description, String file_name_var, String file_name_dynamic_string,
boolean is_extraction_enabled, boolean is_creation_enabled, Rn_Bcf_Extractor rn_bcf_extractor,
long accountId,String total_project_path_dynamic_string) {
super();
this.id = id;
this.tech_stack = tech_stack;
this.object_type = object_type;
this.sub_object_type = sub_object_type;
this.file_code = file_code;
this.name_string = name_string;
this.address_string = address_string;
this.moved_address_string = moved_address_string;
this.reference_address_string = reference_address_string;
this.description = description;
this.file_name_var = file_name_var;
this.file_name_dynamic_string = file_name_dynamic_string;
this.is_extraction_enabled = is_extraction_enabled;
this.is_creation_enabled = is_creation_enabled;
this.rn_bcf_extractor = rn_bcf_extractor;
this.accountId = accountId;
this.total_project_path_dynamic_string=total_project_path_dynamic_string;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTech_stack() {
return tech_stack;
}
public void setTech_stack(String tech_stack) {
this.tech_stack = tech_stack;
}
public String getObject_type() {
return object_type;
}
public void setObject_type(String object_type) {
this.object_type = object_type;
}
public String getSub_object_type() {
return sub_object_type;
}
public void setSub_object_type(String sub_object_type) {
this.sub_object_type = sub_object_type;
}
public String getFile_code() {
return file_code;
}
public void setFile_code(String file_code) {
this.file_code = file_code;
}
public String getName_string() {
return name_string;
}
public void setName_string(String name_string) {
this.name_string = name_string;
}
public String getAddress_string() {
return address_string;
}
public void setAddress_string(String address_string) {
this.address_string = address_string;
}
public String getMoved_address_string() {
return moved_address_string;
}
public void setMoved_address_string(String moved_address_string) {
this.moved_address_string = moved_address_string;
}
public String getReference_address_string() {
return reference_address_string;
}
public void setReference_address_string(String reference_address_string) {
this.reference_address_string = reference_address_string;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getFile_name_var() {
return file_name_var;
}
public void setFile_name_var(String file_name_var) {
this.file_name_var = file_name_var;
}
public String getFile_name_dynamic_string() {
return file_name_dynamic_string;
}
public void setFile_name_dynamic_string(String file_name_dynamic_string) {
this.file_name_dynamic_string = file_name_dynamic_string;
}
public boolean isIs_extraction_enabled() {
return is_extraction_enabled;
}
public void setIs_extraction_enabled(boolean is_extraction_enabled) {
this.is_extraction_enabled = is_extraction_enabled;
}
public boolean isIs_creation_enabled() {
return is_creation_enabled;
}
public void setIs_creation_enabled(boolean is_creation_enabled) {
this.is_creation_enabled = is_creation_enabled;
}
public Rn_Bcf_Extractor getRn_bcf_extractor() {
return rn_bcf_extractor;
}
public void setRn_bcf_extractor(Rn_Bcf_Extractor rn_bcf_extractor) {
this.rn_bcf_extractor = rn_bcf_extractor;
}
public long getAccountId() {
return accountId;
}
public void setAccountId(long accountId) {
this.accountId = accountId;
}
public String getTotal_project_path_dynamic_string() {
return total_project_path_dynamic_string;
}
public void setTotal_project_path_dynamic_string(String total_project_path_dynamic_string) {
this.total_project_path_dynamic_string = total_project_path_dynamic_string;
}
@Override
public String toString() {
return "Rn_Bcf_Extractor_Params [id=" + id + ", tech_stack=" + tech_stack + ", object_type=" + object_type
+ ", sub_object_type=" + sub_object_type + ", file_code=" + file_code + ", name_string=" + name_string
+ ", address_string=" + address_string + ", moved_address_string=" + moved_address_string
+ ", reference_address_string=" + reference_address_string + ", description=" + description
+ ", file_name_var=" + file_name_var + ", file_name_dynamic_string=" + file_name_dynamic_string
+ ", is_extraction_enabled=" + is_extraction_enabled + ", is_creation_enabled=" + is_creation_enabled
+ ", accountId=" + accountId + "]";
}
}

View File

@ -0,0 +1,193 @@
package com.realnet.codeextractor.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.realnet.fnd.entity.Rn_Who_AccId_Column;
import lombok.ToString;
@ToString
@Entity
@Table(name = "RN_BCF_RULES")
public class Rn_Bcf_Rules extends Rn_Who_AccId_Column {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Integer id;
@Column(name = "GROUP_ID")
private String group_id;
@Column(name = "RULE_NAME")
private String rule_name;
@Column(name = "TECH_STACK")
private String tech_stack;
@Column(name = "OBJECT_TYPE")
private String object_type;
@Column(name = "SUB_OBJECT_TYPE")
private String sub_object_type;
@Column(name = "FILE_CODE")
private String file_code;
@Column(name = "RULE_TYPE")
private String rule_type;
// Big text
@Column(name = "IDENTIFIER_START_STRING")
private String identifier_start_string;
// Big text
@Column(name = "IDENTIFIER_END_STRING")
private String identifier_end_string;
// Big text
@Column(name = "REPLACEMENT_STRING",length = 8000)
private String replacement_string;
public Rn_Bcf_Rules() {
super();
// TODO Auto-generated constructor stub
}
public Rn_Bcf_Rules(Integer id, String group_id, String rule_name, String tech_stack, String object_type,
String sub_object_type, String file_code, String rule_type, String identifier_start_string,
String identifier_end_string, String replacement_string) {
super();
this.id = id;
this.group_id = group_id;
this.rule_name = rule_name;
this.tech_stack = tech_stack;
this.object_type = object_type;
this.sub_object_type = sub_object_type;
this.file_code = file_code;
this.rule_type = rule_type;
this.identifier_start_string = identifier_start_string;
this.identifier_end_string = identifier_end_string;
this.replacement_string = replacement_string;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getGroup_id() {
return group_id;
}
public void setGroup_id(String group_id) {
this.group_id = group_id;
}
public String getRule_name() {
return rule_name;
}
public void setRule_name(String rule_name) {
this.rule_name = rule_name;
}
public String getTech_stack() {
return tech_stack;
}
public void setTech_stack(String tech_stack) {
this.tech_stack = tech_stack;
}
public String getObject_type() {
return object_type;
}
public void setObject_type(String object_type) {
this.object_type = object_type;
}
public String getSub_object_type() {
return sub_object_type;
}
public void setSub_object_type(String sub_object_type) {
this.sub_object_type = sub_object_type;
}
public String getFile_code() {
return file_code;
}
public void setFile_code(String file_code) {
this.file_code = file_code;
}
public String getRule_type() {
return rule_type;
}
public void setRule_type(String rule_type) {
this.rule_type = rule_type;
}
public String getIdentifier_start_string() {
return identifier_start_string;
}
public void setIdentifier_start_string(String identifier_start_string) {
this.identifier_start_string = identifier_start_string;
}
public String getIdentifier_end_string() {
return identifier_end_string;
}
public void setIdentifier_end_string(String identifier_end_string) {
this.identifier_end_string = identifier_end_string;
}
public String getReplacement_string() {
return replacement_string;
}
public void setReplacement_string(String replacement_string) {
this.replacement_string = replacement_string;
}
// // WHO COLUMNS
// @Temporal(TemporalType.TIMESTAMP)
// @Column(name = "CREATED_AT", nullable = false, updatable = false)
// @CreatedDate
// private Date createdAt;
//
// @Temporal(TemporalType.TIMESTAMP)
// @Column(name = "UPDATED_AT", nullable = false)
// @LastModifiedDate
// private Date updatedAt;
//
// @Column(name = "CREATED_BY", updatable = false)
// private Long createdBy;
//
// @Column(name = "UPDATED_BY")
// private Long updatedBy;
//
// @Column(name = "ACCOUNT_ID")
// private Long accountId;
}

View File

@ -0,0 +1,106 @@
package com.realnet.codeextractor.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.realnet.fnd.entity.Rn_Who_AccId_Column;
import lombok.ToString;
@ToString
@Entity
@Table(name = "RN_BCF_TECHNOLOGY_STACK")
public class Rn_Bcf_Technology_Stack1 extends Rn_Who_AccId_Column {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Integer id;
@Column(name = "TECH_STACK")
private String tech_stack;
@Column(name = "TECH_STACK_KEY")
private String tech_stack_key;
// Big text
@Column(name = "TAGS")
private String tags;
@Column(name = "BASE_PRJ_FILE_NAME")
private String base_prj_file_name;
@Column(name = "IS_ACTIVE")
private boolean active;
public Rn_Bcf_Technology_Stack1() {
super();
}
public Rn_Bcf_Technology_Stack1(Integer id, String tech_stack, String tech_stack_key, String tags,
String base_prj_file_name, boolean active) {
super();
this.id = id;
this.tech_stack = tech_stack;
this.tech_stack_key = tech_stack_key;
this.tags = tags;
this.base_prj_file_name = base_prj_file_name;
this.active = active;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTech_stack() {
return tech_stack;
}
public void setTech_stack(String tech_stack) {
this.tech_stack = tech_stack;
}
public String getTech_stack_key() {
return tech_stack_key;
}
public void setTech_stack_key(String tech_stack_key) {
this.tech_stack_key = tech_stack_key;
}
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getBase_prj_file_name() {
return base_prj_file_name;
}
public void setBase_prj_file_name(String base_prj_file_name) {
this.base_prj_file_name = base_prj_file_name;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
}

View File

@ -0,0 +1,60 @@
package com.realnet.codeextractor.entity;
//@Data
public class RuleCopyDTO {
private String from_tech_stack;
private String from_object_type;
private String from_sub_object_type;
private String to_tech_stack;
private String to_object_type;
private String to_sub_object_type;
public String getFrom_tech_stack() {
return from_tech_stack;
}
public void setFrom_tech_stack(String from_tech_stack) {
this.from_tech_stack = from_tech_stack;
}
public String getFrom_object_type() {
return from_object_type;
}
public void setFrom_object_type(String from_object_type) {
this.from_object_type = from_object_type;
}
public String getFrom_sub_object_type() {
return from_sub_object_type;
}
public void setFrom_sub_object_type(String from_sub_object_type) {
this.from_sub_object_type = from_sub_object_type;
}
public String getTo_tech_stack() {
return to_tech_stack;
}
public void setTo_tech_stack(String to_tech_stack) {
this.to_tech_stack = to_tech_stack;
}
public String getTo_object_type() {
return to_object_type;
}
public void setTo_object_type(String to_object_type) {
this.to_object_type = to_object_type;
}
public String getTo_sub_object_type() {
return to_sub_object_type;
}
public void setTo_sub_object_type(String to_sub_object_type) {
this.to_sub_object_type = to_sub_object_type;
}
}

View File

@ -0,0 +1,34 @@
package com.realnet.codeextractor.entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Data
@Entity
public class Rule_library_keyword {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String tech_stack;
private String object_type;
private String sub_object_type;
private String version;
private String replcement_string;
private boolean isactive;
}

View File

@ -0,0 +1,14 @@
package com.realnet.codeextractor.repository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.codeextractor.entity.NamingConvension;
@Repository
public interface NamingConvension_Repository extends JpaRepository<NamingConvension, Integer> {
// for pagination
Page<NamingConvension> findAll(Pageable p);
}

View File

@ -0,0 +1,28 @@
package com.realnet.codeextractor.repository;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules;
@Repository
public interface Rn_Bcf_Exception_Rule_Library_Repository extends JpaRepository<Rn_Bcf_Exception_Rules, Integer> {
// for pagination
Page<Rn_Bcf_Exception_Rules> findAll(Pageable p);
@Query(value = "SELECT * FROM rn_bcf_exception_rules WHERE TECH_STACK =:tech_stack AND OBJECT_TYPE =:object_type AND SUB_OBJECT_TYPE =:sub_object_type", nativeQuery = true)
List<Rn_Bcf_Exception_Rules> findByType(@Param("tech_stack")String tech_stack, @Param("object_type")String object_type, @Param("sub_object_type")String sub_object_type);
// testing
//List<Rn_Bcf_Exception_Rules> findByTechStackAndObjectTypeAndSubObjectType(String tech_stack, String object_type, String sub_object_type);
// @Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true)
// List<Rn_Bcf_Extractor_Params> findByHeaderIdOrderByDate(@Param("hId") Integer headerId);
}

View File

@ -0,0 +1,30 @@
package com.realnet.codeextractor.repository;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params;
@Repository
public interface Rn_Bcf_Extractor_Params_Repository extends JpaRepository<Rn_Bcf_Extractor_Params, Integer> {
// for pagination
Page<Rn_Bcf_Extractor_Params> findAll(Pageable p);
// need modification
@Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE ACCOUNT_ID =:accId", nativeQuery = true)
List<Rn_Bcf_Extractor_Params> findByAccountId(@Param("accId") Integer id, Pageable pageable);
@Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE HEADER_ID =:hId", nativeQuery = true)
List<Rn_Bcf_Extractor_Params> findByHeaderId(@Param("hId") Integer headerId);
//@Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true)
@Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true)
List<Rn_Bcf_Extractor_Params> findByHeaderIdOrderByDate(@Param("hId") Integer headerId);
}

View File

@ -0,0 +1,14 @@
package com.realnet.codeextractor.repository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
@Repository
public interface Rn_Bcf_Extractor_Repository extends JpaRepository<Rn_Bcf_Extractor, Integer> {
// for pagination
Page<Rn_Bcf_Extractor> findAll(Pageable p);
}

View File

@ -0,0 +1,38 @@
package com.realnet.codeextractor.repository;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.realnet.codeextractor.entity.Rn_Bcf_Rules;
@Repository
public interface Rn_Bcf_Rule_Library_Repository extends JpaRepository<Rn_Bcf_Rules, Integer> {
// for pagination
Page<Rn_Bcf_Rules> findAll(Pageable p);
// @Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true)
// List<Rn_Bcf_Extractor_Params> findByHeaderIdOrderByDate(@Param("hId") Integer headerId);
// List<Rn_Bcf_Rules> getByRuleType(String tech_stack, String object_type, String sub_object_type);
//
@Query(value = "SELECT ID, GROUP_ID, RULE_NAME, ':to_tech_stack', ':to_object_type', ':to_sub_object_type', FILE_CODE, RULE_TYPE, IDENTIFIER_START_STRING, IDENTIFIER_END_STRING, REPLACEMENT_STRING FROM rn_bcf_rules WHERE TECH_STACK =:from_tech_stack AND OBJECT_TYPE =:from_object_type AND SUB_OBJECT_TYPE =:from_sub_object_type", nativeQuery = true)
public List<Rn_Bcf_Rules> copyRules(
@Param("to_tech_stack") String to_tech_stack,
@Param("to_object_type") String to_object_type,
@Param("to_sub_object_type") String to_sub_object_type,
@Param("from_tech_stack") String from_tech_stack,
@Param("from_object_type") String from_object_type,
@Param("from_sub_object_type") String from_sub_object_type);
@Query(value = "SELECT * FROM rn_bcf_rules WHERE TECH_STACK =:from_tech_stack AND OBJECT_TYPE =:from_object_type AND SUB_OBJECT_TYPE =:from_sub_object_type", nativeQuery = true)
public List<Rn_Bcf_Rules> copyRules2(@Param("from_tech_stack") String from_tech_stack,
@Param("from_object_type") String from_object_type,
@Param("from_sub_object_type") String from_sub_object_type);
}

View File

@ -0,0 +1,28 @@
package com.realnet.codeextractor.repository;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1;
@Repository
public interface Rn_Bcf_TechnologyStack_Repository1 extends JpaRepository<Rn_Bcf_Technology_Stack1, Integer> {
// for pagination
Page<Rn_Bcf_Technology_Stack1> findAll(Pageable p);
@Query(value = "SELECT * FROM rn_bcf_technology_stack WHERE IS_ACTIVE=1", nativeQuery = true)
List<Rn_Bcf_Technology_Stack1> activeTechStacks();
// List<Rn_Bcf_Technology_Stack> findByActive(@Param("status")boolean status);
// @Procedure("active_technology")
// List<Rn_Bcf_Technology_Stack> activeTechList();
// @Query(value = "call active_technology", nativeQuery = true) // call store procedure
// List<Rn_Bcf_Technology_Stack> activeTechList();
}

View File

@ -0,0 +1,11 @@
package com.realnet.codeextractor.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.realnet.codeextractor.entity.Rule_library_keyword;
@Repository
public interface Rule_library_keywordRepository extends JpaRepository<Rule_library_keyword, Integer> {
}

View File

@ -0,0 +1,18 @@
package com.realnet.codeextractor.response;
import java.util.List;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params;
import com.realnet.fnd.response.PageResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
public class CodeExtractorParamsResponse extends PageResponse {
@ApiModelProperty(required = true, value = "")
private List<Rn_Bcf_Extractor_Params> items;
}

View File

@ -0,0 +1,17 @@
package com.realnet.codeextractor.response;
import java.util.List;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
import com.realnet.fnd.response.PageResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper=false)
public class CodeExtractorResponse extends PageResponse {
@ApiModelProperty(required = true, value = "")
private List<Rn_Bcf_Extractor> items;
}

View File

@ -0,0 +1,17 @@
package com.realnet.codeextractor.response;
import java.util.List;
import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules;
import com.realnet.fnd.response.PageResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper=false)
public class ExceptionRuleLibraryResponse extends PageResponse {
@ApiModelProperty(required = true, value = "")
private List<Rn_Bcf_Exception_Rules> items;
}

View File

@ -0,0 +1,18 @@
package com.realnet.codeextractor.response;
import java.util.List;
import com.realnet.codeextractor.entity.Rn_Bcf_Extractor;
import com.realnet.codeextractor.entity.Rn_Bcf_Rules;
import com.realnet.fnd.response.PageResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper=false)
public class RuleLibraryResponse extends PageResponse {
@ApiModelProperty(required = true, value = "")
private List<Rn_Bcf_Rules> items;
}

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