|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.form.Form<Void>
eu.esdihumboldt.hale.server.projects.war.components.UploadForm
public class UploadForm
Upload form for new projects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.markup.html.form.Form |
---|
org.apache.wicket.markup.html.form.Form.MethodMismatchResponse, org.apache.wicket.markup.html.form.Form.ValidationVisitor |
Field Summary |
---|
Fields inherited from class org.apache.wicket.markup.html.form.Form |
---|
ENCTYPE_MULTIPART_FORM_DATA, METHOD_GET, METHOD_POST |
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Fields inherited from interface org.apache.wicket.markup.html.form.IFormSubmitListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
UploadForm(String id)
|
Method Summary | |
---|---|
void |
addAllowedContentType(String contentType)
Add an allowed content type. |
static String |
bytesToString(org.apache.wicket.util.lang.Bytes bytes,
Locale locale)
Convert Bytes to a string, produces a prettier output than
Bytes.toString(Locale) |
protected boolean |
checkContentType(String contentType)
Check if the given content type is allowed for upload |
static void |
extract(File baseDir,
InputStream in)
Extract a ZIP archive. |
protected String |
getTypeErrorMessage(String type)
Get the error message if the upload of the given type is not supported |
protected void |
onFileUploadException(org.apache.wicket.util.upload.FileUploadException e,
Map<String,Object> model)
|
protected void |
onSubmit()
|
protected void |
onUploadSuccess()
Called after a successful upload. |
void |
setCustomTypeErrorMessage(String customTypeErrorMessage)
|
Methods inherited from class org.apache.wicket.markup.html.form.Form |
---|
add, appendDefaultButtonField, beforeUpdateFormComponentModels, callOnError, clearInput, delegateSubmit, encodeUrlInHiddenFields, error, findForm, findSubmittingButton, getActionUrl, getDefaultButton, getFormValidators, getHiddenFieldId, getInputNamePrefix, getJsForInterfaceUrl, getMaxSize, getMethod, getModel, getModelObject, getRootForm, getRootFormRelativeId, getStatelessHint, getValidatorKeyPrefix, handleMultiPart, hasError, internalOnModelChanged, isMultiPart, isRootForm, isSubmitted, markFormComponentsInvalid, markFormComponentsValid, onBeforeRender, onComponentTag, onComponentTagBody, onDetach, onError, onFormSubmitted, onFormSubmitted, onMethodMismatch, onValidate, onValidateModelObjects, process, registerJavaScriptNamespaces, remove, renderHead, renderPlaceholderTag, setDefaultButton, setMaxSize, setModel, setModelObject, setMultiPart, setVersioned, updateFormComponentModels, validate, validateComponents, validateFormValidator, validateFormValidators, visitFormComponents, visitFormComponentsPostOrder, wantSubmitOnNestedFormSubmit, writeParamsAsHiddenFields |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getWebPage, getWebRequest, getWebResponse, getWebSession |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
Methods inherited from class org.apache.wicket.Component |
---|
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onConfigure, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UploadForm(String id)
Form.Form(String)
Method Detail |
---|
public void addAllowedContentType(String contentType)
contentType
- the content type to addprotected boolean checkContentType(String contentType)
contentType
- the content type
protected void onSubmit()
onSubmit
in class org.apache.wicket.markup.html.form.Form<Void>
Form.onSubmit()
protected void onUploadSuccess()
protected String getTypeErrorMessage(String type)
type
- the content type
protected void onFileUploadException(org.apache.wicket.util.upload.FileUploadException e, Map<String,Object> model)
onFileUploadException
in class org.apache.wicket.markup.html.form.Form<Void>
Form.onFileUploadException(FileUploadException, Map)
public void setCustomTypeErrorMessage(String customTypeErrorMessage)
customTypeErrorMessage
- the customTypeErrorMessage to setpublic static String bytesToString(org.apache.wicket.util.lang.Bytes bytes, Locale locale)
Bytes
to a string, produces a prettier output than
Bytes.toString(Locale)
bytes
- the byteslocale
- the locale
public static void extract(File baseDir, InputStream in) throws IOException
baseDir
- the base directory to extract toin
- the input stream of the ZIP archive, which is closed after
extraction
IOException
- if an error occurs
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |