Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yamelsenih committed Jul 5, 2024
1 parent 92b0420 commit 20a19d5
Showing 1 changed file with 75 additions and 15 deletions.
90 changes: 75 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,89 @@
# ADempiere Template Project
# ADempiere S3 Connector

Fill it with a comment about project.
A AWS3 Connector to use as File Storage

## Requirements
- [JDK 11 or later](https://adoptium.net/)
- [Gradle 8.0.1 or later](https://gradle.org/install/)

## Model Deploy class
The main deploy is `org.spin.eca62.setup.Deploy`, used to connect this plibrary with a minio instance like is generated [here](https://github.com/adempiere/s3_gateway_rs/blob/main/docker-compose/docker-compose-develop.yml)

### Packages Names
you should change the follows packages for your own implementation, just change the word `template` by your implementation
## ADempiere Patches
Currently the old implementation for ADempiere not work with the new definition, here a example of new definition `org.spin.util.AttachmentUtil`

```Java
org.spin.template.model.validator
org.spin.template.setup
org.spin.template.util
```
## S3 File Structure

The files are store depending of follow parameters:

- Client ID
- Container Type
- Container ID
- Table
- Record ID
- User ID
- Resource Name

### Some Examples

#### Images

- Client ID: `8d4e103d-6add-474f-948d-3d9bcbe7b541`
- Container Type: `resource`
- Container ID: `image`
- Table: No apply
- Record ID: No apply
- User ID: No apply
- Resource Name: `2024-04-01_10-16.png`

The route to store this resource is `<bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/resource/image/2024-04-01_10-16.png`

#### Archives

- Client ID: `8d4e103d-6add-474f-948d-3d9bcbe7b541`
- Container Type: `resource`
- Container ID: `archive`
- Table: `AD_AppRegistration`
- Record ID: `1000000`
- User ID: No apply
- Resource Name: `GardenWorld---Application-Registration.pdf`

The route to store this resource is `<bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/resource/archive/ad_appregistration/1000000/gardenworld---application-registration.pdf`

#### Attachments

##### File 1
- Client ID: `8d4e103d-6add-474f-948d-3d9bcbe7b541`
- Container Type: `attachment`
- Container ID: No Apply
- Table: `AD_AppRegistration`
- Record ID: `1000000`
- User ID: No apply
- Resource Name: `-2024-02-10-2119.png`

The route to store this resource is `<bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/attachment/ad_appregistration/1000000/-2024-02-10-2119.png`

##### File 2
- Client ID: `8d4e103d-6add-474f-948d-3d9bcbe7b541`
- Container Type: `attachment`
- Container ID: No Apply
- Table: `AD_AppRegistration`
- Record ID: `1000000`
- User ID: No apply
- Resource Name: `09920_eca62_add_app_support.xml`

### Model Validators
Change the `org.spin.template.model.validator.Validator` by your implementation, example: `org.spin.template.model.validator.MyOwnFunctionality`
The route to store this resource is `<bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/attachment/ad_appregistration/1000000/09920_eca62_add_app_support.xml`

### Model Deploy class
Change the `org.spin.template.setup.Deploy` by your implementation, example: `org.spin.template.setup.MyOwnSetupForDeploy`
##### File 3
- Client ID: `8d4e103d-6add-474f-948d-3d9bcbe7b541`
- Container Type: `attachment`
- Container ID: No Apply
- Table: `AD_AppRegistration`
- Record ID: `1000000`
- User ID: No apply
- Resource Name: `a.xml`

### Model Util class for core changes
Change the `org.spin.template.util.Changes` by your implementation, example: `org.spin.template.util.MyOwnChanges`
The route to store this resource is `<bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/attachment/ad_appregistration/1000000/a.xml`

## Binary Project

Expand Down

0 comments on commit 20a19d5

Please sign in to comment.