ContextualCmsService

ContextualCmsService ⇐ CmsService

Kind: global class
Extends: CmsService
Service:

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

ParamTypeDefaultDescription
categoryIdstring

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]booleanfalse

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

ParamTypeDefaultDescription
contentIdstring

Identifier of a content

[options]Object

additional options

[options.force]booleanfalse

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

ParamTypeDescription
dataObject

A profile definition

[data.profile]Profile

the impacted profile holding a field id as the name of this profile