diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index c5203d7..0dc4988 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -1,12 +1,12 @@ name: Publish package to the Maven Central Repository -#on: -# push: -# tags: -# - v* -# pull_request: -# branches: [ dev ] -on: [push] +on: + push: + tags: + - v* + pull_request: + branches: [ main ] + jobs: publish: runs-on: ubuntu-latest @@ -26,3 +26,14 @@ jobs: JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }} JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: mvn -Prelease deploy jreleaser:deploy -DaltDeploymentRepository=local::file:./target/staging-deploy + + # Automatically create a GitHub Release, with release details specified (the relevant commits) + release: + needs: publish + name: Github Release + runs-on: ubuntu-latest + steps: + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false \ No newline at end of file diff --git a/README.md b/README.md index 7b1b90a..8a24e41 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,17 @@ ![JDK](https://img.shields.io/badge/JDK-17-yellow?style=for-the-badge) ![social](https://img.shields.io/github/forks/extrawest/Extrawest-OCPI-2.2.1-CPO-Server?style=for-the-badge) +## Table of Contents + +- [Field of use](#field-of-use) +- [How is OCPI being used?](#how-is-ocpi-being-used) +- [Description](#description) +- [Maven](#maven) +- [Dependencies](#dependencies) +- [Requirements](#requirements) +- [Changelog](#changelog) +- [Getting Started](#getting-started) + ## Field of use Open Charge Point Interface (OCPI) is an open protocol used for connections between charging station operators and service providers. Simply put, this protocol facilitates automated roaming for EV drivers between different EV charging networks. This interface supports the affordability and accessibility of charging infrastructure for EV owners, allowing drivers to charge across different networks. The protocol provides accurate data on charging stations, such as location, accessibility and pricing, and takes into account real-time billing and mobile access to charging stations. The OCPI protocol is managed and maintained by the EVRoaming Foundation, making it freely available to software vendors. @@ -38,7 +49,7 @@ At 2.2.1 you can choose what kind of events will be supported by CPO or EMSP. Maven ===== -Find the maven repo here: https://mvnrepository.com/artifact/com.extrawest/Extrawest-OCPI-2.2.1 +Find the maven repo here: https://mvnrepository.com/artifact/com.extrawest/Extrawest-OCPI-2.2.1-CPO-Server Dependencies ============ @@ -61,6 +72,70 @@ Java-OCA-OCPP uses the following libraries: - Java 17 or higher - Maven 3.6 or higher +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.extrawest + Extrawest-OCPI-2.2.1-CPO-Server + +``` + +## Getting Started +Extrawest-OCPI-2.2.1-CPO-Server contains CPO Models, Validations, Controllers, Interfaces. To implement CPO Server developers need to write own implementations for CPO Services, e.g. : +```java +@Service +public class ClientInfoServiceImpl implements ClientInfoService { + @Override + public ClientInfoDTO getHubClientInfo(String countryCode, String partyId) { + // your own implementation here + } + + @Override + public void putHubClientInfo(String countryCode, String partyId) { + // your own implementation here + } +} +``` + +## Changelog +Current library provides APIs for OCPI 2.2.1. To see changes between OCPI 2.2.1 and previous versions please check [OCPI changelog](https://github.com/ocpi/ocpi/blob/2.2.1/changelog.asciidoc#changelog_changelog) +for OCPI 2.1.1 to OCPI 2.2 -> OCPI 2.2.1 + +#### Extrawest-OCPI-2.2.1-CPO-Server library (v2023.8.24) covers next modules: + +Functional Modules: + + Module | v2023.8.24 | Description +-------------------|----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + [Locations](https://github.com/ocpi/ocpi/blob/2.2.1/mod_locations.asciidoc) | + | The Location objects live in the CPO back-end system. They describe the charging locations of an operator | + [Sessions](https://github.com/ocpi/ocpi/blob/2.2.1/mod_sessions.asciidoc) | + | The Session object describes one charging session. The Session object is owned by the CPO back-end system, and can be GET from the CPO system, or pushed by the CPO to another system | + [CDRs](https://github.com/ocpi/ocpi/blob/2.2.1/mod_cdrs.asciidoc) | + | A Charge Detail Record is the description of a concluded charging session. The CDR is the only billing-relevant object. CDRs are sent from the CPO to the eMSP after the charging session has ended | + [Tariffs](https://github.com/ocpi/ocpi/blob/2.2.1/mod_tariffs.asciidoc) | + | The Tariffs module gives eMSPs information about the tariffs used by the CPO | + [Tokens](https://github.com/ocpi/ocpi/blob/2.2.1/mod_tokens.asciidoc) | + | The tokens module gives CPOs knowledge of the token information of an eMSP. eMSPs can push Token information to CPOs, CPOs can build a cache of known Tokens. When a request to authorize comes from a Charge Point, the CPO can check against this cache. With this cached information they know to which eMSP they can later send a CDR | + [Commands](https://github.com/ocpi/ocpi/blob/2.2.1/mod_commands.asciidoc) | + | The Commands module enables remote commands to be sent to a Location/EVSE. The following commands are supported: CANCEL_RESERVATION, RESERVE_NOW, START_SESSION , STOP_SESSION, UNLOCK_CONNECTOR | + [Charging Profiles](https://github.com/ocpi/ocpi/blob/2.2.1/mod_charging_profiles.asciidoc)| + | With the ChargingProfiles module, parties (SCSP but also MSPs) can send (Smart) Charging Profiles to a Location/EVSE. It is also possible to request the 'ActiveChargingProfile' from a Location/EVSE | + [Hub Client Info](https://github.com/ocpi/ocpi/blob/2.2.1/mod_hub_client_info.asciidoc) | + | Provides parties connected to a hub with the connection status of other parties that are connected to a hub that they can communicate with. So, CPOs know which eMSP and other parties are online and vice versa | + +Configuration Modules: + +Module | v2023.8.24 | Description +------------ |-----------|-------------------------------------------------------------------------------------------------------------------------------------- +[Credentials](https://github.com/ocpi/ocpi/blob/2.2.1/credentials.asciidoc)| + | The credentials module is used to exchange the credentials token that has to be used by parties for authorization of requests | +[Versions](https://github.com/ocpi/ocpi/blob/2.2.1/version_information_endpoint.asciidoc) | + | Via this module, clients can learn which versions of OCPI a server supports, and which modules it supports for each of the versions | + +Plans for next releases is to enrich Credentials with OCPI Registration process + License =======