Class ecm.model._RecentObjectsMixin

Provides methods to retrieve, add and remove recent searches, files and teamspaces. Recent searches, files and teamspaces are stored in the user configuration with minimal data, so items must be explicitly loaded before use. For example:

var callback = function(item) { // item is loaded and ready for use };
var request = repository.retrieveItem(recentFile.itemId, callback, "", "", recentFile.vsId);


Defined in: <ecm\model\_RecentObjectsMixin.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Mixin for managing recent searches, files and teamspaces.

Method Summary

Method Attributes Method Name and Description
<static>  
ecm.model._RecentObjectsMixin.addRecentItem(item, callback)
Asynchronously adds the specified item to the list of recent items.
<static>  
ecm.model._RecentObjectsMixin.addRecentItems(item, callback)
Asynchronously adds the specified items to the list of recent items.
<static>  
ecm.model._RecentObjectsMixin.addRecentTeamspace(item, callback)
Asynchronously adds the specified teamspace to the list of recent teamspaces.
<static>  
ecm.model._RecentObjectsMixin.addRecentTeamspaces(item, callback)
Asynchronously adds the specified teamspaces to the list of recent teamspaces.
<static>  
ecm.model._RecentObjectsMixin.clearRecentItems()
Clears the cached list of recent items.
<static>  
ecm.model._RecentObjectsMixin.clearRecentObjects()
Clears the cached lists of recent objects.
<static>  
ecm.model._RecentObjectsMixin.clearRecentTeamspaces()
Clears the cached list of recent items.
<static>  
ecm.model._RecentObjectsMixin.onRecentItemAdded(recentItems)
Called when an item is added to the list of recent items.
<static>  
ecm.model._RecentObjectsMixin.onRecentItemsRemoved(recentItems)
Called when an item is removed from the list of recent items.
<static>  
ecm.model._RecentObjectsMixin.onRecentTeamspaceAdded(recentItems)
Called when a teamspace is added to the list of recent teamspaces.
<static>  
ecm.model._RecentObjectsMixin.onRecentTeamspacesRemoved(recentTeamspaces)
Called when a teamspace is removed from the list of recent teamspaces.
<static>  
ecm.model._RecentObjectsMixin.removeRecentItems(search, callback)
Asynchronously removes the specified item from the list of recent items.
<static>  
ecm.model._RecentObjectsMixin.removeRecentTeamspaces(search, callback)
Asynchronously removes the specified teamspaces from the list of recent teamspaces.
<static>  
ecm.model._RecentObjectsMixin.retrieveRecentItems(callback)
Calls the specified function with the list of recent items.
<static>  
ecm.model._RecentObjectsMixin.retrieveRecentTeamspaces(callback)
Calls the specified function with the list of recent teamspaces.

Constructor Detail

ecm.model._RecentObjectsMixin()

Mixin for managing recent searches, files and teamspaces.

Method Detail

<static> ecm.model._RecentObjectsMixin.addRecentItem(item, callback)

Asynchronously adds the specified item to the list of recent items.
Parameters:
item
The ecm.model.Item object to be added to the list of recent items
callback
An optional function called with the updated list of recent items after the item is added

<static> ecm.model._RecentObjectsMixin.addRecentItems(item, callback)

Asynchronously adds the specified items to the list of recent items.
Parameters:
item
An array of ecm.model.Item objects to be added to the list of recent items
callback
An optional function called with the updated list of recent items after the items are added

<static> ecm.model._RecentObjectsMixin.addRecentTeamspace(item, callback)

Asynchronously adds the specified teamspace to the list of recent teamspaces.
Parameters:
item
The ecm.model.Teamspace object to be added to the list of recent teamspaces
callback
An optional function called with the updated list of recent teamspaces after the teamspace is added

<static> ecm.model._RecentObjectsMixin.addRecentTeamspaces(item, callback)

Asynchronously adds the specified teamspaces to the list of recent teamspaces.
Parameters:
item
An array of ecm.model.Teamspace objects to be added to the list of recent teamspaces
callback
An optional function called with the updated list of recent teamspaces after the teamspaces are added

<static> ecm.model._RecentObjectsMixin.clearRecentItems()

Clears the cached list of recent items.

<static> ecm.model._RecentObjectsMixin.clearRecentObjects()

Clears the cached lists of recent objects.

<static> ecm.model._RecentObjectsMixin.clearRecentTeamspaces()

Clears the cached list of recent items.

<static> ecm.model._RecentObjectsMixin.onRecentItemAdded(recentItems)

Called when an item is added to the list of recent items.
Parameters:
recentItems
The updated list of recent items

<static> ecm.model._RecentObjectsMixin.onRecentItemsRemoved(recentItems)

Called when an item is removed from the list of recent items.
Parameters:
recentItems
The updated list of recent items

<static> ecm.model._RecentObjectsMixin.onRecentTeamspaceAdded(recentItems)

Called when a teamspace is added to the list of recent teamspaces.
Parameters:
recentItems
The updated list of recent teamspaces

<static> ecm.model._RecentObjectsMixin.onRecentTeamspacesRemoved(recentTeamspaces)

Called when a teamspace is removed from the list of recent teamspaces.
Parameters:
recentTeamspaces
The updated list of recent teamspaces

<static> ecm.model._RecentObjectsMixin.removeRecentItems(search, callback)

Asynchronously removes the specified item from the list of recent items.
Parameters:
search
The ecm.model.Item object to be removed from the list of recent items
callback
An optional function called with the updated list of recent items after the item is removed

<static> ecm.model._RecentObjectsMixin.removeRecentTeamspaces(search, callback)

Asynchronously removes the specified teamspaces from the list of recent teamspaces.
Parameters:
search
The ecm.model.Teamspace object to be removed from the list of recent teamspaces
callback
An optional function called with the updated list of recent teamspaces after the item is removed

<static> ecm.model._RecentObjectsMixin.retrieveRecentItems(callback)

Calls the specified function with the list of recent items. The list is obtained from cache if available; otherwise, it is retrieved asynchronously. The items are ecm.model.Item stubs that must be loaded before use.
Parameters:
callback

<static> ecm.model._RecentObjectsMixin.retrieveRecentTeamspaces(callback)

Calls the specified function with the list of recent teamspaces. The list is obtained from cache if available; otherwise, it is retrieved asynchronously. The items are ecm.model.Teamspace stubs that must be loaded before use.
Parameters:
callback