Package com.saperion.ngc.viewer.simple
Class MediaViewerImpl
- java.lang.Object
- 
- org.zkoss.zk.ui.AbstractComponent
- 
- org.zkoss.zk.ui.HtmlBasedComponent
- 
- org.zkoss.zul.impl.XulElement
- 
- org.zkoss.zul.Window
- 
- com.saperion.ngc.events.BaseWindow
- 
- com.saperion.ngc.viewer.simple.MediaViewerImpl
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- EventChild,- EventChildHandler,- LogEventChildHandler,- ViewerComponent,- java.io.Serializable,- java.lang.Cloneable,- org.zkoss.zk.ui.Component,- org.zkoss.zk.ui.ext.Scope,- org.zkoss.zk.ui.IdSpace,- org.zkoss.zk.ui.sys.ComponentCtrl,- org.zkoss.zul.ext.Framable
 
 public class MediaViewerImpl extends BaseWindow implements ViewerComponent A viewer that can display images (JPG, PNG, GIF) and PDF documents. If enabled, other files will be rendered to PDF. Otherwise a download-link will be displayed.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringEMBED_MP4Embed MP4 objects.static java.lang.StringEMBED_PDFEmbed PDF objects.static java.lang.StringUSE_RENDER_ENGINEUse render engine to display unknown formats.- 
Fields inherited from interface org.zkoss.zk.ui.ComponentAPPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 - 
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrlAFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 - 
Fields inherited from interface com.saperion.ngc.events.EventChildALL_EVENTS, ON_ADD_LINK, ON_ADD_LOOKUP, ON_ADD_TO_FAVORITES, ON_AFTER_QUERY, ON_BUTTON, ON_BUTTON_QUERY, ON_CANCEL, ON_CANCEL_AND, ON_CANCEL_EDIT, ON_CHANGE_DOCUMENT_SECURITY, ON_CHANGE_FOLDER_SECURITY, ON_CLEAR, ON_DELETE_SELECTED, ON_DISPLAY_POPUP, ON_DISPLAY_RESULTITEM, ON_DISPLAY_TEMPORARY_DOCUMENT, ON_DOCUMENT_ADDED, ON_DOCUMENT_CHECK, ON_DOCUMENT_FILING, ON_DOCUMENT_LOCKED, ON_DOCUMENT_PROLONG_RETENTION, ON_DOCUMENT_REDUCE_DISPOSITION, ON_DOCUMENT_RELEASE, ON_DOWNLOAD_RESULTITEM, ON_EDIT_CONTENT, ON_EDIT_FOLDER, ON_EDIT_ITEM, ON_EDIT_ITEM_SELECTED, ON_EDIT_LOOKUP, ON_EDIT_SELECTED, ON_EDIT_STRUCTURE, ON_EXPORT, ON_EXTERNAL_STORAGE_UPLOAD, ON_EXTERNAL_STORAGE_UPLOAD_STATUS, ON_FAST_ACCESS_DRAG_OVER, ON_FIELD_CHANGE, ON_FILE_ACTION, ON_FILE_PREVIEW, ON_FILE_SEARCH, ON_FORM_CREATED, ON_FORM_RENDER_ERROR, ON_FORWARD, ON_IGNORE, ON_INDEX, ON_INDEX_CLEAR, ON_INDEX_RESULTITEM, ON_ITEM_DOUBLECLICK, ON_LAUNCH_WORKFLOW, ON_LOG, ON_LOGON, ON_MACRO, ON_NAVIGATION, ON_NAVIGATION_FOLDER, ON_NAVIGATION_FORM, ON_NAVIGATION_WEBPART, ON_NEW_ITEM, ON_NEW_SELECTED, ON_OK, ON_ONEDRIVE_LOGIN, ON_OPEN_INDEX_MASK, ON_OPEN_MASK, ON_OPEN_QUERY_MASK, ON_PASSWORD_EXPIRED, ON_PRINT_DOCUMENTS, ON_QUERY, ON_QUERY_FAVORITE, ON_REFRESH, ON_REFRESH_FOLDER, ON_RESET_GUI, ON_REVISION_CREATED, ON_SAVE_AND, ON_SAVE_DOC, ON_SAVE_FOLDER, ON_SCROLL_NODE, ON_SELECT_TREE_ITEM, ON_SELECTDDC, ON_SEND_MAIL_RESULTITEM, ON_SET_LITIGATION_HOLD, ON_SHAREBASE_DOCUMENT_CHECK, ON_SHAREBASE_LOGIN, ON_START_WORKFLOW, ON_TAB_SELECTED, ON_UNDELETE_SELECTED, ON_UPLOAD_DOCUMENT, ON_UPLOAD_EXTERNAL_STORAGE_DOCUMENT, ON_UPLOAD_SUCCESS, ON_VARIABLES_AVAILABLE, ON_WF, ON_WF_COMMENT_DIALOG_CANCEL, ON_WF_COMMENT_DIALOG_OK, ON_WFCOMMENTS, ON_WFDELEGATE, ON_WFFORWARD, ON_WFFORWARD1, ON_WFFORWARD2, ON_WFFORWARD3, ON_WFFORWARD4, ON_WFFORWARD5, ON_WFHISTORY, ON_WFPUTBACK, ON_WFREMINDER, ON_WFTAKE, ON_WORKFLOW_ACTION, ON_WORKFLOW_COMMENT, ON_WORKFLOW_DISPLAY_COMMENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description MediaViewerImpl()Constructor.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanModifyDocument()Used by the webclient to determine if this type of viewer is able to edit documents.booleancanShowRevisions()Used by web client to determine if this type of viewer can show the document revisionsvoiddisable()Disables the viewer.voiddisplayDocument(java.lang.String documentUrl, java.lang.String annotationsUrl, DocumentArchiveMetaInfo.ElementArchiveMetaInfo elementinfo, DocumentId documentId)Displays a document.voiddisplayTemporaryDocument(java.lang.String documentUrl, TemporaryDocumentId id)Displays a temporary (not yet archived) document.voidenable()Enables the viewer.java.lang.StringgetConfigurationFile()Returns the name of the configuration file needed for this implementation of ViewerComponent.java.lang.StringgetExternalViewerWindowPath()Returns the relative path to the JSP used as external window or null if this viewer does not offer an external window.booleanhasOpenChanges()Returns, if the viewer has open changes.voidinit(java.lang.String viewerId)Called from parent component to initialize the viewer-component.static booleanisDefault()Checks if this viewer is configured as default.voidrefreshDocument()Refreshes the viewer using the last opened document.voidresetView()Resets the view so that the viewer applet will not re-open the last opened document.voidresetView(boolean showInitImage)Resets the view so that the viewer applet will not re-open the last opened document.voidsetParentViewComponent(DocumentView documentView)Used to pass a reference to the parent component to this ViewerComponent.voidtabSelected()Method used to notify the ViewerComponent that the tab it is contained in was selected.- 
Methods inherited from class com.saperion.ngc.events.BaseWindowgetEventtarget, getMainWindow, postAddLinkEvent, postAddToFavoritesEvent, postCancelSelectedEvent, postChangeDocumentSecurityEvent, postChangeFolderSecurityEvent, postDeleteSelectedEvent, postDisplayPopupEvent, postDisplayPopupEvent, postDisplayPopupEvent, postDisplayResultItemEvent, postDisplayResultItemEvent, postDocumentCheckEvent, postDocumentCheckWithShareBaseEvent, postDocumentFilingEvent, postDocumentFilingEvent, postDocumentReleaseEvent, postDownloadResultItemEvent, postEditContentEvent, postEditItemSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditStructureEvent, postErrorLogEvent, postErrorLogEvent, postExternalStorageUploadEvent, postExternalStorageUploadStatusEvent, postFieldChangeEvent, postFileActionEvent, postFileActionEvent, postFormButtonEvent, postIndexResultItemEvent, postInfoLogEvent, postInfoLogEvent, postLaunchWorkflowEvent, postLockDocumentEvent, postLogonEvent, postLogonEvent, postNavigationFolderEvent, postNavigationFormEvent, postNavigationFormEvent, postNavigationWebpartEvent, postNewSelectedEvent, postOpenMaskEvent, postPrintDocumentEvent, postProlongRetentionEvent, postQueryFavoriteEvent, postReduceDispositionEvent, postRefreshEvent, postResetGuiEvent, postResultFieldEvent, postSaveDocumentEvent, postSaveDocumentEvent, postSelectTreeItemEvent, postSendMailResultItemEvent, postSetLitigationHoldEvent, postShareBaseLoginEvent, postStartWorkflowEvent, postTabSelectedEvent, postUnDeleteSelectedEvent, postUploadDocumentEvent, postUploadeExternalStorageDocumentEvent, postUploadSuccessEvent, postWarningLogEvent, postWarningLogEvent, postWorkflowActionEvent, postWorkflowCommentEvent, postWorkflowDisplayCommentEvent, setEventtarget
 - 
Methods inherited from class org.zkoss.zul.WindowbeforeChildAdded, clone, doEmbedded, doHighlighted, doModal, doOverlapped, doPopup, getBorder, getCaption, getContentSclass, getContentStyle, getDefaultActionOnShow, getMinheight, getMinwidth, getMode, getModeType, getPosition, getTitle, getZclass, inEmbedded, inHighlighted, inModal, inOverlapped, inPopup, insertBefore, isClosable, isCollapsible, isMaximizable, isMaximized, isMinimizable, isMinimized, isShadow, isSizable, onChildRemoved, onClose, onModal, onPageDetached, renderProperties, service, setBorder, setBorder, setClosable, setContentSclass, setContentStyle, setDefaultActionOnShow, setDraggable, setMaximizable, setMaximized, setMinheight, setMinimizable, setMinimized, setMinwidth, setMode, setMode, setMode, setPosition, setShadow, setSizable, setTitle, setTopmost, setVisible
 - 
Methods inherited from class org.zkoss.zul.impl.XulElementgetContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
 - 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponentaddSclass, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
 - 
Methods inherited from class org.zkoss.zk.ui.AbstractComponentaddAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onPageAttached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
 - 
Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.zkoss.zk.ui.ComponentaddEventListener, 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
 
- 
 
- 
- 
- 
Field Detail- 
USE_RENDER_ENGINEpublic static final java.lang.String USE_RENDER_ENGINE Use render engine to display unknown formats.- See Also:
- Constant Field Values
 
 - 
EMBED_MP4public static final java.lang.String EMBED_MP4 Embed MP4 objects.- See Also:
- Constant Field Values
 
 - 
EMBED_PDFpublic static final java.lang.String EMBED_PDF Embed PDF objects.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
displayDocumentpublic void displayDocument(java.lang.String documentUrl, java.lang.String annotationsUrl, DocumentArchiveMetaInfo.ElementArchiveMetaInfo elementinfo, 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.- Specified by:
- displayDocumentin interface- ViewerComponent
- Parameters:
- documentUrl- the document url
- annotationsUrl- the annotation url
- elementinfo- meta information about the page to be displayed
- documentId- Id of the document
- See Also:
- ViewerComponent.displayDocument(String, String, ElementArchiveMetaInfo, DocumentId)
 
 - 
displayTemporaryDocumentpublic 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.- Specified by:
- displayTemporaryDocumentin interface- ViewerComponent
- Parameters:
- documentUrl- The URL to the download servlet.
- id- The id of the temporary document.
- See Also:
- (java.lang.String, com.saperion.ngc.model.document.TemporaryDocumentId)
 
 - 
refreshDocumentpublic void refreshDocument() Refreshes the viewer using the last opened document.- Specified by:
- refreshDocumentin interface- ViewerComponent
- See Also:
- ViewerComponent.refreshDocument()
 
 - 
resetViewpublic 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.- Specified by:
- resetViewin interface- ViewerComponent
- Parameters:
- showInitImage- if true, the viewer will show an initial image
- See Also:
- ViewerComponent.resetView(boolean showInitImage)
 
 - 
resetViewpublic void resetView() Resets the view so that the viewer applet will not re-open the last opened document. The opened document will be closed.- Specified by:
- resetViewin interface- ViewerComponent
- See Also:
- ViewerComponent.resetView()
 
 - 
disablepublic void disable() Disables the viewer.- Specified by:
- disablein interface- ViewerComponent
- See Also:
- ViewerComponent.disable()
 
 - 
enablepublic void enable() Enables the viewer.- Specified by:
- enablein interface- ViewerComponent
- See Also:
- ViewerComponent.enable()
 
 - 
initpublic void init(java.lang.String viewerId) Called from parent component to initialize the viewer-component.- Specified by:
- initin interface- ViewerComponent
- Parameters:
- viewerId- the id of the viewer, passed only as additional information
- See Also:
- ViewerComponent.init(java.lang.String)
 
 - 
hasOpenChangespublic boolean hasOpenChanges() Returns, if the viewer has open changes.- Specified by:
- hasOpenChangesin interface- ViewerComponent
- Returns:
- Has open changes
- See Also:
- ViewerComponent.hasOpenChanges()
 
 - 
setParentViewComponentpublic void setParentViewComponent(DocumentView documentView) Used to pass a reference to the parent component to this ViewerComponent. Optional.- Specified by:
- setParentViewComponentin interface- ViewerComponent
- Parameters:
- documentView- the new parent view component
- See Also:
- ViewerComponent.setParentViewComponent(com.saperion.ngc.viewer.DocumentView)
 
 - 
tabSelectedpublic 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.- Specified by:
- tabSelectedin interface- ViewerComponent
- See Also:
- ViewerComponent.tabSelected()
 
 - 
getConfigurationFilepublic 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/.- Specified by:
- getConfigurationFilein interface- ViewerComponent
- Returns:
- name of the configuration file or null if no configuration file is needed
- See Also:
- ViewerComponent.getConfigurationFile()
 
 - 
canModifyDocumentpublic boolean canModifyDocument() Description copied from interface:ViewerComponentUsed by the webclient to determine if this type of viewer is able to edit documents.- Specified by:
- canModifyDocumentin interface- ViewerComponent
- Returns:
- whether this viewer can edit documents
 
 - 
canShowRevisionspublic boolean canShowRevisions() Description copied from interface:ViewerComponentUsed by web client to determine if this type of viewer can show the document revisions- Specified by:
- canShowRevisionsin interface- ViewerComponent
- Returns:
- whether this viewer enables revision viewing
- See Also:
- ViewerComponent.canShowRevisions()
 
 - 
getExternalViewerWindowPathpublic java.lang.String getExternalViewerWindowPath() Description copied from interface:ViewerComponentReturns the relative path to the JSP used as external window or null if this viewer does not offer an external window.- Specified by:
- getExternalViewerWindowPathin interface- ViewerComponent
- Returns:
- path to the JSP or null if not supported
 
 - 
isDefaultpublic static boolean isDefault() Checks if this viewer is configured as default.- Returns:
- is default
 
 
- 
 
-