|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.control.DefaultController
org.olat.core.gui.control.controller.BasicController
org.olat.core.gui.components.form.flexible.impl.FormBasicController
org.olat.core.commons.modules.bc.FileUploadController
public class FileUploadController
This controller offers a file upload in a dedicated form. It can be configured with an upload limit, a limitation to mime types as allowed upload types and if the path to the target directory should be displayed in the form.
Initial Date: August 15, 2005
| Field Summary |
|---|
| Fields inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController |
|---|
LAYOUT_CUSTOM, LAYOUT_DEFAULT, LAYOUT_HORIZONTAL, LAYOUT_VERTICAL |
| Constructor Summary | |
|---|---|
FileUploadController(WindowControl wControl,
VFSContainer curContainer,
UserRequest ureq,
int upLimitKB,
int remainingQuotKB,
java.util.Set<java.lang.String> mimeTypesRestriction,
boolean showTargetPath)
|
|
FileUploadController(WindowControl wControl,
VFSContainer curContainer,
UserRequest ureq,
int upLimitKB,
int remainingQuotKB,
java.util.Set<java.lang.String> mimeTypesRestriction,
boolean showTargetPath,
boolean showMetadata)
|
|
| Method Summary | |
|---|---|
void |
event(UserRequest ureq,
Controller source,
Event event)
the only method of the interface controllereventlistener. |
java.lang.String |
getNewFileName()
|
int |
getStatus()
|
void |
hideTitleAndFieldset()
Call this to remove the fieldset and title from the form rendering. |
boolean |
isExistingFileOverwritten()
|
void |
reset()
Reset the upload controller |
void |
setMaxUploadSizeKB(int uploadLimitKB)
Set the max upload limit. |
void |
setUploadRelPath(java.lang.String uploadRelPath)
Set the relative path within the rootDir where uploaded files should be put into. |
| Methods inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController |
|---|
dispose, event |
| Methods inherited from class org.olat.core.gui.control.DefaultController |
|---|
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileUploadController(WindowControl wControl,
VFSContainer curContainer,
UserRequest ureq,
int upLimitKB,
int remainingQuotKB,
java.util.Set<java.lang.String> mimeTypesRestriction,
boolean showTargetPath)
wControl - curContainer - Path to the upload directory. Used to check for
existing files with same name and for displaying the optional
targetPathureq - upLimitKB - the max upload file size in kBytes (e.g. 10*1024*1024 for
10MB)remainingQuotKB - the available space left for file upload kBytes
(e.g. 10*1024*1024 for 10MB). Quota.UNLIMITED for no limitation, 0
for no more space leftmimeTypes - Set of supported mime types (image/*, image/jpg) or NULL
if no restriction should be applied.showTargetPath - true: show the relative path where the file will be
uploaded to; false: show no path
public FileUploadController(WindowControl wControl,
VFSContainer curContainer,
UserRequest ureq,
int upLimitKB,
int remainingQuotKB,
java.util.Set<java.lang.String> mimeTypesRestriction,
boolean showTargetPath,
boolean showMetadata)
wControl - curContainer - ureq - upLimitKB - remainingQuotKB - mimeTypesRestriction - showTargetPath - showMetadata - Display the meta data sub form| Method Detail |
|---|
public void event(UserRequest ureq,
Controller source,
Event event)
DefaultController
DefaultController.event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)public int getStatus()
public boolean isExistingFileOverwritten()
public void setMaxUploadSizeKB(int uploadLimitKB)
uploadLimitKB - public void reset()
public void hideTitleAndFieldset()
public void setUploadRelPath(java.lang.String uploadRelPath)
uploadRelPath - public java.lang.String getNewFileName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||