Class ecm.model.FavoritesResultSet


Extends ecm.model._ModelObject.
This class represents a set of favorite results. The most efficient method to iterate through the results is to use getStore and use dijits that support dojo.data stores.
Defined in: <ecm\model\FavoritesResultSet.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Constructor

Field Summary

Field Attributes Field Name and Description
 
Returns an array of column names.
 
Returns boolean true if has a toolbar.
 
items 
List of ecm.model.Favorite objects to load.
 
Structure of the favorites magazine view.
 
Index of the mime type column.
 
Returns the paging size to use.
 
Parent folder in the favorites tree.
 
Structure of favorites details view.
Fields borrowed from class ecm.model._ModelObject:
categorization, id, isRecurring, name, nameFilter, pane, status, type, userId

Method Summary

Method Attributes Method Name and Description
 
doSort(p, afterSort, store)
Sort the result set by a column property
<static>  
ecm.model.FavoritesResultSet.FavoritesResultSet.registerFactory(factory)
Static function that registers a factory for sub-classes of FavoritesResultSet.
 
getActionsMenuItemsType(items, loadBaseMenu)
Return the context menu type for the list of items
 
Returns an array of column names.
 
Returns the index of the given ecm.model.Favorite object.
 
getItem(index)
Returns the favorite located at the given index.
 
getItems(handler)
Returns an array of ecm.model.Favorite objects for all hits in the result set.
 
Returns a dojo.data store that can be used to read the results directly into a dojox.grid
 
Return the default toolbar name.
 
 
 
Check the result set for being associated with the item.
 
loadContextMenu(items, callback, loadBaseMenu)
Load the context menu actions for the set of items
 
loadToolbar(callback)
Load the default favorites toolbar.
 
Refreshes the favorites view.
 
Clears the favorites cache and reloads favorites from the server.
 
saveStructure(structure, saveStructureCallback)
 
setItem(index, item)
Sets the new item at the provided index for this result set.
Methods borrowed from class ecm.model._ModelObject:
destroy, onChange, own, toString

Constructor Detail

ecm.model.FavoritesResultSet(properties)

Constructor
Parameters:
properties
The properties for the model object. The properties can be any of the public fields as defined below and on ecm.model._ModelObject.

Field Detail

columnNames

Returns an array of column names.

hasToolbar

Returns boolean true if has a toolbar.

items

List of ecm.model.Favorite objects to load.

magazineStructure

Structure of the favorites magazine view.

mimeIndex

Index of the mime type column.

pageSize

Returns the paging size to use.

parentFolder

Parent folder in the favorites tree.

structure

Structure of favorites details view.

Method Detail

doSort(p, afterSort, store)

Sort the result set by a column property
Parameters:
p
Column property to sort on.
afterSort
A function called after the sort process has completed.
store
A ModelStore

<static> ecm.model.FavoritesResultSet.FavoritesResultSet.registerFactory(factory)

Static function that registers a factory for sub-classes of FavoritesResultSet.
Parameters:
factory
A factory object with createFromJSON method to possibly create a sub-class of FavoritesResultSet. The factory method should return null when the given item is not one for known sub-classes, giving chances for other factories to create one or falling back to the default FavoritesResultSet construction.
Since:
2.0.3

getActionsMenuItemsType(items, loadBaseMenu)

Return the context menu type for the list of items
Parameters:
items
A array of favorite items
loadBaseMenu
Boolean indicating whether to load just the base favorite actions. If false, item-specific context menus will be loaded.

getColumns()

Returns an array of column names.

getIndexOfItem(item)

Returns the index of the given ecm.model.Favorite object.
Parameters:
item
The favorite to locate in the items array.
Returns:
The number index of the favorite.

getItem(index)

Returns the favorite located at the given index.
Parameters:
index
Index of the favorite.
Returns:
The ecm.model.Favorite object at the given index.

getItems(handler)

Returns an array of ecm.model.Favorite objects for all hits in the result set.
Parameters:
handler
Function.
Returns:
Array of ecm.model.Favorite objects.

getStore()

Returns a dojo.data store that can be used to read the results directly into a dojox.grid

getToolbarDef()

Return the default toolbar name.

hasContinuation()


isMaxResultsReached()


isResultSetForItem(item)

Check the result set for being associated with the item.
Parameters:
item
A content item object

loadContextMenu(items, callback, loadBaseMenu)

Load the context menu actions for the set of items
Parameters:
items
An array of favorite items.
callback
A function called when the context menu items have been loaded.
loadBaseMenu
Set this flag to true to load only the base favorite menu. This is used when we fail to authenticate with the repository containing the favorite item or cannot retrieve the item associated with the favorite.

loadToolbar(callback)

Load the default favorites toolbar.
Parameters:
callback
A function called when the toolbar actions have been loaded.

refresh()

Refreshes the favorites view.

reload()

Clears the favorites cache and reloads favorites from the server.
Since:
2.0.3.3

saveStructure(structure, saveStructureCallback)

Parameters:
structure
saveStructureCallback

setItem(index, item)

Sets the new item at the provided index for this result set.
Parameters:
index
Location in the items are to store the item.
item
Item to store in the items array.