CmsResource
Reads published CMS content for the configured tenant.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.24+fa54770
public final class CmsResourceReads published CMS content for the configured tenant. Get it from Ovok.cms().
Methods
documents
public CmsResource.Documents documents()Returns the generic document routes.
Returns: the document routes
releaseNotes
public CmsResource.ReleaseNotes releaseNotes()Returns the release-note routes.
Returns: the release-note routes
legalPage
public JsonNode legalPage(
String slug,
Map<String, ?> params,
RequestOptions options) throws IOException, InterruptedExceptionReads a legal page (GET /v1/public/cms/collections/legal-pages/items/{slug}).
Parameters:
slug: the page slugparams:locale,page,limitandsortoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
translations
public JsonNode translations(
String locale,
RequestOptions options) throws IOException, InterruptedExceptionReads every translation document for a locale and merges them into one key tree.
Parameters:
locale: the locale, such asde; unsupported locales fall back toenoptions: per-request options, such as the timeout
Returns: the translations, keyed by document slug then key path
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
CmsResource.Documents
public static final class DocumentsReads documents from any CMS collection.
Documents.list
public Page<JsonNode> list(
String collection,
Map<String, ?> params,
RequestOptions options) throws IOException, InterruptedExceptionLists documents in a collection (GET /v1/public/cms/collections/{collection}/items).
Parameters:
collection: the CMS collection slugparams:locale,page,limitandsortoptions: per-request options, such as the timeout
Returns: the first page; iterating it loads the next pages
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Documents.retrieve
public JsonNode retrieve(
String collection,
String slug,
Map<String, ?> params,
RequestOptions options) throws IOException, InterruptedExceptionReads one document (GET /v1/public/cms/collections/{collection}/items/{slug}).
Parameters:
collection: the CMS collection slugslug: the document slugparams:locale,page,limitandsortoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the responseOvokValidationException: if the slug is empty
CmsResource.ReleaseNotes
public static final class ReleaseNotesReads release notes, newest first.
ReleaseNotes.list
public Page<JsonNode> list(
Map<String, ?> params,
RequestOptions options) throws IOException, InterruptedExceptionLists release notes, newest first unless sort is given.
Parameters:
params:locale,page,limitandsortoptions: per-request options, such as the timeout
Returns: the first page; iterating it loads the next pages
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Last updated on