## com.arsdigita.cms.docmgr.ui
Class FileUploadForm

    java.lang.Object
      com.arsdigita.bebop.Completable
          com.arsdigita.bebop.SimpleComponent
              com.arsdigita.bebop.FormSection
                  com.arsdigita.bebop.Form
                      com.arsdigita.cms.docmgr.ui.FileUploadForm

All Implemented Interfaces:
  com.arsdigita.bebop.util.BebopConstants, Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, DMConstants, EventListener, com.arsdigita.bebop.event.FormInitListener, com.arsdigita.bebop.event.FormProcessListener, com.arsdigita.bebop.event.FormValidationListener, com.arsdigita.util.Lockable

public class FileUploadForm
extends com.arsdigita.bebop.Form
implements com.arsdigita.bebop.event.FormInitListener, com.arsdigita.bebop.event.FormValidationListener, com.arsdigita.bebop.event.FormProcessListener, DMConstants

Form to upload and submit a file to the document repository.

Author:
  Stefan Deusch

Field Summary
`static String` `versionId`

Fields inherited from class com.arsdigita.bebop.Form
`GET, POST`

Fields inherited from class com.arsdigita.bebop.FormSection
`m_formModel, m_panel`

Fields inherited from class com.arsdigita.bebop.SimpleComponent
`m_attr`

Fields inherited from interface com.arsdigita.cms.docmgr.ui.DMConstants

`ABS_PATH, ACTION_COPY_LABEL, ACTION_COPY_SUBMIT, ACTION_COPY_VALUE, ACTION_CUT_LABEL, ACTION_CUT_VALUE, ACTION_DELETE_CONFIRM, ACTION_DELETE_LABEL, ACTION_DELETE_SUBMIT, ACTION_DELETE_VALUE, ACTION_ERROR_CONTINUE, ACTION_ERROR_LABEL, ACTION_MOVE_SUBMIT, BUNDLE_NAME, CANCEL, CAT_TREE_ID_PARAM_NAME, CAT_TREE_INIT_ID_PARAM_NAME, DESTINATION_FOLDER_PANEL_HEADER, DIFFERENT_MIMETYPE_ERROR, DOC_COL_ID_PARAM_NAME, DOCS_XML_NS, EMAIL_INVALID_ERROR, END_DATE_PARAM_NAME, FILE_ACTION_HEADER, FILE_CATEGORIES, FILE_DELETE_CONFIRM, FILE_DELETE_HEADER, FILE_DELETE_LINK, FILE_DESCRIPTION, FILE_DOWNLOAD_HEADER, FILE_DOWNLOAD_LINK, FILE_EDIT_ACTION_DESCRIPTION, FILE_EDIT_HEADER, FILE_EDIT_LINK, FILE_FEEDBACK_HEADER, FILE_ID_PARAM_NAME, FILE_INFO_COMMENTS_TITLE, FILE_INFO_HISTORY_TITLE, FILE_INFO_LABEL, FILE_INFO_LINKS_TITLE, FILE_INFO_PROPERTIES_TITLE, FILE_INTENDED_AUDIENCE, FILE_INTENDED_AUDIENCE_INTERNAL, FILE_INTENDED_AUDIENCE_PUBLIC, FILE_INTENDED_AUDIENCE_WORKSPACE, FILE_KEYWORDS, FILE_NAME, FILE_NAME_REQUIRED, FILE_NEW_VERSION_LINK, FILE_PROPERTIES_HEADER, FILE_REVISION_HISTORY_HEADER, FILE_SAVE, FILE_SEND_COLLEAGUE_FORM_EMAIL, FILE_SEND_COLLEAGUE_HEADER, FILE_SEND_COLLEAGUE_LINK, FILE_SEND_COLLEAGUE_MESSAGE, FILE_SEND_COLLEAGUE_RETURN_ADDRESS, FILE_SEND_COLLEAGUE_SUBJECT, FILE_SEND_COLLEAGUE_SUBMIT, FILE_SEND_COLLEAGUE_THANKS, FILE_SEND_COLLEAGUE_THANKS_RETURN_LINK, FILE_SOURCE, FILE_SUBMIT, FILE_UPLOAD_ADD_FILE, FILE_UPLOAD_FORM_HEADER, FILE_UPLOAD_HEADER, FILE_UPLOAD_INITIAL_TRANSACTION_DESCRIPTION, FILE_VERSION_DESCRIPTION, FILES, FOLDER_ADD_DOC_PARAM_NAME, FOLDER_CREATE_FORM_HEADER, FOLDER_DESCRIPTION, FOLDER_DESCRIPTION_LABEL, FOLDER_EMPTY_LABEL, FOLDER_ID, FOLDER_INFORMATION_HEADER, FOLDER_NAME, FOLDER_NAME_LABEL, FOLDER_NEW_CREATE_LINK, FOLDER_NEW_DOCLINK_LINK, FOLDER_NEW_FILE_LINK, FOLDER_NEW_FOLDER_LINK, FOLDER_PARENTNOTFOUND_ERROR, FOLDER_SAVE, FOLDERS, GET_ALL_TREES, GET_CHILDREN, GET_REPOSITORIES, GET_REPOSITORIES_ROOTS, GO_BACK_LABEL, HELP_LABEL, IS_FOLDER, IS_LOCKED, IS_MOUNTED, LAST_MODIFIED, MIME_TYPE_LABEL, MODIFYING_USER, MY_WORKSPACE_LABEL, NAME, NUM_FILES, OPEN_FOLDER_ID_PARAM, OPEN_FOLDER_ID_PARAM_NAME, PAGE_TITLE_LABEL, PARAM_ROOT_ADD_DOC_LINK, REPOSITORIES_INFORMATION_HEADER, REPOSITORIES_MOUNTED_SAVE, REPOSITORY_ID, REPOSITORY_RECENTDOCS_EMPTY, RESOURCE_EXISTS_ERROR, RESOURCE_ID, ROOT_ADD_DOC_PARAM, ROOT_ADD_DOC_PARAM_NAME, ROOT_ADD_DOCLINK_LINK, ROOT_ADD_RESOURCE_LINK, ROOTFOLDER_ID_PARAM, ROOTFOLDER_ID_PARAM_NAME, SEL_FOLDER_ID_PARAM, SEL_FOLDER_ID_PARAM_NAME, SEND_FRIEND_FORM_DESCRIPTION, SEND_FRIEND_FORM_EMAIL_LIST, SEND_FRIEND_FORM_EMAIL_SUBJECT, SEND_FRIEND_FORM_SUBMIT, SIGN_OUT_LABEL, SIZE, START_DATE_PARAM_NAME, TARGET_REQUIRED, TITLE_REQUIRED, TYPE, WS_BROWSE_TITLE, WS_REPOSITORIES_TITLE, WS_SEARCH_TITLE`

Fields inherited from interface com.arsdigita.bebop.util.BebopConstants

`BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA`

Fields inherited from interface com.arsdigita.bebop.Component
`BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE`

Constructor Summary
`FileUploadForm(com.arsdigita.cms.docmgr.ui.BrowsePane parent, com.arsdigita.bebop.Tree tree)` Constructor
`FileUploadForm(com.arsdigita.cms.docmgr.ui.BrowsePane parent, com.arsdigita.bebop.Tree tree, boolean initListeners)`

Method Summary
`protected String` `getFileName(com.arsdigita.bebop.event.FormSectionEvent e)` Gets either the file name from the widget or takes the filename from the upload widget in this order.
`void` `init(com.arsdigita.bebop.event.FormSectionEvent e)`
`protected BigDecimal` `insertFile(com.arsdigita.bebop.event.FormSectionEvent e)` Post the file to a temporary file on the server and insert it into the database
`void` `process(com.arsdigita.bebop.event.FormSectionEvent e)` Post the file to a temporary file on the server and insert it into the database
`void` `validate(com.arsdigita.bebop.event.FormSectionEvent e)` Verify that the parent folder exists and does not contain any other files or sub folders with the same name as the file being uploaded.

Methods inherited from class com.arsdigita.bebop.Form
`addMagicTag, excludeParameterFromExport, generateErrors, generateXML, generateXMLSansState, getAction, getFormData, getName, getProcessInvisible, isRedirecting, process, register, respond, setAction, setEncType, setFormData, setMethod, setName, setOnReset, setOnSubmit, setProcessInvisible, setRedirecting, toString, traverse`

Methods inherited from class com.arsdigita.bebop.FormSection

`add, add, addCancelListener, addInitListener, addProcessListener, addSubmissionListener, addValidationListener, children, contains, createInitListener, createProcessListener, createSubmissionListener, createValidationListener, fireCancel, fireInit, fireProcess, fireSubmitted, fireValidate, forwardInit, forwardProcess, forwardSubmission, forwardValidation, get, getModel, getPanel, indexOf, isEmpty, lock, register, removeCancelListener, removeInitListener, removeProcessListener, removeSubmissionListener, removeValidationListener, size`

Methods inherited from class com.arsdigita.bebop.SimpleComponent
`clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible`

Methods inherited from class com.arsdigita.bebop.Completable
`addCompletionListener, fireCompletionEvent`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.arsdigita.bebop.Component
`getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible`

Methods inherited from interface com.arsdigita.util.Lockable
`isLocked`

Field Detail

### versionId

    public static final String versionId

See Also:
  Constant Field Values

Constructor Detail

### FileUploadForm

    public FileUploadForm(com.arsdigita.cms.docmgr.ui.BrowsePane parent,
                          com.arsdigita.bebop.Tree tree)

  Constructor

### FileUploadForm

    public FileUploadForm(com.arsdigita.cms.docmgr.ui.BrowsePane parent,
                          com.arsdigita.bebop.Tree tree,
                          boolean initListeners)

Method Detail

### insertFile

    protected BigDecimal insertFile(com.arsdigita.bebop.event.FormSectionEvent e)
                             throws com.arsdigita.bebop.FormProcessException

  Post the file to a temporary file on the server and insert it into the database

  Throws:
    `com.arsdigita.bebop.FormProcessException`

### init

    public void init(com.arsdigita.bebop.event.FormSectionEvent e)

  Specified by:
    `init` in interface `com.arsdigita.bebop.event.FormInitListener`

### process

    public void process(com.arsdigita.bebop.event.FormSectionEvent e)
                 throws com.arsdigita.bebop.FormProcessException

  Post the file to a temporary file on the server and insert it into the database

  Specified by:
    `process` in interface `com.arsdigita.bebop.event.FormProcessListener`
  Throws:
    `com.arsdigita.bebop.FormProcessException`

### getFileName

    protected String getFileName(com.arsdigita.bebop.event.FormSectionEvent e)

  Gets either the file name from the widget or takes the filename from the upload widget in this order.

### validate

    public void validate(com.arsdigita.bebop.event.FormSectionEvent e)
                  throws com.arsdigita.bebop.FormProcessException

  Verify that the parent folder exists and does not contain any other files or sub folders with the same name as the file being uploaded.

  Specified by:
    `validate` in interface `com.arsdigita.bebop.event.FormValidationListener`
  Throws:
    `com.arsdigita.bebop.FormProcessException`

Copyright (c) 2006 Red Hat, Inc. Corporation. All Rights Reserved. Generated at June 1 2006:1113 UTC