public class JUploadContextExecutable extends DefaultJUploadContext
JUploadContext
, for an executable, that is: for a stand alone application. One such
context is created at run time. Its main capabilities, is to load the properties either by a file in the jar file
(see DAEMON_PROPERTIES_FILE), or an URL given to the JUploadDaemon.main(String[])
method.DefaultJUploadContext
,
JUploadDaemon
Modifier and Type | Field and Description |
---|---|
protected Properties |
daemonProperties
Content of the /conf/_deamon.properties file.
|
protected Properties |
defaultProperties
Content of the /conf/default_deamon.properties file.
|
Modifier | Constructor and Description |
---|---|
protected |
JUploadContextExecutable(JFrame jframe)
This constructor does nothing.
|
|
JUploadContextExecutable(JFrame jframe,
String propertiesURL)
The constructor of the context, which needs the top level container to be created.
|
Modifier and Type | Method and Description |
---|---|
void |
displayURL(String url,
boolean success)
Just throws a UnsupportedOperationException exception.
|
JApplet |
getApplet()
Just throws a UnsupportedOperationException exception.
|
Cursor |
getCursor()
Just throws a UnsupportedOperationException exception.
|
boolean |
getParameter(String key,
boolean def)
Just throws a UnsupportedOperationException exception.
|
FilePanel.FileListViewMode |
getParameter(String key,
FilePanel.FileListViewMode def)
Just throws a UnsupportedOperationException exception.
|
float |
getParameter(String key,
float def)
Just throws a UnsupportedOperationException exception.
|
int |
getParameter(String key,
int def)
Just throws a UnsupportedOperationException exception.
|
long |
getParameter(String key,
long def)
Just throws a UnsupportedOperationException exception.
|
String |
getParameter(String key,
String def)
Get a String parameter value from applet properties or System properties.
|
String |
normalizeURL(String url)
This class doesn't control the URL.
|
void |
readCookieFromNavigator(Vector<String> headers)
Just throws a UnsupportedOperationException exception.
|
void |
readUserAgentFromNavigator(Vector<String> headers)
Just throws a UnsupportedOperationException exception.
|
Cursor |
setCursor(Cursor cursor)
Just throws a UnsupportedOperationException exception.
|
void |
showStatus(String status)
Just throws a UnsupportedOperationException exception.
|
displayDebug, displayErr, displayInfo, displayWarn, getBuildDate, getBuildNumber, getDetailedVersionMessage, getFrame, getLastModified, getLogWindow, getMimeType, getSvnProperties, getSvnRevision, getUploadPanel, getUploadPolicy, getVersion, init, parseBoolean, parseFileListViewMode, parseFloat, parseInt, parseLong, registerUnload, runUnload, setProperty, setWaitCursor, startUpload, unload
protected Properties defaultProperties
protected Properties daemonProperties
protected JUploadContextExecutable(JFrame jframe)
public JUploadContextExecutable(JFrame jframe, String propertiesURL)
jframe
- The owner TopLevelWindowpropertiesURL
- The URL where the configuration properties for the daemon can be read. If null, the daemon
try to read the /conf/daemon.properties file, in the current jar.public String getParameter(String key, String def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The name of the parameter to fetch.def
- A default value which is used, when the specified parameter is not set.public int getParameter(String key, int def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default valuepublic float getParameter(String key, float def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default valuepublic long getParameter(String key, long def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default valuepublic boolean getParameter(String key, boolean def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default valuepublic FilePanel.FileListViewMode getParameter(String key, FilePanel.FileListViewMode def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default valuepublic void displayURL(String url, boolean success)
displayURL
in interface JUploadContext
displayURL
in class DefaultJUploadContext
url
- The URL to display, in text format. It will be normalized 'before use'.success
- Indicates whether the upload was a success or not.public JApplet getApplet()
getApplet
in interface JUploadContext
getApplet
in class DefaultJUploadContext
public Cursor getCursor()
getCursor
in interface JUploadContext
getCursor
in class DefaultJUploadContext
UploadPolicy.setCursor(Cursor)
public String normalizeURL(String url) throws JUploadException
normalizeURL
in interface JUploadContext
normalizeURL
in class DefaultJUploadContext
url
- A url. Can be a path relative to the current one.JUploadException
public void readCookieFromNavigator(Vector<String> headers)
readCookieFromNavigator
in interface JUploadContext
readCookieFromNavigator
in class DefaultJUploadContext
headers
- The headers, coming from DefaultUploadPolicy
public void readUserAgentFromNavigator(Vector<String> headers)
readUserAgentFromNavigator
in interface JUploadContext
readUserAgentFromNavigator
in class DefaultJUploadContext
headers
- The headers, coming from DefaultUploadPolicy
public Cursor setCursor(Cursor cursor)
setCursor
in interface JUploadContext
setCursor
in class DefaultJUploadContext
cursor
- The cursor to setUploadPolicy.setCursor(Cursor)
public void showStatus(String status)
showStatus
in interface JUploadContext
showStatus
in class DefaultJUploadContext
Copyright © 2015. All rights reserved.