Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
renejeglinsky committed Mar 11, 2024
2 parents caefa6d + 4f04bfb commit 3b6efe1
Show file tree
Hide file tree
Showing 77 changed files with 2,197 additions and 1,757 deletions.
2 changes: 1 addition & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (!siteURL.pathname.endsWith('/')) siteURL.pathname += '/'
const redirectLinks: Record<string, string> = {}

const latestVersions = {
java_services: '2.6.1',
java_services: '2.7.0',
java_cds4j: '2.7.0'
}

Expand Down
10 changes: 5 additions & 5 deletions about/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Following is an index of the features currently covered by CAP, with status and
| [Temporal Data](../guides/temporal-data) | <X/> | <X/> | <X/> |
| [Managed Data](../guides/domain-modeling#managed-data) | <X/> | <X/> | <X/> |
| [Dynamic Extensibility](../guides/extensibility/) | <X/> | <X/> | <X/> |
| Monitoring / Logging [[Node.js](../node.js/cds-log)\|[Java](../java/observability#logging)] | <Na/> | <X/> | <X/> |
| Monitoring / Logging [[Node.js](../node.js/cds-log)\|[Java](../java/operating-applications/observability#logging)] | <Na/> | <X/> | <X/> |
| Audit Logging [[Node.js](../guides/data-privacy/audit-logging)\|[Java](../java/auditlog)] | <Na/> | <X/> | <X/> |


Expand Down Expand Up @@ -179,9 +179,9 @@ Following is an index of the features currently covered by CAP, with status and
| | CDS | Node.js | Java |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----:|:-------:|:----:|
| [Declared Events in CDS](../cds/cdl#events) | <X/> | <X/> | <X/> |
| Mock Broker (to speed up local dev) [[Node.js](../node.js/messaging#file-based)\|[Java](../java/messaging-foundation#local-testing)] | <Na/> | <X/> | <X/> |
| SAP Event Mesh (Singletenancy) [[Node.js](../node.js/messaging#event-mesh-shared)\|[Java](../java/messaging-foundation#configuring-sap-event-mesh-support)] | <Na/> | <X/> | <X/> |
| Composite Messaging (routing by configuration) [[Node.js](../node.js/messaging#composite-messaging)\|[Java](../java/messaging-foundation#composite-messaging-service)] | <Na/> | <X/> | <X/> |
| Mock Broker (to speed up local dev) [[Node.js](../node.js/messaging#file-based)\|[Java](../java/messaging#local-testing)] | <Na/> | <X/> | <X/> |
| SAP Event Mesh (Singletenancy) [[Node.js](../node.js/messaging#event-mesh-shared)\|[Java](../java/messaging#configuring-sap-event-mesh-support)] | <Na/> | <X/> | <X/> |
| Composite Messaging (routing by configuration) [[Node.js](../node.js/messaging#composite-messaging)\|[Java](../java/messaging#composite-messaging-service)] | <Na/> | <X/> | <X/> |
| Import AsyncAPI | <O/> | | |
| Export AsyncAPI | <X/> | | |

Expand All @@ -195,7 +195,7 @@ Following is an index of the features currently covered by CAP, with status and
| [SAP HANA Cloud](../guides/databases-hana) | <X/> | <X/> | <X/> |
| [PostgreSQL](../guides/databases-postgres) | <X/> | <X/> | <X/> |
| [SQLite](../guides/databases-sqlite) <sup>1</sup> | <X/> | <X/> | <X/> |
| [H2](../java/persistence-services#h2) <sup>1</sup> | <X/> | <Na/> | <X/> |
| [H2](../java/cqn-services/persistence-services#h2) <sup>1</sup> | <X/> | <Na/> | <X/> |
| [MongoDB](../guides/databases) out of the box | <Na/> | <Na/> | <D/> |
| Pluggable drivers architecture | <D/> | <D/> | <X/> |
| Out-of-the-box support for other databases? | <C/> | <C/> | <C/> |
Expand Down
8 changes: 4 additions & 4 deletions advanced/odata.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Content-Type: application/json
}
```

PATCH requests with delta payload are executed using batch delete and [upsert](../java/query-api#bulk-upsert) statements, and are more efficient than OData [batch requests](https://docs.oasis-open.org/odata/odata/v4.01/csprd02/part1-protocol/odata-v4.01-csprd02-part1-protocol.html#sec_BatchRequests).
PATCH requests with delta payload are executed using batch delete and [upsert](../java/working-with-cql/query-api#bulk-upsert) statements, and are more efficient than OData [batch requests](https://docs.oasis-open.org/odata/odata/v4.01/csprd02/part1-protocol/odata-v4.01-csprd02-part1-protocol.html#sec_BatchRequests).

Use PATCH on entity collections for uploading mass data using a dedicated service, which is secured using [role-based authorization](../java/security#role-based-auth). Delta updates must be explicitly enabled by annotating the entity with

Expand All @@ -115,7 +115,7 @@ Limitations:
* [Added and deleted links](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_IteminaDeltaPayloadResponse) are not supported.
* The header `Prefer=representation` is not yet supported.
* The `continue-on-error` preference is not yet supported.
* The generic CAP handler support for [upsert](../java/query-api#upsert) is limited, for example, audit logging is not supported.
* The generic CAP handler support for [upsert](../java/working-with-cql/query-api#upsert) is limited, for example, audit logging is not supported.


## Mapping of CDS Types { #type-mapping}
Expand Down Expand Up @@ -164,7 +164,7 @@ the import of external service APIs, see [Using Services](../guides/using-servic

```cds
entity Foo {
...,
// ...
@odata: { Type: 'Edm.GeometryPolygon', SRID: 0 }
geoCollection : LargeBinary;
};
Expand All @@ -177,7 +177,7 @@ Therefore, you can override the default mapping as follows:
```cds
entity Books {
key ID : UUID @odata.Type:'Edm.String';
...
// ...
}
```

Expand Down
16 changes: 9 additions & 7 deletions cds/cdl.md
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ service AdminService {
entity ListOfBooks as projection on my.Books;
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
//> which one should AdminService.Authors.books refers to?
//> which one should AdminService.Authors.books refer to?
}
```

Expand All @@ -1575,9 +1575,10 @@ You can use `redirected to` to resolve the ambiguity as follows:

```cds
service AdminService {
...
entity Authors as projection on my.Authors { *,
books : redirected to Books //> resolved ambiguity
entity ListOfBooks as projection on my.Books;
entity Books as projection on my.Books;
entity Authors as projection on my.Authors { *, // [!code focus]
books : redirected to Books //> resolved ambiguity // [!code focus]
};
}
```
Expand All @@ -1588,9 +1589,10 @@ Alternatively, you can use the boolean annotation `@cds.redirection.target` with

```cds
service AdminService {
@cds.redirection.target: true
entity ListOfBooks as projection on my.Books;
...
@cds.redirection.target: true // [!code focus]
entity ListOfBooks as projection on my.Books; // [!code focus]
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
}
```

Expand Down
6 changes: 3 additions & 3 deletions cds/compiler-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ With compiler v2, these additional types are not reflected in CSN anymore.
#### Migration

If you've got custom code that evaluates the CSN and uses these types, you need to adapt that code.
Also in Java, [accessor-](../java/advanced#accessor-interfaces) or [model interfaces](../java/advanced#model-interfaces) generated for these types, will change.
Also in Java, [accessor-](../java/cqn-services/persistence-services#accessor-interfaces) or [model interfaces](../java/cqn-services/persistence-services#model-interfaces) generated for these types, will change.


### Removed: Property `$syntax`
Expand Down Expand Up @@ -756,7 +756,7 @@ In this example, the return type of the `cancel` function is automatically expos
With compiler v1 this change was also reflected in the CSN. With compiler v2 this is not the case any longer.

::: warning _❗ Warning_
If types are used in a service that are defined outside of the service the [generated accessor interface](../java/data#generated-accessor-interfaces) will change when upgrading from compiler v1 to v2!
If types are used in a service that are defined outside of the service the [generated accessor interface](../java/cds-data#generated-accessor-interfaces) will change when upgrading from compiler v1 to v2!
:::

If compiler v1 is used CAP Java will generate interfaces using the automatically exposed type from EDMX:
Expand Down Expand Up @@ -838,7 +838,7 @@ OData, however, does not support anonymous types. Hence, the compiler will autom
In this example the compiler generated the type `Person_emails` in the OData service `hr`.

::: warning _❗ Warning_
If an inline defined type is used in a service the [generated accessor interface](../java/data#generated-accessor-interfaces) will change (an inner interface is generated) when upgrading from compiler v1 to v2!
If an inline defined type is used in a service the [generated accessor interface](../java/cds-data#generated-accessor-interfaces) will change (an inner interface is generated) when upgrading from compiler v1 to v2!
:::

If compiler v1 is used CAP Java generates a *top-level* interface for item type:
Expand Down
12 changes: 6 additions & 6 deletions cds/csn.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ For the remainder of this spec, you see examples in plain JavaScript representat
* [`extensions`](#aspects) &ndash; an array of unnamed [aspects](#aspects)
* [`i18n`](#i18n) &ndash; a dictionary of dictionaries of [text translations](#i18n)
::: tip All properties are optional
For example, one model could contain a few definitions, while another one only contains some extensions.
:::
> [!TIP] All properties are optional
> For example, one model could contain a few definitions, while another one only contains some extensions.
> [!NOTE] References are case-sensitive
> All references in properties like `type` or `target` use exactly the same notation regarding casing as their targets' names. To avoid problems when translating models to case-insensitive environments like SQL databases, avoid case-significant names and references. For example, avoid two different definitions in the same scope whose names only differ in casing, such as `foo` and `Foo`.
::: info References are case-sensitive
All references in properties like `type` or `target` use exactly the same notation regarding casing as their targets' names. To avoid problems when translating models to case-insensitive environments like SQL databases, avoid case-significant names and references. For example, avoid two different definitions in the same scope whose names only differ in casing, such as `foo` and `Foo`.
:::
Expand Down
2 changes: 1 addition & 1 deletion get-started/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module.exports = class say {

<div class="impl java">

... for example, using a [CAP Java](../java/provisioning-api) custom handler like this:
... for example, using a [CAP Java](../java/event-handlers) custom handler like this:

::: code-group

Expand Down
10 changes: 5 additions & 5 deletions get-started/in-a-nutshell.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ In Node.js, the easiest way to provide implementations for services is through e

[See these files also in **cap/samples**/bookshop/srv folder.](https://github.com/sap-samples/cloud-cap-samples/tree/main/bookshop/srv){.learn-more}
[Learn more about providing service implementations **in Node.js**.](../node.js/core-services#implementing-services){.learn-more .impl .node}
[Learn also **how to do that in Java** using Event Handler Classes.](../java/provisioning-api#handlerclasses){.learn-more .impl .java}
[Learn also **how to do that in Java** using Event Handler Classes.](../java/event-handlers#handlerclasses){.learn-more .impl .java}

</div>

Expand Down Expand Up @@ -670,7 +670,7 @@ public class CatalogHandler implements EventHandler {
:::


[Learn more about **event handlers** in the CAP Java documentation.](../java/provisioning-api#handlerclasses){.learn-more}
[Learn more about **event handlers** in the CAP Java documentation.](../java/event-handlers#handlerclasses){.learn-more}

</div>

Expand Down Expand Up @@ -788,11 +788,11 @@ public class SubmitOrderHandler implements EventHandler {
[Find this source also in **cap/samples**.](https://github.com/sap-samples/cloud-cap-samples/tree/main/bookshop/srv/cat-service.js){ .learn-more .impl .node target="_blank"}
[Find this source also in **cap/samples**.](https://github.com/SAP-samples/cloud-cap-samples-java/blob/main/srv/src/main/java/my/bookshop/handlers/CatalogServiceHandler.java#L166){ .impl .java .learn-more target="_blank"}
[Learn more about **connecting to services** using `cds.connect`.](../node.js/cds-connect){ .learn-more .impl .node}
[Learn more about **connecting to services** using `@Autowired`, `com.sap.cds.ql`, etc.](../java/consumption-api){.learn-more .impl .java}
[Learn more about **connecting to services** using `@Autowired`, `com.sap.cds.ql`, etc.](../java/services){.learn-more .impl .java}
[Learn more about **reading and writing data** using `cds.ql`.](../node.js/cds-ql){ .learn-more .impl .node}
[Learn more about **reading and writing data** using `cds.ql`.](../java/query-api){ .learn-more .impl .java}
[Learn more about **reading and writing data** using `cds.ql`.](../java/working-with-cql/query-api){ .learn-more .impl .java}
[Learn more about **using reflection APIs** using `<srv>.entities`.](../node.js/core-services#entities){ .learn-more .impl .node}
[Learn more about **typed access to data** using the CAP Java SDK.](../java/data#typed-access){ .learn-more .impl .java}
[Learn more about **typed access to data** using the CAP Java SDK.](../java/cds-data#typed-access){ .learn-more .impl .java}

**Test this implementation**, [for example using the Vue.js app](#vue), and see how discounts are displayed in some book titles. {.impl .node}

Expand Down
4 changes: 2 additions & 2 deletions get-started/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ module.exports = cds.server

### How can I make sure that a user passes all authorization checks?

A new option `privilegedUser()` can be leveraged when [defining](../java/request-contexts#defining-requestcontext) your own `RequestContext`. Adding this introduces a user, which passes all authorization restrictions. This is useful for scenarios, where a restricted service should be called through the [local service consumption API](../java/consumption-api) either in a request thread regardless of the original user's authorizations or in a background thread.
A new option `privilegedUser()` can be leveraged when [defining](../java/event-handlers/request-contexts#defining-requestcontext) your own `RequestContext`. Adding this introduces a user, which passes all authorization restrictions. This is useful for scenarios, where a restricted service should be called through the [local service consumption API](../java/services) either in a request thread regardless of the original user's authorizations or in a background thread.

### Why do I get a "User should not exist" error during build time?

Expand Down Expand Up @@ -221,7 +221,7 @@ To fix this, either switch the Node.js version using a Node version manager, or
### How can I expose custom REST APIs with CAP?

From time to time you might want to expose additional REST APIs in your CAP application, that aren't covered through CAPs existing protocol adapters (for example, OData V4). A common example for this might be a CSV file upload or another type of custom REST endpoint.
In that case, you can leverage the powerful capabilities of Spring Web MVC, by implementing your own RestController. From within your RestController implementation, you can fully leverage all CAP Java APIs. Most commonly you'll be interacting with your services and the database through the [local service consumption API](../java/consumption-api). To learn more about Spring Web MVC, see the [Spring docs](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc), [Spring Boot docs](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-spring-mvc), and this [tutorial](https://spring.io/guides/gs/serving-web-content/).
In that case, you can leverage the powerful capabilities of Spring Web MVC, by implementing your own RestController. From within your RestController implementation, you can fully leverage all CAP Java APIs. Most commonly you'll be interacting with your services and the database through the [local service consumption API](../java/services). To learn more about Spring Web MVC, see the [Spring docs](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc), [Spring Boot docs](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-spring-mvc), and this [tutorial](https://spring.io/guides/gs/serving-web-content/).

### How can I build a CAP Java application without SQL database?

Expand Down
18 changes: 9 additions & 9 deletions guides/databases-h2.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ impl-variants: true

For local development and testing, CAP Java supports the [H2](https://www.h2database.com/) database, which can be configured to run in-memory.

[Learn more about features and limitations of using CAP with H2](../java/persistence-services#h2){.learn-more}
[Learn more about features and limitations of using CAP with H2](../java/cqn-services/persistence-services#h2){.learn-more}

<div class="impl node">

Expand All @@ -30,7 +30,7 @@ Not supported for CAP Node.js.

### Using the Maven Archetype {.impl .java}

When a new CAP Java project is created with the [Maven Archetype](../java/development/#the-maven-archetype) or with `cds init`,
When a new CAP Java project is created with the [Maven Archetype](../java/developing-applications/building#the-maven-archetype) or with `cds init`,
H2 is automatically configured as in-memory database used for development and testing in the `default` profile.

### Manual Configuration {.impl .java}
Expand All @@ -45,20 +45,20 @@ To use H2, just add a Maven dependency to the H2 JDBC driver:
</dependency>
```

Next, configure the build to [create an initial _schema.sql_ file](../java/persistence-services#initial-database-schema-1) for H2 using `cds deploy --to h2 --dry`.
Next, configure the build to [create an initial _schema.sql_ file](../java/cqn-services/persistence-services#initial-database-schema-1) for H2 using `cds deploy --to h2 --dry`.

In Spring, H2 is automatically initialized as in-memory database when the driver is present on the classpath.

[Learn more about the configuration of H2 ](../java/persistence-services#h2){.learn-more}
[Learn more about the configuration of H2 ](../java/cqn-services/persistence-services#h2){.learn-more}

## Features {.impl .java}

CAP supports most of the major features on H2:

* [Path Expressions](../java/query-api#path-expressions) & Filters
* [Expands](../java/query-api#projections)
* [Path Expressions](../java/working-with-cql/query-api#path-expressions) & Filters
* [Expands](../java/working-with-cql/query-api#projections)
* [Localized Queries](../guides/localized-data#read-operations)
* [Comparison Operators](../java/query-api#comparison-operators)
* [Predicate Functions](../java/query-api#predicate-functions)
* [Comparison Operators](../java/working-with-cql/query-api#comparison-operators)
* [Predicate Functions](../java/working-with-cql/query-api#predicate-functions)

[Learn about features and limitations of H2](../java/persistence-services#h2){.learn-more}
[Learn about features and limitations of H2](../java/cqn-services/persistence-services#h2){.learn-more}
Loading

0 comments on commit 3b6efe1

Please sign in to comment.