Class AbstractStructureDialog

    • 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
    • Constructor Detail

      • AbstractStructureDialog

        public AbstractStructureDialog()
    • 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
      • 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 document
        media - 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.Exception
        Ok.
        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.Exception
        Cancel 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
      • 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.