You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-6Lines changed: 38 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,14 +76,14 @@ Install the Contentful dependency:
76
76
<dependency>
77
77
<groupId>com.contentful.java</groupId>
78
78
<artifactId>java-sdk</artifactId>
79
-
<version>10.5.26</version>
79
+
<version>10.6.0</version>
80
80
</dependency>
81
81
```
82
82
83
83
*_Gradle_
84
84
85
85
```groovy
86
-
compile 'com.contentful.java:java-sdk:10.5.26'
86
+
compile 'com.contentful.java:java-sdk:10.6.0'
87
87
```
88
88
89
89
This library requires Java 8 (or higher version) or Android 21.
@@ -259,6 +259,38 @@ CDAArray found = client.fetch(CDAEntry.class)
259
259
260
260
This only resolves the first level of includes. `10` is the maximum number of levels to be included and should be used sparingly, since this will bloat up the response by a lot.
261
261
262
+
Cross-Space References
263
+
----------------------
264
+
265
+
In version 10.6.0 and later the library supports resolving cross-space references, which allows you to link content across multiple spaces. When cross-space tokens are configured, entries and assets from other spaces will be automatically included in the response's `includes` section and resolved by the library link resolution.
266
+
267
+
To enable cross-space reference resolution, provide access tokens for the additional spaces:
// Cross-space references will now be automatically resolved
281
+
CDAArray entries = client.fetch(CDAEntry.class)
282
+
.include(2)
283
+
.all();
284
+
```
285
+
286
+
**Limitations:**
287
+
- Maximum 20 extra spaces can be configured (21 total including the main space)
288
+
- Only the first level of cross-space references is resolved (similar to `include=1` for cross-space)
289
+
- The main space can still resolve up to 10 levels of includes
290
+
- Cross-space errors are returned in the `CDAArray.getErrors()` method
291
+
292
+
For more information, see the [Contentful Resource Links documentation](https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/resource-links).
293
+
262
294
Unwrapping
263
295
----------
264
296
@@ -303,7 +335,7 @@ In addition to returning the Content in a fashion flexible for various use-cases
303
335
> * A `locale` can be used to specify a given locale of this entry. If no locale is given, the default locale will be used.
304
336
> *`@ContentfulSystemField` is used for CDAEntries attributes (`sys.id`, etc) to be inserted.
305
337
> * If another type is wanted to be transformed, it should have `@ContentfulEntryModel`-annotation specified similarly as in `Cat`.
306
-
> ***Limitation on Unwrapping**: Using Unwrapping does not currently allow direct access to the raw JSON for rich text fields, as the SDK automatically transforms fields into the custom model structure. For cases where raw JSON is needed:
338
+
> ***Limitation on Unwrapping**: Using Unwrapping does not currently allow direct access to the raw JSON for rich text fields, as the library automatically transforms fields into the custom model structure. For cases where raw JSON is needed:
307
339
> * Use the `rawFields` map in `CDAEntry` to directly access the unprocessed JSON of any field, including rich text.
308
340
> * Alternatively, make a direct HTTP request to the Contentful API to retrieve the full raw JSON response.
OkHttp 5 splits platform artifacts. This SDK depends on `okhttp-jvm` so it works out of the box for JVM users. For Android apps, depend on `okhttp-android` and exclude `okhttp-jvm` from this SDK to avoid duplicate-class errors.
422
+
OkHttp 5 splits platform artifacts. This library depends on `okhttp-jvm` so it works out of the box for JVM users. For Android apps, depend on `okhttp-android` and exclude `okhttp-jvm` from this library to avoid duplicate-class errors.
0 commit comments