-
Couldn't load subscription status.
- Fork 37
HCMPRE-2709: Integrate Geopode with Boundary Service #1583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
abishekTa-egov
wants to merge
37
commits into
geopode-adapter-dev
Choose a base branch
from
HCMPRE-2709-modified
base: geopode-adapter-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
97ed08e
Creating geopode-adapter service
tanishi-egov 1756afe
Creating geopode-adapter service - Hierarchy setup
tanishi-egov e466dc6
Boundary fetch
abishekTa-egov 0349a20
Arcgis endpoint and mdms request
abishekTa-egov 29dd8ee
Resolving comments
abishekTa-egov b537778
Resolving comments
abishekTa-egov a54b2a2
Resolving comments changes
abishekTa-egov 2b78f85
Creating ChildBoundaryCreationUtil
abishekTa-egov 67629de
Working ChildBoundaryCreationUtil with logs
abishekTa-egov a820400
Response of createRoot with logs
abishekTa-egov e615915
Removing logs
abishekTa-egov 6ff6999
Making from local to unified-dev
abishekTa-egov b3e4a86
Build-config for geopode
abishekTa-egov fff7160
arcgis endpoint being made into two
abishekTa-egov f6bab09
Chnaging context path
abishekTa-egov 280d263
Validation change
abishekTa-egov 5680190
Logging number of children
abishekTa-egov e51c50e
Resolving comments
abishekTa-egov 998eb68
Adding comments for method createChildrenAsync
abishekTa-egov c0a9f44
Adding comments for method createChildrenAsync
abishekTa-egov ca9a676
Logging statements
abishekTa-egov cdd6799
Duplicate countries not being allowed in same HierarchyType
abishekTa-egov 9f57dcc
Adding @Autowired
abishekTa-egov a3b33df
Formatting and Adding Service constants for Arcgis Search
abishekTa-egov 44a6264
Removing searchBoundaryHierarchyDefinition from GeopodeAdapterService
abishekTa-egov b8be666
Moving SearchBoundary to ArcgisUtil
abishekTa-egov 4581683
Removing unnecessary properties in application.properties
abishekTa-egov f4269ed
BoundaryResponse and function to mdmsUtil
abishekTa-egov 870d1e9
Moving functions to MdmsUtil for extractCountryNameFromMDms
abishekTa-egov efda0c7
Adding changes for Multi-Architecture Docker Images
RajeswariGangula-egov 2d0915b
Merge pull request #1638 from RajeswariGangula-egov/MULTI-ARCH-GEOPODE
Priyanka-eGov 0283163
Formatting changes
abishekTa-egov 9c61dfd
Formatting, removing unneccesary api paths and adding error constants
abishekTa-egov d07eb57
Merge branch 'HCMPRE-2709-modified' of github.com:egovernments/health…
abishekTa-egov 3df9d49
tenantId coming from user not ServiceConstants
abishekTa-egov 5fe1cee
Adding List of List of dataStructure and adding Object for parentList…
abishekTa-egov 8d1edb3
Removing generated date
abishekTa-egov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Swagger generated server | ||
|
|
||
| Spring Boot Server | ||
|
|
||
| ## Overview | ||
| This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. | ||
| By using the [OpenAPI-Spec](https://github.com/swagger-api/swagger-core), you can easily generate a server stub. | ||
| This is an example of building a swagger-enabled server in Java using the SpringBoot framework. | ||
|
|
||
| The underlying library integrating swagger to SpringBoot is [springfox](https://github.com/springfox/springfox) | ||
|
|
||
| Start your server as a simple java application | ||
|
|
||
| You can view the api documentation in swagger-ui by pointing to | ||
| http://localhost:8080/ | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Change default port value in application.properties | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <groupId>org.egov</groupId> | ||
| <artifactId>geopode-adapter</artifactId> | ||
| <packaging>jar</packaging> | ||
| <name>geopode-adapter</name> | ||
| <version>1.0.0</version> | ||
| <properties> | ||
| <java.version>17</java.version> | ||
| <maven.compiler.source>${java.version}</maven.compiler.source> | ||
| <maven.compiler.target>${java.version}</maven.compiler.target> | ||
| </properties> | ||
| <parent> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-parent</artifactId> | ||
| <version>3.2.2</version> | ||
| </parent> | ||
| <build> | ||
| <sourceDirectory>src/main/java</sourceDirectory> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-maven-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <goals> | ||
| <goal>repackage</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-web</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>junit</groupId> | ||
| <artifactId>junit</artifactId> | ||
| <version>4.13.2</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-jdbc</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.flywaydb</groupId> | ||
| <artifactId>flyway-core</artifactId> | ||
| <version>9.22.3</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.postgresql</groupId> | ||
| <artifactId>postgresql</artifactId> | ||
| <version>42.7.1</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-test</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>io.swagger</groupId> | ||
| <artifactId>swagger-core</artifactId> | ||
| <version>1.5.18</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.swagger.core.v3</groupId> | ||
| <artifactId>swagger-annotations</artifactId> | ||
| <version>2.2.8</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>net.minidev</groupId> | ||
| <artifactId>json-smart</artifactId> | ||
| <version>2.5.0</version> | ||
| </dependency> | ||
| <!-- Egov dependencies --> | ||
| <dependency> | ||
| <groupId>org.egov.services</groupId> | ||
| <artifactId>tracer</artifactId> | ||
| <version>2.9.0-SNAPSHOT</version> | ||
| </dependency> | ||
| <!-- <dependency>--> | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <!-- <groupId>org.egov.services</groupId>--> | ||
| <!-- <artifactId>digit-models</artifactId>--> | ||
| <!-- <version>1.0.0-SNAPSHOT</version>--> | ||
| <!-- </dependency>--> | ||
| <dependency> | ||
| <groupId>org.egov</groupId> | ||
| <artifactId>mdms-client</artifactId> | ||
| <version>2.9.0-SNAPSHOT</version> | ||
| <scope>compile</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.projectlombok</groupId> | ||
| <artifactId>lombok</artifactId> | ||
| <optional>true</optional> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.datatype</groupId> | ||
| <artifactId>jackson-datatype-jsr310</artifactId> | ||
| </dependency> | ||
| <!-- Bean Validation API support --> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-validation</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
| <repositories> | ||
| <repository> | ||
| <id>repo.egovernments.org</id> | ||
| <name>eGov ERP Releases Repository</name> | ||
| <url>https://nexus-repo.egovernments.org/nexus/content/repositories/releases/</url> | ||
| </repository> | ||
| <repository> | ||
| <id>repo.egovernments.org.snapshots</id> | ||
| <name>eGov ERP Releases Repository</name> | ||
| <url>https://nexus-repo.egovernments.org/nexus/content/repositories/snapshots/</url> | ||
| </repository> | ||
| <repository> | ||
| <id>repo.egovernments.org.public</id> | ||
| <name>eGov Public Repository Group</name> | ||
| <url>https://nexus-repo.egovernments.org/nexus/content/groups/public/</url> | ||
| </repository> | ||
| <repository> | ||
| <id>repo.digit.org</id> | ||
| <name>eGov DIGIT Releases Repository</name> | ||
| <url>https://nexus-repo.digit.org/nexus/content/repositories/snapshots/</url> | ||
| </repository> | ||
| </repositories> | ||
| </project> | ||
17 changes: 17 additions & 0 deletions
17
health-services/geopode-adapter/src/main/java/digit/Main.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package digit; | ||
|
|
||
| import org.egov.tracer.config.TracerConfiguration; | ||
| import org.springframework.boot.SpringApplication; | ||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
| import org.springframework.context.annotation.ComponentScan; | ||
| import org.springframework.context.annotation.Import; | ||
|
|
||
| @Import({ TracerConfiguration.class }) | ||
| @SpringBootApplication | ||
| @ComponentScan(basePackages = { "digit", "digit.web.controllers" , "digit.config"}) | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public class Main { | ||
| public static void main(String[] args) throws Exception { | ||
| SpringApplication.run(Main.class, args); | ||
| } | ||
|
|
||
| } | ||
69 changes: 69 additions & 0 deletions
69
health-services/geopode-adapter/src/main/java/digit/config/Configuration.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| package digit.config; | ||
|
|
||
| import lombok.*; | ||
| import org.egov.tracer.config.TracerConfiguration; | ||
| import org.springframework.beans.factory.annotation.Value; | ||
| import org.springframework.context.annotation.Import; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| @Component | ||
| @Data | ||
| @Import({TracerConfiguration.class}) | ||
| @NoArgsConstructor | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| @AllArgsConstructor | ||
|
|
||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public class Configuration { | ||
|
|
||
| //MDMS | ||
| @Value("${egov.mdms.host}") | ||
| private String mdmsHost; | ||
|
|
||
| @Value("${egov.mdms.search.endpoint}") | ||
| private String mdmsEndPoint; | ||
|
|
||
| //Boundary Service | ||
| @Value("${egov.boundary.service.host}") | ||
| private String boundaryServiceHost; | ||
|
|
||
| @Value("${egov.boundary.entity.create.endpoint}") | ||
| private String boundaryEntityCreateEndpoint; | ||
|
|
||
| @Value("${egov.boundary.entity.search.endpoint}") | ||
| private String boundaryEntitySearchEndpoint; | ||
|
|
||
| @Value("${egov.boundary.hierarchy.create.endpoint}") | ||
| private String boundaryHierarchyCreateEndpoint; | ||
|
|
||
| @Value("${egov.boundary.relationship.create.endpoint}") | ||
| private String boundaryRelationshipCreateEndpoint; | ||
|
|
||
| @Value("${egov.boundary.hierarchy.search.endpoint}") | ||
| private String boundaryHierarchySearchEndpoint; | ||
|
|
||
| @Value("${geopode.arcgis.host}") | ||
| private String arcgisHost; | ||
|
|
||
| @Value("${geopode.arcgis.endpoint}") | ||
| private String arcgisEnpoint; | ||
|
|
||
| @Value("${egov.mdms.v2.search.endpoint}") | ||
| private String mdmsV2EndPoint; | ||
|
|
||
| @Value("${geopode.default.offset}") | ||
| private String defaultOffset; | ||
|
|
||
| @Value("${geopode.default.limit}") | ||
| private String defaultLimit; | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @Value("${egov.mdms.tenantId}") | ||
| private String tenantId; | ||
|
|
||
| @Value("${egov.mdms.schemaCode}") | ||
| private String schemaCode; | ||
|
|
||
| @Value("${geopode.localHost}") | ||
| private Integer geopodeLocalHost; | ||
|
|
||
| @Value("${geopode.arcgis.search}") | ||
| private Integer geopodeSearchEndpoint; | ||
| } | ||
67 changes: 67 additions & 0 deletions
67
health-services/geopode-adapter/src/main/java/digit/config/ServiceConstants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| package digit.config; | ||
|
|
||
|
|
||
| import org.springframework.stereotype.Component; | ||
|
|
||
|
|
||
| @Component | ||
| public class ServiceConstants { | ||
|
|
||
| public static final String EXTERNAL_SERVICE_EXCEPTION = "External Service threw an Exception: "; | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public static final String SEARCHER_SERVICE_EXCEPTION = "Exception while fetching from searcher: "; | ||
|
|
||
| // Error Constants | ||
| public static final String ERROR_WHILE_FETCHING_FROM_MDMS = "Exception occurred while fetching category lists from mdms: "; | ||
|
|
||
| public static final String ERROR_CREATING_BOUNDARY_HIERARCHY_WITH_GIVEN_HIERARCHY = "Error encountered while creating boundary hierarchy with given hierarchy "; | ||
|
|
||
| // Common constants | ||
| public static final String BOUNDARY_CREATION_RESPONSE = "GeoPoDe Boundary Creation started successfully!"; | ||
| public static final String LOG_PLACEHOLDER = "{}"; | ||
|
|
||
| public static final String[] HIERARCHY_ORDER = { "ADM0_NAME", "ADM1_NAME", "ADM2_NAME", "ADM3_NAME" }; | ||
| public static final String ERROR_IN_SEARCH="Error when fetching from Boundary-definition"; | ||
| public static final String ERROR_IN_ARC_SEARCH="Error when fetching from Arcgis"; | ||
| public static final String HIERARCHY_TYPE = "MICROPLAN_NEW1"; | ||
| public static final String ERROR_FETCHING_FROM_MDMS="Error Fetching Data from mdms"; | ||
| public static final String NO_MDMS_DATA_FOUND_FOR_GIVEN_TENANT_ISO_CODE="For given tenantId and ISO code no country exists"; | ||
| public static final String COUNTRY_OUTFIELDS="ADM1_NAME"; | ||
| public static final String FORMAT_VALUE="json"; | ||
| public static final String ERROR_FETCHING_FROM_BOUNDARY="Error Fetching Data from boundary"; | ||
| public static final String ROOT_BOUNDARY_ALREADY_EXISTS="Root Boundary already created"; | ||
| public static final String MDMS_ISO_CODE ="isoCode"; | ||
| public static final String MDMS_NAME="name"; | ||
| public static final String FAILED_TO_CREATE_CHILDREN="Failed to create children"; | ||
| public static final String FAILED_TO_DESERIALIZE="Failed to deseralize hierarchy defintion"; | ||
| public static final String BOUNDARY_CREATION_INITIATED="The process of creating boundaries has been initiated for "; | ||
| public static final String ROOT_HIERARCHY_LEVEL="ADM0"; | ||
| public static final String ALREADY_EXISTS="Duplicate Record"; | ||
| public static final String RESPONSE_FROM_GEOPODE_API = "[\n" + | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| " {\n" + | ||
| " \"feature\": \"admin_0\",\n" + | ||
| " \"type_code\": \"Country\",\n" + | ||
| " \"level\": 0,\n" + | ||
| " \"parent\": null\n" + | ||
| " },\n" + | ||
| " {\n" + | ||
| " \"feature\": \"admin_1\",\n" + | ||
| " \"type_code\": \"State\",\n" + | ||
| " \"level\": 1,\n" + | ||
| " \"parent\": \"Country\"\n" + | ||
| " },\n" + | ||
| " {\n" + | ||
| " \"feature\": \"admin_2\",\n" + | ||
| " \"type_code\": \"LGA\",\n" + | ||
| " \"level\": 2,\n" + | ||
| " \"parent\": \"State\"\n" + | ||
| " },\n" + | ||
| " {\n" + | ||
| " \"feature\": \"admin_3\",\n" + | ||
| " \"type_code\": \"Ward\",\n" + | ||
| " \"level\": 3,\n" + | ||
| " \"parent\": \"LGA\"\n" + | ||
| " }\n" + | ||
| "]"; | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| } | ||
19 changes: 19 additions & 0 deletions
19
health-services/geopode-adapter/src/main/java/digit/kafka/Producer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package digit.kafka; | ||
|
|
||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.egov.tracer.kafka.CustomKafkaTemplate; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.stereotype.Service; | ||
|
|
||
| // NOTE: If tracer is disabled change CustomKafkaTemplate to KafkaTemplate in autowiring | ||
|
|
||
| @Service | ||
| @Slf4j | ||
| public class Producer { | ||
| @Autowired | ||
| private CustomKafkaTemplate<String, Object> kafkaTemplate; | ||
abishekTa-egov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| public void push(String topic, Object value) { | ||
| kafkaTemplate.send(topic, value); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.