Package com.saperion.ngc.dialogs
Class AbstractStructureDialog
- 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.dialogs.AbstractStructureDialog
-
- All Implemented Interfaces:
EventChild,EventChildHandler,LogEventChildHandler,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
- Direct Known Subclasses:
CheckinDialog,EditStructureDialog,ShareBaseCheckInDialog
public abstract class AbstractStructureDialog extends BaseWindow
Base-class for dialogs that change a document's structure.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractStructureDialog.StructureDialogResultResult of Dialog.static classAbstractStructureDialog.StructureItemRepresents a row in the dialog's list.static classAbstractStructureDialog.StructureUploadActionActions to perform when a document was uploaded.
-
Field Summary
Fields Modifier and Type Field Description static intCANCELCancel button.protected static java.lang.StringCONTENT_LISTID of the listbox in the dialog.protected java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo>documentPagesList of the document's elements.static intOKOK button.protected static java.lang.StringOK_BUTTONID of the login-button in the dialog.protected static java.lang.StringSTATUSName of the status attribute of a row.protected static java.lang.StringSTATUS_ADDEDIndicates that the row was added to the document's structure.protected static java.lang.StringSTATUS_LOADEDIndicates that the the document's content of a row in the dialog was changed.protected static java.lang.StringSTATUS_NEWStatus of the row that created a new item.protected static java.lang.StringSTATUS_REMOVEDIndicates that the element denoted by a row in the dialog will be deleted.protected static java.lang.StringSTATUS_UNCHANGEDIndicates that a row in the dialog was not changed.-
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 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_IGNORE
-
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
-
-
Constructor Summary
Constructors Constructor Description AbstractStructureDialog()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddContentUpdate(int position, java.io.InputStream dataStream, java.lang.String fileName)voidaddContentUpdate(int position, org.zkoss.util.media.Media media)Adds update entry for the given position; if entry exits for that position, it is replaced.protected org.zkoss.zul.ListitemaddNewDocument(org.zkoss.zk.ui.event.UploadEvent uploadEvent)Adds a new item to the structure.voidendModalCancel()Cancel dialog.voidendModalOk(java.lang.String versionComment)Ok.java.lang.StringgetLocalizedString(java.lang.String text)booleanhasNoUpdates()booleanisCommentEnabled()static booleanisDeletable(DocumentArchiveMetaInfo.ElementArchiveMetaInfo info)Indicates if the given element can be deleted by this dialog.static booleanisUploadable(DocumentArchiveMetaInfo.ElementArchiveMetaInfo info)Indicates if the given element can be updloaded by this dialog.voidonUpload(org.zkoss.zk.ui.event.Event event)Event-listener for upload-event triggered when a user adds a new document in the dialog.abstract voidremoveItem()Removes the selected item from the list.protected voidsetCommentEnabled(boolean commentEnabled)protected voidsetDefaultComment(java.lang.String defaultComment)protected voidsetDocumentPages(java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentPages)protected voidsetListener(org.zkoss.zk.ui.event.EventListener eventListener)voidsetLocalization(LocalizationUtil localizationUtil)Sets localization.voidsetUploadAction(AbstractStructureDialog.StructureUploadAction action)Sets the action to perform when a document was uploaded.voidundoContentUpdate(int position)Deletes content entry at the given position.abstract voiduploadItem()Uploads a new item to add it to the document.-
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, setEventtarget
-
Methods 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, setVisible
-
Methods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
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
-
Methods 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, 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.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
STATUS_LOADED
protected static final java.lang.String STATUS_LOADED
Indicates that the the document's content of a row in the dialog was changed.- See Also:
- Constant Field Values
-
STATUS_REMOVED
protected static final java.lang.String STATUS_REMOVED
Indicates that the element denoted by a row in the dialog will be deleted.- See Also:
- Constant Field Values
-
STATUS_UNCHANGED
protected static final java.lang.String STATUS_UNCHANGED
Indicates that a row in the dialog was not changed.- See Also:
- Constant Field Values
-
STATUS_NEW
protected static final java.lang.String STATUS_NEW
Status of the row that created a new item.- See Also:
- Constant Field Values
-
STATUS_ADDED
protected static final java.lang.String STATUS_ADDED
Indicates that the row was added to the document's structure.- See Also:
- Constant Field Values
-
STATUS
protected static final java.lang.String STATUS
Name of the status attribute of a row.- See Also:
- Constant Field Values
-
OK_BUTTON
protected static final java.lang.String OK_BUTTON
ID of the login-button in the dialog.- See Also:
- Constant Field Values
-
CONTENT_LIST
protected static final java.lang.String CONTENT_LIST
ID of the listbox in the dialog.- See Also:
- Constant Field Values
-
OK
public static final int OK
OK button.- See Also:
- Constant Field Values
-
CANCEL
public static final int CANCEL
Cancel button.- See Also:
- Constant Field Values
-
documentPages
protected java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentPages
List of the document's elements.
-
-
Method Detail
-
removeItem
public abstract void removeItem()
Removes the selected item from the list.
-
uploadItem
public abstract void uploadItem()
Uploads a new item to add it to the document.
-
setLocalization
public void setLocalization(LocalizationUtil localizationUtil)
Sets localization.- Parameters:
localizationUtil- localization utility object
-
setDocumentPages
protected void setDocumentPages(java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentPages)
- Parameters:
documentPages- list of the document's elements
-
addContentUpdate
public void addContentUpdate(int position, org.zkoss.util.media.Media media)Adds update entry for the given position; if entry exits for that position, it is replaced.- Parameters:
position- content's position in documentmedia- content, null indicates content to be removed
-
addContentUpdate
public void addContentUpdate(int position, java.io.InputStream dataStream, java.lang.String fileName)
-
undoContentUpdate
public void undoContentUpdate(int position)
Deletes content entry at the given position.- Parameters:
position- content's position in document
-
hasNoUpdates
public boolean hasNoUpdates()
- Returns:
- true if no updates are enqueued
-
endModalOk
public void endModalOk(java.lang.String versionComment) throws java.lang.ExceptionOk.- Parameters:
versionComment- version comment- Throws:
java.lang.Exception- exception
-
getLocalizedString
public java.lang.String getLocalizedString(java.lang.String text)
- Parameters:
text- text to localize- Returns:
- localized text
-
endModalCancel
public void endModalCancel() throws java.lang.ExceptionCancel dialog.- Throws:
java.lang.Exception- exception
-
setListener
protected void setListener(org.zkoss.zk.ui.event.EventListener eventListener)
- Parameters:
eventListener- listener to be called when dialog is closed
-
onUpload
public void onUpload(org.zkoss.zk.ui.event.Event event)
Event-listener for upload-event triggered when a user adds a new document in the dialog.- Parameters:
event- upload-event
-
addNewDocument
protected org.zkoss.zul.Listitem addNewDocument(org.zkoss.zk.ui.event.UploadEvent uploadEvent)
Adds a new item to the structure.- Parameters:
uploadEvent- event with unploaded document- Returns:
- newly created listitem or null if no item was added
-
setDefaultComment
protected void setDefaultComment(java.lang.String defaultComment)
- Parameters:
defaultComment- default comment for comment-textbox in dialog
-
setCommentEnabled
protected void setCommentEnabled(boolean commentEnabled)
- Parameters:
commentEnabled- enable or disable comment-textbox in dialog
-
isCommentEnabled
public boolean isCommentEnabled()
- Returns:
- true if comment textbox is enabled
-
setUploadAction
public void setUploadAction(AbstractStructureDialog.StructureUploadAction action)
Sets the action to perform when a document was uploaded.- Parameters:
action- action- See Also:
AbstractStructureDialog.StructureUploadAction
-
isUploadable
public static boolean isUploadable(DocumentArchiveMetaInfo.ElementArchiveMetaInfo info)
Indicates if the given element can be updloaded by this dialog. Currently all other types than images can be uploaded.- Parameters:
info- archive-meta-info of element- Returns:
- true if this dialog permits to upload (checkin) this element, false otherwise.
-
isDeletable
public static boolean isDeletable(DocumentArchiveMetaInfo.ElementArchiveMetaInfo info)
Indicates if the given element can be deleted by this dialog. Currently all other types than images can be uploaded.- Parameters:
info- archive-meta-info of element- Returns:
- true if this dialog permits to delete this element, false otherwise.
-
-