public interface JUploadContext
Modifier and Type | Method and Description |
---|---|
void |
displayURL(String url,
boolean success)
Displays a given URL, in the given target.
|
JApplet |
getApplet()
Retrieves the current applet.
|
String |
getBuildDate() |
int |
getBuildNumber() |
Cursor |
getCursor() |
String |
getDetailedVersionMessage() |
Frame |
getFrame()
Returns the current frame.
|
String |
getLastModified() |
JUploadTextArea |
getLogWindow()
Retrieves the current log window of this applet.
|
String |
getMimeType(String fileExtension)
Returns the mime type associated with the given file extension.
|
boolean |
getParameter(String key,
boolean def)
Get a boolean parameter value from applet properties or System properties.
|
FilePanel.FileListViewMode |
getParameter(String key,
FilePanel.FileListViewMode def)
Get a
FilePanel.FileListViewMode parameter value from applet properties or System properties. |
float |
getParameter(String key,
float def)
Get a String parameter value from applet properties or System properties.
|
int |
getParameter(String key,
int def)
Get a String parameter value from applet properties or System properties.
|
long |
getParameter(String key,
long def)
Get a String parameter value from applet properties or System properties.
|
String |
getParameter(String key,
String def)
Get a String parameter value from applet properties or System properties.
|
String |
getSvnRevision() |
JUploadPanel |
getUploadPanel()
Retrieves the current upload panel.
|
UploadPolicy |
getUploadPolicy()
This method the current UploadPolicy, associated with the current execution context.
|
String |
getVersion() |
String |
normalizeURL(String url)
Generates a valid URL, from a String.
|
boolean |
parseBoolean(String value,
boolean def)
This function try to parse value as a boolean.
|
FilePanel.FileListViewMode |
parseFileListViewMode(String value,
FilePanel.FileListViewMode def)
This function try to parse value as a
FilePanel.FileListViewMode . |
float |
parseFloat(String value,
float def)
This function try to parse value as a float number.
|
int |
parseInt(String value,
int def)
This function try to parse value as an integer.
|
long |
parseLong(String value,
long def)
This function try to parse value as a Long.
|
void |
readCookieFromNavigator(Vector<String> headers)
This method allows to read the navigator cookies.
|
void |
readUserAgentFromNavigator(Vector<String> headers)
This method allows to read the navigator userAgent.
|
void |
registerUnload(Object object,
String method)
Register a callback to be executed during applet termination.
|
void |
runUnload()
Runs all callback that must be called when releasing the applet.
|
Cursor |
setCursor(Cursor cursor) |
void |
setProperty(String prop,
String value)
This allow runtime modifications of properties, from javascript.
|
Cursor |
setWaitCursor()
Sets the wait cursor on the current application (applet, executable...).
|
void |
showStatus(String status)
Displays a message in the status window.
|
String |
startUpload()
Public method that can be called by Javascript to start upload
|
String getDetailedVersionMessage()
String getVersion()
String getSvnRevision()
String getLastModified()
String getBuildDate()
int getBuildNumber()
void displayURL(String url, boolean success)
url
- The URL to display, in text format. It will be normalized 'before use'.success
- Indicates whether the upload was a success or not.JApplet getApplet()
ByteArrayEncoderHTTP
, to append form variable.
It will be removed, in the future.Frame getFrame()
JUploadTextArea getLogWindow()
JUploadPanel.showOrHideLogWindow()
String getMimeType(String fileExtension)
fileExtension
- The file extension, in any case.JUploadPanel getUploadPanel()
UploadPolicy getUploadPolicy() throws JUploadException
JUploadException
Cursor getCursor()
UploadPolicy.setCursor(Cursor)
Cursor setCursor(Cursor cursor)
cursor
- The cursor to setUploadPolicy.setCursor(Cursor)
Cursor setWaitCursor()
UploadPolicy.setCursor(Cursor)
void showStatus(String status)
status
- String getParameter(String key, String def)
key
- The name of the parameter to fetch.def
- A default value which is used, when the specified parameter is not set.int getParameter(String key, int def)
key
- The parameter namedef
- The default valuefloat getParameter(String key, float def)
key
- The parameter namedef
- The default valuelong getParameter(String key, long def)
key
- The parameter namedef
- The default valueboolean getParameter(String key, boolean def)
key
- The parameter namedef
- The default valueFilePanel.FileListViewMode getParameter(String key, FilePanel.FileListViewMode def)
FilePanel.FileListViewMode
parameter value from applet properties or System properties.key
- The parameter namedef
- The default valueint parseInt(String value, int def)
value
- The string value, that must be parseddef
- The default valuefloat parseFloat(String value, float def)
value
- The string value, that must be parseddef
- The default valuelong parseLong(String value, long def)
value
- The string value, that must be parseddef
- The default valueboolean parseBoolean(String value, boolean def)
value
- The new value for this property. If invalid, the default value is used.def
- The default value: used if value is invalid.FilePanel.FileListViewMode parseFileListViewMode(String value, FilePanel.FileListViewMode def)
FilePanel.FileListViewMode
. If value is not a correct
FilePanel.FileListViewMode
, a warning is logged, and def is returned.value
- The new value for this property. If invalid, the default value is used.def
- The default value: used if value is invalid.FilePanel.FileListViewMode
value of value, or def if value is not a valid
FilePanel.FileListViewMode
.void readCookieFromNavigator(Vector<String> headers)
headers
- The headers, coming from DefaultUploadPolicy
void readUserAgentFromNavigator(Vector<String> headers)
headers
- The headers, coming from DefaultUploadPolicy
String normalizeURL(String url) throws JUploadException
url
- A url. Can be a path relative to the current one.JUploadException
void registerUnload(Object object, String method)
object
- The Object instance to be registeredmethod
- The Method of that object to be registered. The method must be of type void and must not take any
parameters and must be public.void runUnload()
void setProperty(String prop, String value)
prop
- The property name that must be set.value
- The value of this property.String startUpload()
JavascriptHandler
javadoc.Copyright © 2015. All rights reserved.