ContextualCmsService
ContextualCmsService ⇐ CmsService
Kind: global class
Extends: CmsService
Service:
- ContextualCmsService ⇐
CmsService- new ContextualCmsService()
- .getContents(categoryId, [options]) ⇒
Promise.<ContextualContentList, Error> - .getContent(contentId, [options]) ⇒
Promise.<Content, Error> - ._clearProfileContent(data)
ContextualCmsService()
Class handling the Contextual CMS service.
getContents(categoryId, [options]) ⇒ Promise.<ContextualContentList, Error>
Retrieves contextual contents of the given filter.
Kind: instance method of ContextualCmsService
Returns: Promise.<ContextualContentList, Error> - Returns a promise holding the list of contents
| Param | Type | Default | Description |
|---|---|---|---|
| categoryId | string | A category identifier | |
| [options] | object | some options | |
| [options.start] | number | The index of the first content to retrieve | |
| [options.number] | number | Value used to limit the number of content fetched | |
| [options.force] | boolean | false | If set to true, don't use the cache |
| [options.duration] | number | | Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getContent(contentId, [options]) ⇒ Promise.<Content, Error>
Retrieves some content details by providing its identifier.
Kind: instance method of ContextualCmsService
Returns: Promise.<Content, Error> - Returns a promise holding the list of content details
| Param | Type | Default | Description |
|---|---|---|---|
| contentId | string | Identifier of a content | |
| [options] | Object | additional options | |
| [options.force] | boolean | false | If set to true, don't use the cache |
| [options.duration] | number | | Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
_clearProfileContent(data)
Clear cache for impacted profile change.
Kind: instance method of ContextualCmsService
Access: protected
| Param | Type | Description |
|---|---|---|
| data | Object | A profile definition |
| [data.profile] | Profile | the impacted profile holding a field |