Skip to content

Commit 7d3fe56

Browse files
committed
Further small changes
1 parent 717080b commit 7d3fe56

File tree

1 file changed

+31
-36
lines changed

1 file changed

+31
-36
lines changed

README.md

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,51 +12,45 @@ It supports the [AWS, Azure and Google object stores](storage-targets/cds-featur
1212

1313
<!-- TOC -->
1414

15+
* [Minimum UI and CAP Java Version](#minimum-ui-and-cap-java-version)
16+
* [Releases: Maven Central and Artifactory](#releases)
1517
* [Getting Started](#getting-started)
16-
* [Minimum Version](#minimum-version)
17-
* [Releases: Maven Central and Artifactory](#releases)
18-
* [How to use](#how-to-use)
19-
* [CDS Models](#cds-models)
20-
* [UI](#ui)
21-
* [Storage Targets](#storage-targets)
22-
* [Malware Scanner](#malware-scanner)
23-
* [Outbox](#outbox)
24-
* [Restore Endpoint](#restore-endpoint)
25-
* [Motivation](#motivation)
26-
* [HTTP Endpoint](#http-endpoint)
27-
* [Security](#security)
18+
* [CDS Models](#cds-models)
19+
* [UI](#ui)
20+
* [Storage Targets](#storage-targets)
21+
* [Malware Scanner](#malware-scanner)
22+
* [Outbox](#outbox)
23+
* [Restore Endpoint](#restore-endpoint)
24+
* [Motivation](#motivation)
25+
* [HTTP Endpoint](#http-endpoint)
26+
* [Security](#security)
2827
* [Architecture Overview](#architecture-overview)
2928
* [Design](#design)
3029
* [Multitenancy](#multitenancy)
3130
* [Object Stores](#object-stores)
3231
* [Model Texts](#model-texts)
33-
* [Extensibility]
3432
* [Monitoring & Logging](#monitoring-logging)
3533
* [Support, Feedback, Contributing](#support-feedback-contributing)
3634
* [References & Links](#references-links)
3735

38-
## Getting Started /
39-
### Minimum Version
40-
The following version are the minimum versions for the usage of the plugin:
36+
## Minimum UI5 and CAP Java Version
4137

4238
| Component | Minimum Version |
4339
|-----------|-----------------|
4440
| CAP Java | 3.10.3 |
45-
| UI5 | 1.139.0 |
46-
### Releases: Maven Central and Artifactory
41+
| UI5 | 1.136.0 |
4742

48-
The feature is released to Maven Central at:
49-
https://central.sonatype.com/artifact/com.sap.cds/cds-feature-attachments
43+
## Releases: Maven Central and Artifactory
5044

51-
Snapshots are deployed to SAP's Artifactory in DMZ:
52-
https://common.repositories.cloud.sap/artifactory/cap-java/com/sap/cds/cds-feature-attachments/
45+
- The plugin is released to Maven Central at: https://central.sonatype.com/artifact/com.sap.cds/cds-feature-attachments
5346

54-
If you want to test snapshot versions of this plugin, you need to configure the Artifactory in your `${HOME}/.m2/settings.xml`.
55-
See [here](https://maven.apache.org/settings.html#Repositories) for further details.
47+
- Snapshots are deployed to SAP's Artifactory in DMZ: https://common.repositories.cloud.sap/artifactory/cap-java/com/sap/cds/cds-feature-attachments/
5648

57-
Look at the [changelog](./doc/CHANGELOG.md) to see latest changes.
49+
- See the [changelog](./doc/CHANGELOG.md) for the latest changes.
5850

59-
### How to use
51+
- If you want to test snapshot versions of this plugin, you need to configure the Artifactory in your `${HOME}/.m2/settings.xml`. See [the maven settings](https://maven.apache.org/settings.html#Repositories) for further details.
52+
53+
## Getting Started
6054

6155
The usage of CAP Java plugins is described in the [CAP Java Documentation](https://cap.cloud.sap/docs/java/building-plugins#reference-the-new-cds-model-in-an-existing-cap-java-project). Following this documentation this plugin needs to be referenced in the `srv/pom.xml` of a CAP Java application:
6256

@@ -87,7 +81,7 @@ To be able to also use the CDS models defined in this plugin the `cds-maven-plug
8781
```
8882
After that, the aspect `Attachments` can be used in the application's CDS model.
8983

90-
#### CDS Models
84+
### Changes in CDS Models
9185

9286
Depending where the aspect `Attachments` shall be used in the application's CDS model, different approaches need to be implemented.
9387
- If the aspect `Attachments` shall be used on an entity provided in the `db` module, the corresponding entity needs to be extended from a CDS file in the `srv` module. Therefore the entity from the `db` folder needs to be imported with an `using` statement. Then, this entity can be extended with a new field that is a `Composition of many Attachments`.
@@ -118,7 +112,7 @@ entity Items : cuid {
118112
Use the aspect `Attachments` directly for the composition.
119113
Use the correct from clause for the `using` statement. The annotations and other definitions are found and used only if `com.sap.cds/cds-feature-attachments` is used and not concrete files of the feature.
120114

121-
#### UI
115+
### UI
122116

123117
To enhance the UI with the attachments the following annotations are used for the `UI.Facets` annotations in the respective `.cds` file of your app:
124118

@@ -171,7 +165,7 @@ annotate service.Incidents with @(
171165
);
172166
```
173167

174-
#### Storage Targets
168+
### Storage Targets
175169

176170
By default, the plugin operates without a dedicated storage target, storing attachments directly in the [underlying database](cds-feature-attachments/src/main/resources/cds/com.sap.cds/cds-feature-attachments/attachments.cds#L17).
177171

@@ -181,7 +175,7 @@ Other available storage targets:
181175

182176
When using a dedicated storage target, the attachment is not stored in the underlying database; instead, it is saved on the specified storage target, and only a reference to the file is kept in the database, as defined in the [CDS model](cds-feature-attachments/src/main/resources/cds/com.sap.cds/cds-feature-attachments/attachments.cds#L20).
183177

184-
#### Malware Scanner
178+
### Malware Scanner
185179

186180
This plugin checks for a binding to
187181
the [SAP Malware Scanning Service](https://help.sap.com/docs/malware-scanning-servce), this needs to have the label `malware-scanner`. The entry in the [mta-file](https://cap.cloud.sap/docs/guides/deployment/to-cf#add-mta-yaml) possibly looks like:
@@ -235,7 +229,7 @@ Scan status codes:
235229
- `Infected`: The attachment is infected.
236230

237231

238-
#### Outbox
232+
### Outbox
239233

240234
In this plugin the [persistent outbox](https://cap.cloud.sap/docs/java/outbox#persistent) is used to mark attachments as
241235
deleted.
@@ -247,12 +241,12 @@ the default outbox configuration.
247241
If the default shall be used, nothing needs to be done.
248242

249243

250-
#### Restore Endpoint
244+
### Restore Endpoint
251245

252246
The attachment service has an event `RESTORE_ATTACHMENTS`.
253247
This event can be called with a timestamp to restore externally stored attachments.
254248

255-
##### Motivation
249+
#### Motivation
256250

257251
Documents which are marked as deleted can be restored.
258252

@@ -273,7 +267,7 @@ In such cases the restore endpoint can be used to restore attachments.
273267
How long attachments are marked as deleted before they get deleted dependents on the configuration
274268
of the used storage.
275269

276-
##### HTTP Endpoint
270+
#### HTTP Endpoint
277271

278272
There is no predefined endpoint for the restore action.
279273
To call the action of the service from outside the application a service could be defined like the following example:
@@ -322,7 +316,7 @@ public class RestoreAttachmentsHandler implements EventHandler {
322316

323317
In the Spring Boot context the `AttachmentService` can be autowired in the handler.
324318

325-
##### Security
319+
#### Security
326320

327321
To secure the endpoint security annotations can be used e.g. like the following example:
328322

@@ -338,12 +332,13 @@ entity Items : cuid {
338332
annotate RestoreAttachments with @(requires: 'internal-user');
339333
```
340334

341-
Here the `RestoreAttachments` service is annotated with the `requires` annotation to secure the service.
335+
Here, the `RestoreAttachments` service is annotated with the `requires` annotation to secure the service.
342336
Also, other annotations can be used to secure the service.
343337

344338
More information about the CAP Java security concept can be found in
345339
the [CAP Java Documentation](https://cap.cloud.sap/docs/java/security).
346340

341+
347342
## Architecture Overview
348343
### Design
349344
- [Design Details](./doc/Design.md)

0 commit comments

Comments
 (0)