Package com.saperion.ngc.viewer
Interface ViewerComponent
- All Superinterfaces:
Cloneable
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.ext.Scope
,Serializable
- All Known Implementing Classes:
HylandViewerImpl
,MediaViewerImpl
,PdfjsViewerImpl
,SimpleViewerImpl
,VirtualViewerHTML5
public interface ViewerComponent
extends org.zkoss.zk.ui.Component
Interface for the different types of viewers used in a
DocumentView
.-
Field Summary
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Used by the webclient to determine if this type of viewer is able to edit documents.boolean
Used by web client to determine if this type of viewer can show the document revisionsvoid
disable()
Disables the viewer.void
displayDocument
(String documentUrl, String annotationUrl, DocumentArchiveMetaInfo.ElementArchiveMetaInfo pageMetaInfo, DocumentId documentId) Displays a document.void
displayTemporaryDocument
(String documentUrl, TemporaryDocumentId id) Displays a temporary (not yet archived) document.void
enable()
Enables the viewer.Returns the name of the configuration file needed for this implementation of ViewerComponent.Returns the relative path to the JSP used as external window or null if this viewer does not offer an external window.boolean
Returns, if the viewer has open changes.void
Called from parent component to initialize the viewer-component.void
Refreshes the viewer using the last opened document.void
Resets the view so that the viewer applet will not re-open the last opened document.void
resetView
(boolean showInitImage) Resets the view so that the viewer applet will not re-open the last opened document.void
setParentViewComponent
(DocumentView documentView) Used to pass a reference to the parent component to this ViewerComponent.void
Method used to notify the ViewerComponent that the tab it is contained in was selected.Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getDefinition, getDesktop, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, query, queryAll, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Method Details
-
displayDocument
void displayDocument(String documentUrl, String annotationUrl, DocumentArchiveMetaInfo.ElementArchiveMetaInfo pageMetaInfo, DocumentId documentId) Displays a document. The content of the document and of the annotations can be retrieved by using the URLs passed to the viewer. Alternatively, the document can by identified by the ID. The filename is passed only to inform the viewer about the document.- Parameters:
documentUrl
- the document urlannotationUrl
- the annotation urlpageMetaInfo
- meta information about the page to be displayeddocumentId
- Id of the document
-
displayTemporaryDocument
Displays a temporary (not yet archived) document. The content of the temporary document can be retrieved by using the URL and id passed to the viewer.- Parameters:
documentUrl
- The URL to the download servlet.id
- The id of the temporary document.
-
init
Called from parent component to initialize the viewer-component.- Parameters:
viewerId
- the id of the viewer, passed only as additional information
-
refreshDocument
void refreshDocument()Refreshes the viewer using the last opened document. -
resetView
void resetView()Resets the view so that the viewer applet will not re-open the last opened document. The opened document will be closed. -
resetView
void resetView(boolean showInitImage) Resets the view so that the viewer applet will not re-open the last opened document. The opened document will be closed.- Parameters:
showInitImage
- if true, the viewer will show an initial image
-
disable
void disable()Disables the viewer. -
enable
void enable()Enables the viewer. -
hasOpenChanges
boolean hasOpenChanges()Returns, if the viewer has open changes.- Returns:
- Has open changes
-
setParentViewComponent
Used to pass a reference to the parent component to this ViewerComponent. Optional.- Parameters:
documentView
- the new parent view component
-
tabSelected
void tabSelected()Method used to notify the ViewerComponent that the tab it is contained in was selected. Not used if the component is not contained in a tab. -
getConfigurationFile
String getConfigurationFile()Returns the name of the configuration file needed for this implementation of ViewerComponent. If no file is needed, null should be returned. The name of the file must include the path relative to the configuration folders (/config/ and /custom-config/.- Returns:
- name of the configuration file or null if no configuration file is needed
-
canModifyDocument
boolean canModifyDocument()Used by the webclient to determine if this type of viewer is able to edit documents.- Returns:
- whether this viewer can edit documents
-
canShowRevisions
boolean canShowRevisions()Used by web client to determine if this type of viewer can show the document revisions- Returns:
- whether this viewer enables revision viewing
-
getExternalViewerWindowPath
String getExternalViewerWindowPath()Returns the relative path to the JSP used as external window or null if this viewer does not offer an external window.- Returns:
- path to the JSP or null if not supported
-