Skip to content

Commit

Permalink
added readme for sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf committed Oct 26, 2023
1 parent 384dd82 commit 3db0db2
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Selfcare Onboarding

Repository that contains backend services for selfcare onboarding.
Repository that contains backend services for selfcare onboarding. It is a monorepo for onboarding domain that contains:

- `onboarding-functions`: functions that handle all asynchronous activities related to preparing and completing the onboarding process. Indeed, they are activated by the onboarding microservice upon receiving an onboarding request
- `onboarding-ms`: microservice that implements CRUD operations for the 'onboarding' object and the business logic for the onboarding phase. During the onboarding process
- `onboarding-sdk`: Java utility classes that simplify the work of developers about onboarding activity

Look at single README module for more information.
42 changes: 42 additions & 0 deletions onboarding-sdk/onboarding-sdk-azure-storage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Onboarding SDK Azure Storage

This library has been developed to provide a set of Java utility classes to simplify the work of interact with azure storage. It includes features that helping for upload or download file from an azure storage container.

## Installation

To use this library in your projects, you can add the dependency to your pom.xml if you're using Maven:

```shell script
<dependency>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-azure-storage</artifactId>
<version>0.0.1</version>
</dependency>
```

If you are using Gradle, you can add the dependency to your build.gradle file:

```shell script
dependencies {
implementation 'it.pagopa.selfcare:onboarding-sdk-azure-storage:0.0.1'
}
```

## Usage

Here's an example of how to use AzureBlobClient:

```java script

public class Main {
public static void main(String[] args) {
final String azureStorageConnectionString = ... ; // set the azure storage connectionString, for ex. AccountName=asd;AccountKey=asd;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/account;
final String azureStorageContainerName = ... ; // set the azure storage container name
final AzureBlobClient azureBlobClient = new AzureBlobClientDefault(azureStorageConnectionString, azureStorageContainerName);

//Getting file as text
final String filepath = ... ;
final String jsonString = azureBlobClient.getFileAsText(filepath);
}
}
```
23 changes: 23 additions & 0 deletions onboarding-sdk/onboarding-sdk-common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Onboarding SDK Common

This library has been developed to provide a set of Java utility classes to simplify the work of onboarding service. It includes constants that helping for some aspects of onboarding activity.

## Installation

To use this library in your projects, you can add the dependency to your pom.xml if you're using Maven:

```shell script
<dependency>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-common</artifactId>
<version>0.0.1</version>
</dependency>
```

If you are using Gradle, you can add the dependency to your build.gradle file:

```shell script
dependencies {
implementation 'it.pagopa.selfcare:onboarding-sdk-common:0.0.1'
}
```
41 changes: 41 additions & 0 deletions onboarding-sdk/onboarding-sdk-product/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Onboarding SDK Product

This library has been developed to provide a set of Java utility classes to simplify the work of handle **Selfcare Product** as string.

## Installation

To use this library in your projects, you can add the dependency to your pom.xml if you're using Maven:

```shell script
<dependency>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-product</artifactId>
<version>0.0.1</version>
</dependency>
```

If you are using Gradle, you can add the dependency to your build.gradle file:

```shell script
dependencies {
implementation 'it.pagopa.selfcare:onboarding-sdk-product:0.0.1'
}
```

## Usage

Here's an example of how to use ProductService for retrieving product:

```java script

public class Main {
public static void main(String[] args) {
final String productJsonString = ... ; // set a json string compliant to a List of Product Pojo
final ProductService productService = new ProductServiceDefault(productJsonString);

//Get product if it is valid
final String productId = "prod-pagopa";
final Product product = productService.getProductIsValid(productId);
}
}
```

0 comments on commit 3db0db2

Please sign in to comment.