Skip to content
Open
Show file tree
Hide file tree
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 Apr 24, 2025
1756afe
Creating geopode-adapter service - Hierarchy setup
tanishi-egov Apr 25, 2025
e466dc6
Boundary fetch
abishekTa-egov May 26, 2025
0349a20
Arcgis endpoint and mdms request
abishekTa-egov May 26, 2025
29dd8ee
Resolving comments
abishekTa-egov May 30, 2025
b537778
Resolving comments
abishekTa-egov Jun 3, 2025
a54b2a2
Resolving comments changes
abishekTa-egov Jun 4, 2025
2b78f85
Creating ChildBoundaryCreationUtil
abishekTa-egov Jun 4, 2025
67629de
Working ChildBoundaryCreationUtil with logs
abishekTa-egov Jun 5, 2025
a820400
Response of createRoot with logs
abishekTa-egov Jun 5, 2025
e615915
Removing logs
abishekTa-egov Jun 5, 2025
6ff6999
Making from local to unified-dev
abishekTa-egov Jun 6, 2025
b3e4a86
Build-config for geopode
abishekTa-egov Jun 9, 2025
fff7160
arcgis endpoint being made into two
abishekTa-egov Jun 10, 2025
f6bab09
Chnaging context path
abishekTa-egov Jun 10, 2025
280d263
Validation change
abishekTa-egov Jun 10, 2025
5680190
Logging number of children
abishekTa-egov Jun 11, 2025
e51c50e
Resolving comments
abishekTa-egov Jun 11, 2025
998eb68
Adding comments for method createChildrenAsync
abishekTa-egov Jun 11, 2025
c0a9f44
Adding comments for method createChildrenAsync
abishekTa-egov Jun 11, 2025
ca9a676
Logging statements
abishekTa-egov Jun 12, 2025
cdd6799
Duplicate countries not being allowed in same HierarchyType
abishekTa-egov Jun 13, 2025
9f57dcc
Adding @Autowired
abishekTa-egov Jun 13, 2025
a3b33df
Formatting and Adding Service constants for Arcgis Search
abishekTa-egov Jun 24, 2025
44a6264
Removing searchBoundaryHierarchyDefinition from GeopodeAdapterService
abishekTa-egov Jun 24, 2025
b8be666
Moving SearchBoundary to ArcgisUtil
abishekTa-egov Jun 26, 2025
4581683
Removing unnecessary properties in application.properties
abishekTa-egov Jun 26, 2025
f4269ed
BoundaryResponse and function to mdmsUtil
abishekTa-egov Jun 26, 2025
870d1e9
Moving functions to MdmsUtil for extractCountryNameFromMDms
abishekTa-egov Jun 26, 2025
efda0c7
Adding changes for Multi-Architecture Docker Images
RajeswariGangula-egov Jun 26, 2025
2d0915b
Merge pull request #1638 from RajeswariGangula-egov/MULTI-ARCH-GEOPODE
Priyanka-eGov Jun 26, 2025
0283163
Formatting changes
abishekTa-egov Jul 1, 2025
9c61dfd
Formatting, removing unneccesary api paths and adding error constants
abishekTa-egov Jul 1, 2025
d07eb57
Merge branch 'HCMPRE-2709-modified' of github.com:egovernments/health…
abishekTa-egov Jul 1, 2025
3df9d49
tenantId coming from user not ServiceConstants
abishekTa-egov Jul 1, 2025
5fe1cee
Adding List of List of dataStructure and adding Object for parentList…
abishekTa-egov Jul 9, 2025
8d1edb3
Removing generated date
abishekTa-egov Jul 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ config:
dockerfile: "build/17/maven/Dockerfile"
- work-dir: "core-services/egov-idgen/src/main/resources/db"
image-name: "health-idgen-db"
- name: "builds/health-campaign-services/health-services/geopode-adapter"
build:
- work-dir: "health-services/geopode-adapter"
image-name: "geopode-adapter"
dockerfile: "build/17/maven/Dockerfile"
# frontend
- name: builds/health-campaign-services/frontend/workbench-ui
build:
Expand Down
17 changes: 17 additions & 0 deletions health-services/geopode-adapter/README.md
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/

Change default port value in application.properties
135 changes: 135 additions & 0 deletions health-services/geopode-adapter/pom.xml
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>-->
<!-- <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 health-services/geopode-adapter/src/main/java/digit/Main.java
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"})
public class Main {
public static void main(String[] args) throws Exception {
SpringApplication.run(Main.class, args);
}

}
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
@AllArgsConstructor

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;

@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;
}
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: ";
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" +
" {\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" +
"]";


}
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;

public void push(String topic, Object value) {
kafkaTemplate.send(topic, value);
}
}
Loading
Loading