Skip to content

Commit

Permalink
Merge branch 'develop' into dev/#237
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
loreV committed Jan 6, 2023
2 parents 350fbac + a620c0a commit 7e68f7c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Hikit
Hikit is a collaborative service that manages high level geo and meta data related to trails.
It is intended to provide trail support teams (like the [CAI](https://www.cai.it/) ones) with a rich set of features to update and maintain a trail library, while making this data available to users.
# Hikit Service
Hikit service manages high level geo and meta-data related to trails.
It is intended to provide organizations (like the [CAI](https://www.cai.it/) ones) with a rich set of features to update and maintain a trail rich format library, while making this data available to users.

Currently, the library supports accessibility-notifications, user reports, maintenance planning, generic/specific POIs and other features all linked with trails.
Currently, it supports a wide set of features like accessibility-notifications, user trail accidents reports, maintenance planning, generic/specific POIs and other features all linked with trails.

## Build
### Prerequisites
Expand All @@ -13,12 +13,12 @@ Currently, the library supports accessibility-notifications, user reports, maint
After cloning the repo, simply run `mvn install -f root/pom.xml`.

### Deployment Build
To incude all dependencies in a portable uber-jar, run `mvn install -P package`.
To include all dependencies in a portable uber-jar, run `mvn install -P package`.

### Test
There are two main types of tests written to address the S&C QA: unit test and integration test.
The latter requires the [dependencies](#Dependencies) to be up and running as it tests application operations connecting to them.
Once the dependencies are made available, to run the integration tests, simply execute `mvn install -P it`.
### Testing
There are two main types of tests written to address the Hikit QA: unit and integration tests.
The latter requires the [dependencies](#Dependencies) to be up and running as it runs application operations connecting to them.
Once the dependencies are made available, simply execute `mvn install -P it`.

## Run

Expand All @@ -44,7 +44,7 @@ In case you want to test run Hikit in combination with all its dependencies:
The service will be available at `http://localhost:8990/api/v<N>` (where `<N>` stands for the version number)

### Production
Hikit takes advantage of a Keycloak instance, as it does not implement user and roles natively.
As for production, Hikit takes advantage of a Keycloak instance, as it does not implement user and roles natively.
In order to configure a Keycloak instance, see the Keycloak official documentation.

### Properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.sc.adapter

import com.fasterxml.jackson.databind.ObjectMapper
import org.sc.configuration.AppProperties
import org.sc.configuration.AppProperties.LOCAL_IP_ADDRESS
import org.sc.adapter.response.AltitudeApiRequestPoint
import org.sc.adapter.response.AltitudeApiResponse
import org.sc.adapter.response.AltitudeServiceRequest
import org.sc.configuration.AppProperties
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import java.io.BufferedReader
Expand Down Expand Up @@ -34,7 +33,8 @@ class AltitudeServiceAdapter @Autowired constructor(appProperties: AppProperties
val apiGetEndpoint = "http://$pathToServiceApi?locations=$latitude,$longitude"
return try {
val getCall = URL(apiGetEndpoint).readText()
val gsonBuilder: AltitudeApiResponse = objectMapper.readValue(getCall, AltitudeApiResponse::class.java)
val gsonBuilder: AltitudeApiResponse =
objectMapper.readValue(getCall, AltitudeApiResponse::class.java)
listOf(gsonBuilder.results.first().elevation)
} catch (e: Exception) {
logger.severe("Could not connect to altitude service or read its response")
Expand Down
4 changes: 4 additions & 0 deletions backend/src/main/java/org/sc/adapter/WeatherServiceAdapter.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.sc.adapter

class WeatherServiceAdapter {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AccessibilityReportMailAdapter @Autowired constructor(private val mailAdap
private val logger = Logger.getLogger(AccessibilityReportMailAdapter::class.java.name)

companion object {
const val subject = "[S&C] Attivazione segnalazione"
const val subject = "[Hikit] Attivazione segnalazione"
const val message = "Il %s, hai inviato una segnalazione " +
"tramite S&C al '%s' per il sentiero '%s' (ID da sistema: '%s'). </br> " +
"Descrizione: '%s'.<br/>Per attivare la segnalazione, clicca <a href=\"%s\" target='_blank'>qui</a>, " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class AppProperties {

public static final String APP_NAME = "Sentieri&Cartografia";
public static final String DISPLAYED_VERSION = "1.4.0";
public static final String DISPLAYED_VERSION = "1.5.0-SNAPSHOT";
public static final String LOCAL_IP_ADDRESS = "127.0.0.1";

private final String port;
Expand Down

0 comments on commit 7e68f7c

Please sign in to comment.