Package com.saperion.ngc.viewer
Interface ViewerComponent
-
- All Superinterfaces:
java.lang.Cloneable
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.ext.Scope
,java.io.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 aDocumentView
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canModifyDocument()
Used by the webclient to determine if this type of viewer is able to edit documents.boolean
canShowRevisions()
Used by web client to determine if this type of viewer can show the document revisionsvoid
disable()
Disables the viewer.void
displayDocument(java.lang.String documentUrl, java.lang.String annotationUrl, DocumentArchiveMetaInfo.ElementArchiveMetaInfo pageMetaInfo, DocumentId documentId)
Displays a document.void
displayTemporaryDocument(java.lang.String documentUrl, TemporaryDocumentId id)
Displays a temporary (not yet archived) document.void
enable()
Enables the viewer.java.lang.String
getConfigurationFile()
Returns the name of the configuration file needed for this implementation of ViewerComponent.java.lang.String
getExternalViewerWindowPath()
Returns the relative path to the JSP used as external window or null if this viewer does not offer an external window.boolean
hasOpenChanges()
Returns, if the viewer has open changes.void
init(java.lang.String viewerId)
Called from parent component to initialize the viewer-component.void
refreshDocument()
Refreshes the viewer using the last opened document.void
resetView()
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
tabSelected()
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
-
-
-
-
Method Detail
-
displayDocument
void displayDocument(java.lang.String documentUrl, java.lang.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
void displayTemporaryDocument(java.lang.String documentUrl, TemporaryDocumentId id)
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
void init(java.lang.String viewerId)
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
void setParentViewComponent(DocumentView documentView)
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
java.lang.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
java.lang.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
-
-