Class ecm.model.Favorite


Extends ecm.model._ModelObject.
Represents an object added to favorites.
Defined in: <ecm\model\Favorite.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
ecm.model.Favorite(properties)
Constructor

Field Summary

Field Attributes Field Name and Description
 
ID of the favorite.
 
Boolean indicating if the item associated with this favorite has content.
 
hidden 
Boolean indicating if the favorite is hidden.
 
item 
An ecm.model.Item instance associated with this favorite.
 
Mimetype of the favorite.
 
Id of the object associated with this favorite.
 
An instance of ecm.model.Repository for the repository containing the favorite item.
 
Label to display for repositories in a list view.
 
Favorite subType.
 
Object containing the devices registered to sync this favorite.
 
Boolean value indicating if this favorite is enabled for sync.
 
syncId 
ID of the favorite on the sync server (if the favorite is being synced).
 
Template name of the class definition for the favorite object.
 
type 
Favorite type (folder, teamspace, search, document or work item).
 
vsId 
Template name of the class definition for the favorite object.
Fields borrowed from class ecm.model._ModelObject:
categorization, id, isRecurring, name, nameFilter, pane, status, userId

Method Summary

Method Attributes Method Name and Description
 
Return the context menu type for this favorite item if selected.
 
Returns all the attributes associated with this favorite.
 
Returns the icon class (file type) for this favorite MIME type.
 
Returns the parent path of the favorite item.
 
Returns the State icon CSS class for that specified state.
 
getValue(attrName)
Returns the value of the given attribute name.
 
getValues(attribute)
Returns an array of values for the attribute.
 
hasAttribute(attribute)
Returns true if the item's attribute is specified.
 
Returns true if the item associated with this favorite has content.
 
hasPrivilege(privilege)
Returns true if the item has the specified privilege.
 
Returns true if the item is an entry template that declares records.
 
Returns true if the item is an entry template that creates documents.
 
Returns true if the item is an entry template.
 
Returns true if the favorite is a folder and false if it is not.
 
Returns true if the item is an entry template that creates folders.
 
retrieveFavorite(callback, params)
Retrieves the item associated with the favorite.
 
Generates a json definition for this favorite.
Methods borrowed from class ecm.model._ModelObject:
destroy, onChange, own, refresh, toString

Constructor Detail

ecm.model.Favorite(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

favoriteId

ID of the favorite.

hasContentFlag

Boolean indicating if the item associated with this favorite has content.

hidden

Boolean indicating if the favorite is hidden.

item

An ecm.model.Item instance associated with this favorite.

mimetype

Mimetype of the favorite.

objectId

Id of the object associated with this favorite.

repository

An instance of ecm.model.Repository for the repository containing the favorite item.

repositoryLabel

Label to display for repositories in a list view.

subType

Favorite subType.

syncDevices

Object containing the devices registered to sync this favorite.
Deprecated:
As of 2.0.3.5. Sync Favorite will be removed in a future release.

syncEnabled

Boolean value indicating if this favorite is enabled for sync.
Since:
2.0.3

syncId

ID of the favorite on the sync server (if the favorite is being synced).
Deprecated:
As of 2.0.3.5. Sync Favorite will be removed in a future release.
Since:
2.0.3

template

Template name of the class definition for the favorite object.

type

Favorite type (folder, teamspace, search, document or work item).

vsId

Template name of the class definition for the favorite object.

Method Detail

getActionsMenuItemsType(loadBaseMenu)

Return the context menu type for this favorite item if selected. If null is returned, the context menu type is determined by the FavoritesResultSet.
Parameters:
loadBaseMenu
Boolean indicating whether to load just the base favorite actions. If false, item-specific context menus will be loaded.
Since:
2.0.3

getAttributes()

Returns all the attributes associated with this favorite.

getMimeClass()

Returns the icon class (file type) for this favorite MIME type.

getPath()

Returns the parent path of the favorite item.

getStateClass(state)

Returns the State icon CSS class for that specified state.
Parameters:
state
The id from Admin of the particular state class you are looking for
Since:
2.0.3

getValue(attrName)

Returns the value of the given attribute name.
Parameters:
attrName
Attribute to return.

getValues(attribute)

Returns an array of values for the attribute. For a single-value attribute this will be an array of one value. For multi-value attributes, this will be an array with all values of the attribute.
Parameters:
attribute
The attribute identifier.

hasAttribute(attribute)

Returns true if the item's attribute is specified.
Parameters:
attribute
The identifier of the attribute to test.

hasContent()

Returns true if the item associated with this favorite has content.

hasPrivilege(privilege)

Returns true if the item has the specified privilege.
Parameters:
privilege
The identifier of the privilege to test.

isDeclareRecordEntryTemplate()

Returns true if the item is an entry template that declares records.
Since:
2.0.3

isDocumentEntryTemplate()

Returns true if the item is an entry template that creates documents.
Since:
2.0.3

isEntryTemplate()

Returns true if the item is an entry template.
Since:
2.0.3

isFolder()

Returns true if the favorite is a folder and false if it is not.

isFolderEntryTemplate()

Returns true if the item is an entry template that creates folders.
Since:
2.0.3

retrieveFavorite(callback, params)

Retrieves the item associated with the favorite.
Parameters:
callback
A function that is called when the favorite retrieval has completed.
params
An object containing parameters to control the request to the server. For example, you can set the retrieve to be performed in the background. See ecm.model.Request for a list of parameters supported by a server request.

toJSON()

Generates a json definition for this favorite.