| name | contentstack-java-cda |
|---|---|
| description | Use when implementing or changing CDA features – Stack/Config, entries, assets, sync, taxonomy, HTTP, retry, callbacks, and Content Delivery API alignment |
Use this skill when implementing or changing Content Delivery API (CDA) behavior in the Java SDK.
- Adding or modifying Stack, Entry, Query, Asset, Content Type, Sync, or Taxonomy behavior.
- Changing Config options (host, version, region, branch, retry).
- Working with the HTTP layer (CSHttpConnection, APIService), retry (RetryOptions, RetryInterceptor), or callbacks and Error handling.
- Entry point:
Contentstack.stack(apiKey, deliveryToken, environment). Optional: pass aConfigfor host, version, region, branch, live preview, retry, proxy, connection pool, early access, plugins. - Defaults: host
cdn.contentstack.io, versionv3(seeConfig). Regional endpoints and branch are supported viaConfig.setRegion()andConfig.setBranch(). - Reference:
Contentstack.java,Stack.java,Config.java.
- Entries:
Stack.contentType(uid).entry(uid), query APIs, and entry fetch. Use existingEntry,Query,EntriesModel, and callback types. - Assets:
Stack.assetLibrary(), asset fetch and query. UseAsset,AssetLibrary,AssetModel, and related callbacks. - Content types: Content type schema and listing. Use
ContentType,ContentTypesModel,ContentTypesCallback. - Sync:
SyncStackfor sync API. Use existing sync request/response and pagination patterns. - Taxonomy: Taxonomy entries and structure. Use
Taxonomyand related API surface. - Official API: Align with Content Delivery API for parameters, response shape, and semantics.
- HTTP: All CDA requests go through
CSHttpConnectionand the RetrofitAPIService. Set headers (e.g. User-Agent, auth) perConstantsand existing request building. - Retry: Configure via
Config.setRetryOptions(RetryOptions).RetryInterceptorapplies retries perRetryOptions(limit, delay, backoff strategy, retryable status codes). Default retryable codes include 408, 429, 502, 503, 504. - Reference:
CSHttpConnection.java,APIService.java,RetryOptions.java,RetryInterceptor.java.
- Errors: Map API errors to the
Errorclass (errorMessage, errorCode, errDetails). Pass to the appropriate callback (e.g.ResultCallBack) so callers receive a consistent error shape. - Callbacks: Use existing callback types (
ResultCallBack,EntryResultCallBack,QueryResultsCallBack, etc.). Do not change callback contracts without considering backward compatibility.
- Entry points:
Contentstack,Stack,Config - CDA:
Entry,Query,Asset,AssetLibrary,ContentType,SyncStack,Taxonomy - HTTP / retry:
CSHttpConnection,APIService,RetryOptions,RetryInterceptor - Errors / results:
Error,QueryResult, and callback interfaces incom.contentstack.sdk
- Content Delivery API – Contentstack Docs
- Project rules:
.cursor/rules/contentstack-java-cda.mdc,.cursor/rules/java.mdc