Class ecm.model.Viewer
Extends
ecm.model._ModelObject.
Represents a viewer that is used to display content. This class maintains the name and launching
information that is configured for the viewer. This information is used by the ContentViewer widget to
invoke the viewer. Private functions should not be used to access public members of the class. Access
member variables directly. For example:
var viewer = new Viewer({ id: "myviewer", name: "myviewer"});
console.debug("Viewer ID=" + viewer.id);
Defined in: <ecm\model\Viewer.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
ecm.model.Viewer(properties)
Constructs the viewer model object.
|
Field Summary
Field Attributes | Field Name and Description |
---|---|
Boolean indicating if the viewer should be include the security token in the url.
|
|
The viewer is suitable for use in document Preview.
|
|
Boolean indicating if the viewer should be launched in a separate browser window.
|
|
A URL template that will launch the viewer.
|
|
An object containing fields for the content types supported by this viewer.
|
|
The name of the Dojo class implementing the viewer.
|
- Fields borrowed from class ecm.model._ModelObject:
- categorization, id, isRecurring, name, nameFilter, pane, status, type, userId
Method Summary
Method Attributes | Method Name and Description |
---|---|
addViewerMapping(viewerMapping)
Add an associated mapping to the viewer's mapping list.
|
|
getDocUrl(item)
Generates the generic doc retrieval URL that typically gets encoded into the viewer launch URL.
|
|
getLaunchUrl(item)
Generates a URL that can be used to launch this viewer within a browser window or iframe, for the given item.
|
Constructor Detail
ecm.model.Viewer(properties)
Constructs the viewer model object.
- Parameters:
- properties
- The properties for the viewer model object. These properties can be any of the fields as defined below and on ecm.model._ModelObject.
Field Detail
includeSecurityToken
Boolean indicating if the viewer should be include the security token in the url.
isPreviewViewer
The viewer is suitable for use in document Preview.
- Since:
- 2.0.3
launchInSeparateWindow
Boolean indicating if the viewer should be launched in a separate browser window.
launchUrl
A URL template that will launch the viewer. The template can have the following variables:
- docId: The identifier for the document
- docName: The name of the document. The name can be displayed in the user interface
- template: The identifier of the content class for the document
- mimeType: The MIME content type of the document
- serverType: The content repository type (cm, od, p8, ci, cmis)
- vsId: For P8 documents
- replicationGroup: For P8 documents
- docUrl: A URL that will load the document content
- privs: A string of privileges for the document
supportedContentTypes
An object containing fields for the content types supported by this viewer.
viewerClass
The name of the Dojo class implementing the viewer. This class is extension of
ecm.widget.viewer.DocViewer.
Method Detail
addViewerMapping(viewerMapping)
Add an associated mapping to the viewer's mapping list.
- Parameters:
- viewerMapping
getDocUrl(item)
Generates the generic doc retrieval URL that typically gets encoded into the viewer launch URL.
- Parameters:
- item
getLaunchUrl(item)
Generates a URL that can be used to launch this viewer within a browser window or iframe, for the given item.
- Parameters:
- item
- An instance of ecm.model.ContentItem for the document.