Class ecm.content.RecentContents
This class provides methods to manage recent contents.
Defined in: <ecm\content\RecentContents.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Method Attributes | Method Name and Description |
---|---|
addItems(items, callback, errorback)
Adds items as recent contents.
|
|
constructor(service)
|
|
get(index, callback, errorback)
Gets the recent content at the index.
|
|
list(callback, errorback)
Retrieves the recent contents.
|
|
remove(contentIds, callback, errorback)
Removes the recent contents.
|
|
retrieve(contentId, callback, errorback)
Retrieves the recent content with its item refreshed.
|
Method Detail
addItems(items, callback, errorback)
Adds items as recent contents.
- Parameters:
- items
- The ecm.model.ContentItem objects to be added
- callback
- An optional function to be called on success
- errorback
- An optional function to be called on failure
- Returns:
- The ecm.model.Request object
constructor(service)
- Parameters:
- service
get(index, callback, errorback)
Gets the recent content at the index.
- Parameters:
- index
- The indext of the recent content to be returned
- callback
- An optional function to be called on success
- errorback
- An optional function to be called on failure
list(callback, errorback)
Retrieves the recent contents. The list is obtained from cache if available.
- Parameters:
- callback
- An optional function to be called on success
- errorback
- An optional function to be called on failure
- Returns:
- The ecm.model.Request object if cache is not available
remove(contentIds, callback, errorback)
Removes the recent contents.
- Parameters:
- contentIds
- The Ids of recent contents to be removed
- callback
- An optional function to be called on success
- errorback
- An optional function to be called on failure
- Returns:
- The ecm.model.Request object
retrieve(contentId, callback, errorback)
Retrieves the recent content with its item refreshed.
- Parameters:
- contentId
- The Id of the recent content to be retrieved
- callback
- An optional function to be called on success
- errorback
- An optional function to be called on failure