Class ecm.widget.viewer.model.ViewerItem
Extends
ecm.model.Item.
Represents a viewable item from the repository that is loaded into the viewer framework. This class
provides information about the viewer items that is used by the ContentViewer widget and the
ContentViewerPane widget.
Defined in: <ecm\widget\viewer\model\ViewerItem.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
- Fields borrowed from class ecm.model.Item:
- attributes, dataObject, deleted, entryTemplateId, locked, lockedUser, mimetype, parent, privileges, repository, resultSet
- Fields borrowed from class ecm.model._ModelObject:
- categorization, id, isRecurring, name, nameFilter, pane, status, type, userId
Method Summary
Method Attributes | Method Name and Description |
---|---|
constructor(item)
|
|
Returns true or false to indicate whether or not viewer map lookups for this document must match explicitly
by mimetype.
|
|
getAdjacentItem(delta)
If this item comes from a result set, this method will return the next item in the result set if delta is >
0, or the previous item in the result set if delta is < 0.
|
|
getDocUrl(preview, callback)
For iframe-based viewers (Where ecm.model.Viewer#viewerClass is
ecm.widget.viewer.IframeDocViewer), returns the docUrl value of the first matching viewer that maps
to this item.
|
|
getFallbackPreviewer(viewer, callback)
Gets the next fallback preview viewer in the list after the specified viewer.
|
|
getFallbackViewer(viewer, callback)
Gets the next fallback viewer in the list after the specified viewer.
|
|
getId()
|
|
getItem()
|
|
If this item comes from a result set, this method will return the zero-based index of the item within the
associated result set.
|
|
getLaunchUrl(preview, callback)
For iframe-based viewers (Where ecm.model.Viewer#viewerClass is
ecm.widget.viewer.IframeDocViewer), returns the launch URL, based on the first matching viewer that
maps to this item.
|
|
getViewer(preview, forceExplicitMatch, callback)
Returns the first matching viewer that maps to this item, from the current viewer map.
|
|
getViewerClasses(preview, forceExplicitMatch)
Gets a list of the unique classes for viewers that are required to be loaded for this item.
|
|
getViewers(preview, forceExplicitMatch, callback)
Returns an array of 0-n viewers that map to this item, in order of appearance in the current viewer map.
|
|
Returns true if this item is a member of a result set that contains a viewable item following this item.
|
|
Returns true if this item is a member of a result set that contains a viewable item prior to this item.
|
|
Returns true or false depending on whether or not this item is part of a result obtained from the repository.
|
|
Returns true or false depending on whether or not this item is part of a result obtained from the repository,
that has additional results available for retrieval.
|
|
retrieveNextPage(callback)
If this item is associated with a continuable result set that has more results available for retrieval, this
call will retrieve the next page of results into the result set.
|
|
<static> |
ecm.widget.viewer.model.ViewerItem.ViewerItem.loadSecure(targetWindow, url, newWindow)
Loads the viewer in the target window securely
|
- Methods borrowed from class ecm.model.Item:
- containsValue, getAttributeFormat, getAttributeType, getAttrLabel, getContentClass, getDisplayValue, getItemValue, getMimeClass, getModifyDate, getModifyUser, getPath, getStateClass, getUserInfo, getValue, getValues, hasAttribute, hasPrivilege, isAttributeReadOnly, isDeclareRecordEntryTemplate, isDocumentEntryTemplate, isEntryTemplate, isFolder, isFolderEntryTemplate, isSystemProperty, retrieveAttributes, setValue, setValues
- Methods borrowed from class ecm.model._ModelObject:
- destroy, onChange, own, refresh, toString
Method Detail
constructor(item)
- Parameters:
- item
{boolean} explicitMatchRequired()
Returns true or false to indicate whether or not viewer map lookups for this document must match explicitly
by mimetype. Viewer mappings that match by wildcard (match all MIME types) are excluded.
- Returns:
- {boolean}
{Item} getAdjacentItem(delta)
If this item comes from a result set, this method will return the next item in the result set if delta is >
0, or the previous item in the result set if delta is < 0. Returns null in all other cases.
- Parameters:
- delta
- Returns:
- {Item}
getDocUrl(preview, callback)
For iframe-based viewers (Where ecm.model.Viewer#viewerClass is
ecm.widget.viewer.IframeDocViewer), returns the docUrl value of the first matching viewer that maps
to this item.
- Parameters:
- preview
- Setting to true will always return the docUrl of the HTML Conversion Viewer. This parameter is optional and defaults to false if not specified.
- callback
- Required to use getDocUrl with the asynchronous loader.
getFallbackPreviewer(viewer, callback)
Gets the next fallback preview viewer in the list after the specified viewer.
- Parameters:
- viewer
- The current viewer to get the fallback for
- callback
- Required to use getFallbackViewer with the asynchronous loader.
getFallbackViewer(viewer, callback)
Gets the next fallback viewer in the list after the specified viewer.
- Parameters:
- viewer
- The current viewer to get the fallback for
- callback
- Required to use getFallbackViewer with the asynchronous loader.
getHtmlName()
getId()
- Deprecated:
- As of 2.0.2. Accessors are being replaced with accessing public properties directly. Use viewerItem.item.id.
getItem()
- Deprecated:
- As of 2.0.2. Accessors are being replaced with accessing public properties directly. Use viewerItem.item.
{number} getItemIndex()
If this item comes from a result set, this method will return the zero-based index of the item within the
associated result set. Returns -1 if there is no result set associated with this item.
- Returns:
- {number}
getLaunchUrl(preview, callback)
For iframe-based viewers (Where ecm.model.Viewer#viewerClass is
ecm.widget.viewer.IframeDocViewer), returns the launch URL, based on the first matching viewer that
maps to this item.
- Parameters:
- preview
- Setting to true will always return the launch URL based on the HTML Conversion Viewer. This parameter is optional and defaults to false if not specified.
- callback
- Required to use getLaunchUrl with the asynchronous loader.
getRepository()
- Deprecated:
- As of 2.0.2. Accessors are being replaced with accessing public properties directly. Use viewerItem.item.repository.
getResultSet()
- Deprecated:
- As of 2.0.2. Accessors are being replaced with accessing public properties directly. Use viewerItem.item.resultSet.
getViewer(preview, forceExplicitMatch, callback)
Returns the first matching viewer that maps to this item, from the current viewer map.
- Parameters:
- preview
- Setting to true will return the matching preview viewer. If no preview mappings have been specified, the HTML Conversion Viewer is returned. This parameter is optional and defaults to false if not specified.
- forceExplicitMatch
- Setting to true will return the first matching viewer that matches explicitly to the mime type of this item, excluding any viewers mapped via wildcard (match all MIME types). Default, is the boolean value returned from ecm.widget.viewer.model.ViewerItem#explicitMatchRequired.
- callback
- Required to use getViewer with the asynchronous loader.
getViewerClasses(preview, forceExplicitMatch)
Gets a list of the unique classes for viewers that are required to be loaded for this item.
- Parameters:
- preview
- Setting to true will always return an array containing the viewer class of the HTML Conversion Viewer as the first entry. Set to false (default) to obtain a list of viewer classes for all mappings from the viewer map. (optional)
- forceExplicitMatch
- Setting to true will return only viewer classes from mappings that match explicitly to the mime type of this item, excluding viewer classes mapped via wildcard (match all MIME types). Default, is the boolean value returned from ecm.widget.viewer.model.ViewerItem#explicitMatchRequired.
getViewers(preview, forceExplicitMatch, callback)
Returns an array of 0-n viewers that map to this item, in order of appearance in the current viewer map.
- Parameters:
- preview
- Setting to true will always return an array containing the HTML Conversion Viewer as the first entry. Set to false (default) to obtain mappings from the viewer map. (optional)
- forceExplicitMatch
- Setting to true will return only viewer mappings that match explicitly to the mime type of this item, excluding viewers mapped via wildcard (match all MIME types). Default, is the boolean value returned from ecm.widget.viewer.model.ViewerItem#explicitMatchRequired.
- callback
- Required to use getViewers with the asynchronous loader.
hasNextItem()
Returns true if this item is a member of a result set that contains a viewable item following this item. If
no viewable item is found, but the result set has continuation, this function will also return true.
- Since:
- 2.0.3.3
hasPreviousItem()
Returns true if this item is a member of a result set that contains a viewable item prior to this item.
- Since:
- 2.0.3.3
{boolean} hasResultSet()
Returns true or false depending on whether or not this item is part of a result obtained from the repository.
- Returns:
- {boolean}
{boolean} hasResultSetContinuation()
Returns true or false depending on whether or not this item is part of a result obtained from the repository,
that has additional results available for retrieval. If true,
ecm.widget.viewer.model.ViewerItem#retrieveNextpage can be called to retrieve the next page of
results from the result set.
- Returns:
- {boolean}
retrieveNextPage(callback)
If this item is associated with a continuable result set that has more results available for retrieval, this
call will retrieve the next page of results into the result set.
- Parameters:
- callback
- An optional method to call on completion of the retrieval.
<static> ecm.widget.viewer.model.ViewerItem.ViewerItem.loadSecure(targetWindow, url, newWindow)
Loads the viewer in the target window securely
- Parameters:
- targetWindow
- Name of the target window to display the viewer
- url
- URL to load the viewer content
- newWindow
- Boolean indicating if a new window should be created