Package com.saperion.ngc.viewer
Class AbstractDocumentView
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.AbstractDocumentView
- All Implemented Interfaces:
EventChild,EventChildHandler,LogEventChildHandler,DocumentView,Serializable,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
- Direct Known Subclasses:
DocumentViewImpl,SapDocumentViewImpl
Abstract class that holds common methods for both, the SAP Web Viewer and the document viewer for the web client.
User: chg Date: 07.03.12 Time: 16:37
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected final classListener for the messagebox shown when a document is too big to be displayed.Nested classes/interfaces inherited from class org.zkoss.zul.Window
org.zkoss.zul.Window.ModeNested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.saperion.ngc.iform.xml.ViewerTypeMask element definition.protected booleanWhether to ask before downloading.protected final LocalizationUtilLocalizationUtil instance.protected org.zkoss.zul.BorderlayoutMain layout component of this DocumentView.protected intDefault mask-rights.protected longLimit of image size to display.protected StructureList<?>Structure view.protected StructureButtonsButtons for Download options in structure view.protected OpenDocumentBeanViewer's control-bean.protected StringClass name of the embedded viewer component.protected ViewerComponentEmbedded viewer component.protected StringID to identify the viewer.protected DocumentViewPresenterThe ViewerPresenter instance of this DocumentView.protected booleanHow to handle downloads.Fields inherited from class org.zkoss.zul.Window
EMBEDDED, HIGHLIGHTED, MODAL, OVERLAPPED, POPUPFields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNOREFields inherited from interface com.saperion.ngc.viewer.DocumentView
EDIT_WINDOW_PREFIX, NO_EXTERNAL_WINDOW, POPUP_BEAN_ATTRIBUTEFields inherited from interface com.saperion.ngc.events.EventChild
ALL_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 Summary
ConstructorsConstructorDescriptionStandard Constructor.AbstractDocumentView(String documentViewTitle, String documentViewBorder, Boolean closable) Constructor with title, border, closable option. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanDownload(DocumentId documentId) Checks if the user is allowed to download the document.booleanChecks if theViewerComponentused by this viewer can modify documents.booleanChecks if theViewerComponentused by this viewer can show the document revisions.protected booleancanView(DocumentId documentId) Checks if the user is allowed to display the document.final voiddisable()Disables the viewer.final voidenable()Enables the viewer.protected voidenableStructureButtonsWhen(boolean enable) protected voidfillStructureView(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> infos, DocumentId documentId) Fills the structure list with available documents to show in the viewer component.protected StringGenerates a random ID used to identify each viewer.getElementMetaInfo(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentTitles, int element) Gets information about a specific element.protected jakarta.servlet.http.HttpServletRequestGets the native request.protected InputStreamgetPageListStream(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements) Gets the parent form of this DocumentView.Gets the presenter.Gets the properties file name.Gets the structure list.Gets the class-name of the contained viewer-component.booleanCheck open changes in viewer.protected booleanprotected voidinit()Initializes the viewer classes by setting things like layout, max view size, max document size and so on.booleanprotected booleanTells if the size limit for viewing documents is enabled.booleanTells you if the structure buttons of the structure view are shown or not.booleanprotected voidmakeViewerBean(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, boolean currentRevision) Creates a new viewer control-bean or updates the existing one.abstract voidonCreate(org.zkoss.zk.ui.event.Event event) Event handler for onCreate event.abstract voidonDisplayResultItem(org.zkoss.zk.ui.event.Event event) Display document.final voidonLogon(org.zkoss.zk.ui.event.Event event) Event handler for logon event.voidonResetGui(org.zkoss.zk.ui.event.Event event) Handler for reset ui event.abstract voidopenDocument(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, int element) Opens the specified url and displays the document.voidOpens a sub document structure.final voidRefreshes the view with the last opened document.final voidreset()Closes the current document.final voidreset(boolean showInitImage) Closes the current document.voidsetEnableLoadingMessage(boolean enable) Enables or disables the loading message that will be shown when the viewer is initiated.voidsetPropertiesFileName(String filename) Sets the name of a properties file for the internal viewer component.voidsetStructureButtonsBoxShown(boolean showStructureButtonsBox) Set the visibility of the its structure button box and its containingn structure buttons of the structure view.voidsetStructureEnabled(boolean enabled) Enables or disables the structure view.voidsetViewerClass(String clazz) Sets the class-name of the contained viewer-component.Methods inherited from class com.saperion.ngc.events.BaseWindow
getEventtarget, 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, setEventtargetMethods inherited from class org.zkoss.zul.Window
beforeChildAdded, 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, setVisibleMethods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesMethods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, 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, setZIndexDirectlyMethods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, 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, invalidatePartial, isChildable, isInitialized, 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, willSerializeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, setWidgetOverrideMethods inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
invalidatePartialMethods inherited from interface com.saperion.ngc.viewer.DocumentView
handleLinkElement, openDocument, openTemporaryDocumentMethods inherited from interface com.saperion.ngc.events.EventChild
getEventtarget, setEventtargetMethods inherited from interface com.saperion.ngc.events.EventChildHandler
postAddLinkEvent, postAddToFavoritesEvent, postCancelSelectedEvent, postChangeDocumentSecurityEvent, postChangeFolderSecurityEvent, postDeleteSelectedEvent, postDisplayPopupEvent, postDisplayPopupEvent, postDisplayPopupEvent, postDisplayResultItemEvent, postDisplayResultItemEvent, postDocumentCheckEvent, postDocumentCheckWithShareBaseEvent, postDocumentFilingEvent, postDocumentFilingEvent, postDocumentReleaseEvent, postDownloadResultItemEvent, postEditContentEvent, postEditItemSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditStructureEvent, postExternalStorageUploadEvent, postExternalStorageUploadStatusEvent, postFieldChangeEvent, postFileActionEvent, postFileActionEvent, postFormButtonEvent, postIndexResultItemEvent, 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, postWorkflowActionEvent, postWorkflowCommentEvent, postWorkflowDisplayCommentEventMethods inherited from interface org.zkoss.zk.ui.IdSpace
getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, hasFellow, hasFellowMethods inherited from interface com.saperion.ngc.events.LogEventChildHandler
postErrorLogEvent, postErrorLogEvent, postInfoLogEvent, postInfoLogEvent, postWarningLogEvent, postWarningLogEventMethods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Field Details
-
structureButtonBox
Buttons for Download options in structure view. -
viewerPresenter
The ViewerPresenter instance of this DocumentView. -
zkDownloadMode
protected boolean zkDownloadModeHow to handle downloads. -
maxViewSize
protected long maxViewSizeLimit of image size to display. -
dontAskForDownload
protected boolean dontAskForDownloadWhether to ask before downloading. -
localization
LocalizationUtil instance. -
viewerComp
Embedded viewer component. -
viewerBean
Viewer's control-bean. -
viewerId
ID to identify the viewer. -
mainLayout
protected org.zkoss.zul.Borderlayout mainLayoutMain layout component of this DocumentView. -
multiDocumentList
Structure view. -
def
protected com.saperion.ngc.iform.xml.ViewerType defMask element definition. -
viewerClass
Class name of the embedded viewer component. -
maskRights
protected int maskRightsDefault mask-rights.
-
-
Constructor Details
-
AbstractDocumentView
Constructor with title, border, closable option.- Parameters:
documentViewTitle- TitledocumentViewBorder- Borderclosable- Closable
-
AbstractDocumentView
public AbstractDocumentView()Standard Constructor.
-
-
Method Details
-
openDocument
public abstract void openDocument(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, int element) Opens the specified url and displays the document.- Specified by:
openDocumentin interfaceDocumentView- Parameters:
documentId- the document's iddocumentElements- the document's elements (sub documents)element- document element- See Also:
-
onCreate
public abstract void onCreate(org.zkoss.zk.ui.event.Event event) Event handler for onCreate event.- Parameters:
event- ZK event
-
onDisplayResultItem
public abstract void onDisplayResultItem(org.zkoss.zk.ui.event.Event event) Display document.- Specified by:
onDisplayResultItemin interfaceDocumentView- Parameters:
event- Event
-
init
protected void init()Initializes the viewer classes by setting things like layout, max view size, max document size and so on. -
openSubDocument
public void openSubDocument()Opens a sub document structure.- Specified by:
openSubDocumentin interfaceDocumentView- See Also:
-
isSizeLimitEnabled
protected boolean isSizeLimitEnabled()Tells if the size limit for viewing documents is enabled. Therefore the max view size must be set to an integer value > 0.- Returns:
- True if the max view size > 0, false else.
-
getNativeRequest
protected jakarta.servlet.http.HttpServletRequest getNativeRequest()Gets the native request.- Returns:
- the native request
-
onLogon
public final void onLogon(org.zkoss.zk.ui.event.Event event) Event handler for logon event. The viewer will be enabled if the logon was successful.- Specified by:
onLogonin interfaceDocumentView- Parameters:
event- ZK event
-
disable
public final void disable()Disables the viewer.- Specified by:
disablein interfaceDocumentView
-
enable
public final void enable()Enables the viewer.- Specified by:
enablein interfaceDocumentView
-
reset
public final void reset()Closes the current document.- Specified by:
resetin interfaceDocumentView
-
reset
public final void reset(boolean showInitImage) Closes the current document.- Specified by:
resetin interfaceDocumentView- Parameters:
showInitImage- true, shows an initialization image (if supported by the viewer-component in use)
-
onResetGui
public void onResetGui(org.zkoss.zk.ui.event.Event event) Handler for reset ui event.- Specified by:
onResetGuiin interfaceDocumentView- Parameters:
event- ZK event
-
refreshView
public final void refreshView()Refreshes the view with the last opened document.- Specified by:
refreshViewin interfaceDocumentView
-
generateRandomViewerId
Generates a random ID used to identify each viewer. This ID is used by VirtualViewer to find it's session in the ContentHandler.- Returns:
- the generated id
-
fillStructureView
protected void fillStructureView(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> infos, DocumentId documentId) Fills the structure list with available documents to show in the viewer component. Additionally, if documents are available to show, the buttons for download etc. of structure view are enabled or disabled if no documents are available.- Parameters:
infos- structure informationdocumentId- id of the document
-
getPresenter
Gets the presenter.- Returns:
- the presenter
-
getElementMetaInfo
protected DocumentArchiveMetaInfo.ElementArchiveMetaInfo getElementMetaInfo(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentTitles, int element) Gets information about a specific element.- Parameters:
documentTitles- structure informationelement- the element number- Returns:
- the element's meta info
-
setPropertiesFileName
Sets the name of a properties file for the internal viewer component. Optional parameter.- Specified by:
setPropertiesFileNamein interfaceDocumentView- Parameters:
filename- the new properties file name- See Also:
-
getPropertiesFileName
Gets the properties file name.- Specified by:
getPropertiesFileNamein interfaceDocumentView- Returns:
- the properties file name
- See Also:
-
hasOpenChanges
public boolean hasOpenChanges()Check open changes in viewer.- Specified by:
hasOpenChangesin interfaceDocumentView- Returns:
- True, if open changes
- See Also:
-
getStructureList
Gets the structure list.- Specified by:
getStructureListin interfaceDocumentView- Returns:
- the structure list
- See Also:
-
getParentForm
Gets the parent form of this DocumentView.- Specified by:
getParentFormin interfaceDocumentView- Returns:
- the parent form
-
getPageListStream
protected InputStream getPageListStream(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements) - Parameters:
documentId- ID of the documentdocumentElements- list of the document's elements- Returns:
- stream containing the page-list (for ALF viewer)
-
makeViewerBean
protected void makeViewerBean(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, boolean currentRevision) Creates a new viewer control-bean or updates the existing one.- Parameters:
documentId- document iddocumentElements- elements of the documentcurrentRevision- whether the current revision of the document should be resolved or not
-
canView
Checks if the user is allowed to display the document.- Parameters:
documentId- id of the document- Returns:
- true if document can be displayed
-
canDownload
Checks if the user is allowed to download the document.- Parameters:
documentId- id of the current document- Returns:
- true if document can be downloaded
-
inIfomPopup
protected boolean inIfomPopup()- Returns:
- true if this document view is part of an iform-popup.
-
setEnableLoadingMessage
public void setEnableLoadingMessage(boolean enable) Enables or disables the loading message that will be shown when the viewer is initiated. Note that not all viewer-components support showing a loading-message.- Specified by:
setEnableLoadingMessagein interfaceDocumentView- Parameters:
enable- enabled or disabled- See Also:
-
isEnableLoadingMessage
public boolean isEnableLoadingMessage()- Specified by:
isEnableLoadingMessagein interfaceDocumentView- Returns:
- true if loading message is enabled
- See Also:
-
setViewerClass
Sets the class-name of the contained viewer-component.- Specified by:
setViewerClassin interfaceDocumentView- Parameters:
clazz- the class-name of the viewer-component- See Also:
-
getViewerClass
Gets the class-name of the contained viewer-component.- Specified by:
getViewerClassin interfaceDocumentView- Returns:
- the class-name of the contained viewer-component.
- See Also:
-
setStructureButtonsBoxShown
public void setStructureButtonsBoxShown(boolean showStructureButtonsBox) Description copied from interface:DocumentViewSet the visibility of the its structure button box and its containingn structure buttons of the structure view.- Specified by:
setStructureButtonsBoxShownin interfaceDocumentView- Parameters:
showStructureButtonsBox- Removes the structure buttons and its surrounding structure button box if it is set to false and shows the buttons if it is set to true.
-
isStructureButtonsBoxShown
public boolean isStructureButtonsBoxShown()Description copied from interface:DocumentViewTells you if the structure buttons of the structure view are shown or not. Default is true.- Specified by:
isStructureButtonsBoxShownin interfaceDocumentView- Returns:
- True if structure buttons and its surrounding structure button box of structure view are shown, false else.
-
enableStructureButtonsWhen
protected void enableStructureButtonsWhen(boolean enable) - Parameters:
enable- enable or disabled structure buttons
-
setStructureEnabled
public void setStructureEnabled(boolean enabled) Enables or disables the structure view.- Specified by:
setStructureEnabledin interfaceDocumentView- Parameters:
enabled- enabled/disabled- See Also:
-
isStructureEnabled
public boolean isStructureEnabled()- Specified by:
isStructureEnabledin interfaceDocumentView- Returns:
- true if structure view is enabled
- See Also:
-
canModifyDocument
public boolean canModifyDocument()Description copied from interface:DocumentViewChecks if theViewerComponentused by this viewer can modify documents.- Specified by:
canModifyDocumentin interfaceDocumentView- Returns:
- can edit documents
-
canShowRevisions
public boolean canShowRevisions()Description copied from interface:DocumentViewChecks if theViewerComponentused by this viewer can show the document revisions.- Specified by:
canShowRevisionsin interfaceDocumentView- Returns:
- true or false
- See Also:
-