public abstract class AbstractDocumentView extends BaseWindow implements DocumentView
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractDocumentView.AskForDownloadListener
Listener for the messagebox shown when a document is too big to be displayed.
|
Modifier and Type | Field and Description |
---|---|
protected com.saperion.ngc.iform.xml.ViewerType |
def
Mask element definition.
|
protected boolean |
dontAskForDownload
Whether to ask before downloading.
|
protected LocalizationUtil |
localization
LocalizationUtil instance.
|
protected org.zkoss.zul.Borderlayout |
mainLayout
Main layout component of this DocumentView.
|
protected int |
maskRights
Default mask-rights.
|
protected long |
maxViewSize
Limit of image size to display.
|
protected StructureList<?> |
multiDocumentList
Structure view.
|
protected StructureButtons |
structureButtonBox
Buttons for Download options in structure view.
|
protected OpenDocumentBean |
viewerBean
Viewer's control-bean.
|
protected String |
viewerClass
Class name of the embedded viewer component.
|
protected ViewerComponent |
viewerComp
Embedded viewer component.
|
protected String |
viewerId
ID to identify the viewer.
|
protected DocumentViewPresenter |
viewerPresenter
The ViewerPresenter instance of this DocumentView.
|
protected boolean |
zkDownloadMode
How to handle downloads.
|
EDIT_WINDOW_PREFIX, NO_EXTERNAL_WINDOW, POPUP_BEAN_ATTRIBUTE
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
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_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_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_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_START_WORKFLOW, ON_TAB_SELECTED, ON_UNDELETE_SELECTED, ON_UPLOAD_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
Constructor and Description |
---|
AbstractDocumentView()
Standard Constructor.
|
AbstractDocumentView(String documentViewTitle,
String documentViewBorder,
Boolean closable)
Constructor with title, border, closable option.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canDownload(DocumentId documentId)
Checks if the user is allowed to download the document.
|
boolean |
canModifyDocument()
Checks if the
ViewerComponent used by this viewer can modify documents. |
boolean |
canShowRevisions()
Checks if the
ViewerComponent used by this viewer can show the document revisions. |
protected boolean |
canView(DocumentId documentId)
Checks if the user is allowed to display the document.
|
void |
disable()
Disables the viewer.
|
void |
enable()
Enables the viewer.
|
protected void |
enableStructureButtonsWhen(boolean enable) |
protected void |
fillStructureView(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> infos,
DocumentId documentId)
Fills the structure list with available documents to show in the viewer component.
|
protected String |
generateRandomViewerId()
Generates a random ID used to identify each viewer.
|
protected DocumentArchiveMetaInfo.ElementArchiveMetaInfo |
getElementMetaInfo(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentTitles,
int element)
Gets information about a specific element.
|
protected javax.servlet.http.HttpServletRequest |
getNativeRequest()
Gets the native request.
|
protected InputStream |
getPageListStream(DocumentId documentId,
List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements) |
IntelligentFormView |
getParentForm()
Gets the parent form of this DocumentView.
|
DocumentViewPresenter |
getPresenter()
Gets the presenter.
|
String |
getPropertiesFileName()
Gets the properties file name.
|
StructureList<?> |
getStructureList()
Gets the structure list.
|
String |
getViewerClass()
Gets the class-name of the contained viewer-component.
|
boolean |
hasOpenChanges()
Check open changes in viewer.
|
protected boolean |
inIfomPopup() |
protected void |
init()
Initializes the viewer classes by setting things like layout, max view size, max document size and so on.
|
boolean |
isEnableLoadingMessage() |
protected boolean |
isSizeLimitEnabled()
Tells if the size limit for viewing documents is enabled.
|
boolean |
isStructureButtonsBoxShown()
Tells you if the structure buttons of the structure view are shown or not.
|
boolean |
isStructureEnabled() |
protected void |
makeViewerBean(DocumentId documentId,
List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements,
boolean currentRevision)
Creates a new viewer control-bean or updates the existing one.
|
abstract void |
onCreate(org.zkoss.zk.ui.event.Event event)
Event handler for onCreate event.
|
abstract void |
onDisplayResultItem(org.zkoss.zk.ui.event.Event event)
Display document.
|
void |
onLogon(org.zkoss.zk.ui.event.Event event)
Event handler for logon event.
|
void |
onResetGui(org.zkoss.zk.ui.event.Event event)
Handler for reset ui event.
|
abstract void |
openDocument(DocumentId documentId,
List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements,
int element)
Opens the specified url and displays the document.
|
void |
openSubDocument()
Opens a sub document structure.
|
void |
refreshView()
Refreshes the view with the last opened document.
|
void |
reset()
Closes the current document.
|
void |
reset(boolean showInitImage)
Closes the current document.
|
void |
setEnableLoadingMessage(boolean enable)
Enables or disables the loading message that will be shown when the viewer is initiated.
|
void |
setPropertiesFileName(String filename)
Sets the name of a properties file for the internal viewer component.
|
void |
setStructureButtonsBoxShown(boolean showStructureButtonsBox)
Set the visibility of the its structure button box and its containingn structure
buttons of the structure view.
|
void |
setStructureEnabled(boolean enabled)
Enables or disables the structure view.
|
void |
setViewerClass(String clazz)
Sets the class-name of the contained viewer-component.
|
getEventtarget, getMainWindow, postAddLinkEvent, postAddToFavoritesEvent, postCancelSelectedEvent, postChangeDocumentSecurityEvent, postChangeFolderSecurityEvent, postDeleteSelectedEvent, postDisplayPopupEvent, postDisplayPopupEvent, postDisplayResultItemEvent, postDisplayResultItemEvent, postDocumentCheckEvent, postDocumentFilingEvent, postDocumentFilingEvent, postDocumentReleaseEvent, postDownloadResultItemEvent, postEditContentEvent, postEditItemSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditStructureEvent, postErrorLogEvent, postErrorLogEvent, postFieldChangeEvent, postFileActionEvent, postFileActionEvent, postFormButtonEvent, postIndexResultItemEvent, postInfoLogEvent, postInfoLogEvent, postLaunchWorkflowEvent, postLockDocumentEvent, postLogonEvent, postLogonEvent, postNavigationFolderEvent, postNavigationFormEvent, postNavigationFormEvent, postNavigationWebpartEvent, postNewSelectedEvent, postOpenMaskEvent, postPrintDocumentEvent, postQueryFavoriteEvent, postRefreshEvent, postResetGuiEvent, postResultFieldEvent, postSaveDocumentEvent, postSaveDocumentEvent, postSelectTreeItemEvent, postSendMailResultItemEvent, postStartWorkflowEvent, postTabSelectedEvent, postUnDeleteSelectedEvent, postUploadDocumentEvent, postUploadSuccessEvent, postWarningLogEvent, postWarningLogEvent, postWorkflowActionEvent, postWorkflowCommentEvent, setEventtarget
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, setVisible
getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
addSclass, 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
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, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
handleLinkElement, openDocument, openTemporaryDocument
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
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
postAddLinkEvent, postAddToFavoritesEvent, postCancelSelectedEvent, postChangeDocumentSecurityEvent, postChangeFolderSecurityEvent, postDeleteSelectedEvent, postDisplayPopupEvent, postDisplayPopupEvent, postDisplayResultItemEvent, postDisplayResultItemEvent, postDocumentCheckEvent, postDocumentFilingEvent, postDocumentFilingEvent, postDocumentReleaseEvent, postDownloadResultItemEvent, postEditContentEvent, postEditItemSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditSelectedEvent, postEditStructureEvent, postFieldChangeEvent, postFileActionEvent, postFileActionEvent, postFormButtonEvent, postIndexResultItemEvent, postLaunchWorkflowEvent, postLockDocumentEvent, postLogonEvent, postLogonEvent, postNavigationFolderEvent, postNavigationFormEvent, postNavigationFormEvent, postNavigationWebpartEvent, postNewSelectedEvent, postOpenMaskEvent, postPrintDocumentEvent, postQueryFavoriteEvent, postRefreshEvent, postResetGuiEvent, postResultFieldEvent, postSaveDocumentEvent, postSaveDocumentEvent, postSelectTreeItemEvent, postSendMailResultItemEvent, postStartWorkflowEvent, postTabSelectedEvent, postUnDeleteSelectedEvent, postUploadDocumentEvent, postUploadSuccessEvent, postWorkflowActionEvent, postWorkflowCommentEvent
postErrorLogEvent, postErrorLogEvent, postInfoLogEvent, postInfoLogEvent, postWarningLogEvent, postWarningLogEvent
getEventtarget, setEventtarget
protected StructureButtons structureButtonBox
protected DocumentViewPresenter viewerPresenter
protected boolean zkDownloadMode
protected long maxViewSize
protected boolean dontAskForDownload
protected final LocalizationUtil localization
protected ViewerComponent viewerComp
protected OpenDocumentBean viewerBean
protected String viewerId
protected org.zkoss.zul.Borderlayout mainLayout
protected StructureList<?> multiDocumentList
protected com.saperion.ngc.iform.xml.ViewerType def
protected String viewerClass
protected int maskRights
public AbstractDocumentView(String documentViewTitle, String documentViewBorder, Boolean closable)
documentViewTitle
- TitledocumentViewBorder
- Borderclosable
- Closablepublic AbstractDocumentView()
public abstract void openDocument(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, int element)
openDocument
in interface DocumentView
documentId
- the document's iddocumentElements
- the document's elements (sub documents)element
- document elementDocumentView.openDocument(com.saperion.ngc.model.document.DocumentId,
java.util.List, int)
public abstract void onCreate(org.zkoss.zk.ui.event.Event event)
event
- ZK eventpublic abstract void onDisplayResultItem(org.zkoss.zk.ui.event.Event event)
onDisplayResultItem
in interface DocumentView
event
- Eventprotected void init()
public void openSubDocument()
openSubDocument
in interface DocumentView
DocumentView.openSubDocument()
protected boolean isSizeLimitEnabled()
protected javax.servlet.http.HttpServletRequest getNativeRequest()
public final void onLogon(org.zkoss.zk.ui.event.Event event)
onLogon
in interface DocumentView
event
- ZK eventpublic final void disable()
disable
in interface DocumentView
public final void enable()
enable
in interface DocumentView
public final void reset()
reset
in interface DocumentView
public final void reset(boolean showInitImage)
reset
in interface DocumentView
showInitImage
- true, shows an initialization image (if supported by the viewer-component in use)public void onResetGui(org.zkoss.zk.ui.event.Event event)
onResetGui
in interface DocumentView
event
- ZK eventpublic final void refreshView()
refreshView
in interface DocumentView
protected String generateRandomViewerId()
protected void fillStructureView(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> infos, DocumentId documentId)
infos
- structure informationdocumentId
- id of the documentpublic DocumentViewPresenter getPresenter()
protected DocumentArchiveMetaInfo.ElementArchiveMetaInfo getElementMetaInfo(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentTitles, int element)
documentTitles
- structure informationelement
- the element numberpublic void setPropertiesFileName(String filename)
setPropertiesFileName
in interface DocumentView
filename
- the new properties file nameDocumentView.setPropertiesFileName(java.lang.String)
public String getPropertiesFileName()
getPropertiesFileName
in interface DocumentView
DocumentView.getPropertiesFileName()
public boolean hasOpenChanges()
hasOpenChanges
in interface DocumentView
DocumentView.hasOpenChanges()
public StructureList<?> getStructureList()
getStructureList
in interface DocumentView
DocumentView.getStructureList()
public IntelligentFormView getParentForm()
getParentForm
in interface DocumentView
protected InputStream getPageListStream(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements)
documentId
- ID of the documentdocumentElements
- list of the document's elementsprotected void makeViewerBean(DocumentId documentId, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, boolean currentRevision)
documentId
- document iddocumentElements
- elements of the documentcurrentRevision
- whether the current revision of the document should be resolved or notprotected boolean canView(DocumentId documentId)
documentId
- id of the documentprotected boolean canDownload(DocumentId documentId)
documentId
- id of the current documentprotected boolean inIfomPopup()
public void setEnableLoadingMessage(boolean enable)
setEnableLoadingMessage
in interface DocumentView
enable
- enabled or disabledDocumentView.setEnableLoadingMessage(boolean)
public boolean isEnableLoadingMessage()
isEnableLoadingMessage
in interface DocumentView
DocumentView.isEnableLoadingMessage()
public void setViewerClass(String clazz)
setViewerClass
in interface DocumentView
clazz
- the class-name of the viewer-componentDocumentView.setViewerClass(java.lang.String)
public String getViewerClass()
getViewerClass
in interface DocumentView
DocumentView.getViewerClass()
public void setStructureButtonsBoxShown(boolean showStructureButtonsBox)
DocumentView
setStructureButtonsBoxShown
in interface DocumentView
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.public boolean isStructureButtonsBoxShown()
DocumentView
isStructureButtonsBoxShown
in interface DocumentView
protected void enableStructureButtonsWhen(boolean enable)
enable
- enable or disabled structure buttonspublic void setStructureEnabled(boolean enabled)
setStructureEnabled
in interface DocumentView
enabled
- enabled/disabledDocumentView.setStructureEnabled(boolean)
public boolean isStructureEnabled()
isStructureEnabled
in interface DocumentView
DocumentView.isStructureEnabled()
public boolean canModifyDocument()
DocumentView
ViewerComponent
used by this viewer can modify documents.canModifyDocument
in interface DocumentView
public boolean canShowRevisions()
DocumentView
ViewerComponent
used by this viewer can show the document revisions.canShowRevisions
in interface DocumentView
DocumentView.canShowRevisions()
Copyright © 2021 Hyland Software Germany GmbH. All rights reserved.