Package com.saperion.ngc.viewer
Interface DocumentView
-
- All Superinterfaces:
java.lang.Cloneable
,org.zkoss.zk.ui.Component
,EventChild
,EventChildHandler
,LogEventChildHandler
,org.zkoss.zk.ui.ext.Scope
,java.io.Serializable
- All Known Implementing Classes:
AbstractDocumentView
,DocumentViewImpl
,SapDocumentViewImpl
public interface DocumentView extends org.zkoss.zk.ui.Component, EventChild, EventChildHandler
Represents a viewer in a form.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EDIT_WINDOW_PREFIX
Prefix of IDs of a popup-window in edit mode.static java.lang.String
NO_EXTERNAL_WINDOW
Constant that defines that the viewer-implementation has no external window.static java.lang.String
POPUP_BEAN_ATTRIBUTE
Name of the session attribute for the viewer popup.-
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
-
Fields 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canModifyDocument()
Checks if theViewerComponent
used by this viewer can modify documents.boolean
canShowRevisions()
Checks if theViewerComponent
used by this viewer can show the document revisions.void
disable()
Disables the viewer.void
enable()
Enables the viewer.IntelligentFormView
getParentForm()
Gets the parent form of this DocumentView.java.lang.String
getPropertiesFileName()
Gets the properties file name.StructureList<?>
getStructureList()
Gets the structure list.java.lang.String
getViewerClass()
Gets the class-name of the contained viewer-component.void
handleLinkElement(DocumentArchiveMetaInfo.ElementArchiveMetaInfo linkElement)
Handles the viewing of a linked element.boolean
hasOpenChanges()
Check open changes in viewer.boolean
isEnableLoadingMessage()
boolean
isStructureButtonsBoxShown()
Tells you if the structure buttons of the structure view are shown or not.boolean
isStructureEnabled()
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.void
openDocument(DocumentId documentId, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, int element)
Opens the specified url and displays the document.void
openDocument(DocumentId documentId, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, int element, boolean currentRevision)
Opens the specified url and displays the document.void
openSubDocument()
Opens a sub document structure.void
openTemporaryDocument(TemporaryDocumentId documentId)
Opens a temporary document.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(java.lang.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(java.lang.String clazz)
Sets the class-name of the contained viewer-component.-
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 com.saperion.ngc.events.EventChild
getEventtarget, setEventtarget
-
Methods 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, postWorkflowDisplayCommentEvent
-
Methods inherited from interface com.saperion.ngc.events.LogEventChildHandler
postErrorLogEvent, postErrorLogEvent, postInfoLogEvent, postInfoLogEvent, postWarningLogEvent, postWarningLogEvent
-
-
-
-
Field Detail
-
POPUP_BEAN_ATTRIBUTE
static final java.lang.String POPUP_BEAN_ATTRIBUTE
Name of the session attribute for the viewer popup.- See Also:
- Constant Field Values
-
EDIT_WINDOW_PREFIX
static final java.lang.String EDIT_WINDOW_PREFIX
Prefix of IDs of a popup-window in edit mode.- See Also:
- Constant Field Values
-
NO_EXTERNAL_WINDOW
static final java.lang.String NO_EXTERNAL_WINDOW
Constant that defines that the viewer-implementation has no external window.- See Also:
- Constant Field Values
-
-
Method Detail
-
openDocument
void openDocument(DocumentId documentId, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, int element)
Opens the specified url and displays the document.- Parameters:
documentId
- the document's idelement
- document elementdocumentElements
- the document's elements (sub documents)
-
openDocument
void openDocument(DocumentId documentId, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements, int element, boolean currentRevision)
Opens the specified url and displays the document.- Parameters:
documentId
- the document's idelement
- document elementdocumentElements
- the document's elements (sub documents)currentRevision
- whether to resolve the current revision or not
-
openSubDocument
void openSubDocument()
Opens a sub document structure.
-
openTemporaryDocument
void openTemporaryDocument(TemporaryDocumentId documentId)
Opens a temporary document. The document must be contained in the temporary document cache. ATemporaryDocumentId
can be obtained by usingTemporaryDocumentPreviewService
to cache the document.- Parameters:
documentId
- ID of the temporary document
-
onLogon
void onLogon(org.zkoss.zk.ui.event.Event event)
Event handler for logon event. The viewer will be enabled if the logon was successful.- Parameters:
event
- ZK event
-
disable
void disable()
Disables the viewer.
-
enable
void enable()
Enables the viewer.
-
refreshView
void refreshView()
Refreshes the view with the last opened document.
-
reset
void reset(boolean showInitImage)
Closes the current document.- Parameters:
showInitImage
- true, shows an initialization image (if supported by the viewer-component in use)
-
reset
void reset()
Closes the current document.
-
onDisplayResultItem
void onDisplayResultItem(org.zkoss.zk.ui.event.Event event)
Display document.- Parameters:
event
- Event
-
onResetGui
void onResetGui(org.zkoss.zk.ui.event.Event event)
Handler for reset ui event.- Parameters:
event
- ZK event
-
setPropertiesFileName
void setPropertiesFileName(java.lang.String filename)
Sets the name of a properties file for the internal viewer component. Optional parameter.- Parameters:
filename
- the new properties file name
-
getPropertiesFileName
java.lang.String getPropertiesFileName()
Gets the properties file name.- Returns:
- the properties file name
-
hasOpenChanges
boolean hasOpenChanges()
Check open changes in viewer.- Returns:
- True, if open changes
-
getStructureList
StructureList<?> getStructureList()
Gets the structure list.- Returns:
- the structure list
-
getParentForm
IntelligentFormView getParentForm()
Gets the parent form of this DocumentView.- Returns:
- the parent form
-
setEnableLoadingMessage
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.- Parameters:
enable
- enabled or disabled
-
isEnableLoadingMessage
boolean isEnableLoadingMessage()
- Returns:
- true if loading message is enabled
-
setViewerClass
void setViewerClass(java.lang.String clazz)
Sets the class-name of the contained viewer-component.- Parameters:
clazz
- the class-name of the viewer-component
-
getViewerClass
java.lang.String getViewerClass()
Gets the class-name of the contained viewer-component.- Returns:
- the class-name of the contained viewer-component.
-
isStructureButtonsBoxShown
boolean isStructureButtonsBoxShown()
Tells you if the structure buttons of the structure view are shown or not. Default is true.- Returns:
- True if structure buttons and its surrounding structure button box of structure view are shown, false else.
-
setStructureButtonsBoxShown
void setStructureButtonsBoxShown(boolean showStructureButtonsBox)
Set the visibility of the its structure button box and its containingn structure buttons of the structure view.- 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.
-
handleLinkElement
void handleLinkElement(DocumentArchiveMetaInfo.ElementArchiveMetaInfo linkElement)
Handles the viewing of a linked element. How this is done is up to the implementation of the DocumentView component. The default-implementation opens a popup window to show the document.- Parameters:
linkElement
- the linked element to view
-
setStructureEnabled
void setStructureEnabled(boolean enabled)
Enables or disables the structure view.- Parameters:
enabled
- enabled/disabled
-
isStructureEnabled
boolean isStructureEnabled()
- Returns:
- true if structure view is enabled
-
canModifyDocument
boolean canModifyDocument()
Checks if theViewerComponent
used by this viewer can modify documents.- Returns:
- can edit documents
-
canShowRevisions
boolean canShowRevisions()
Checks if theViewerComponent
used by this viewer can show the document revisions.- Returns:
- true or false
-
-