|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wjhk.jupload2.context.DefaultJUploadContext wjhk.jupload2.context.JUploadContextExecutable
public class JUploadContextExecutable
Implementation of the 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
Field Summary | |
---|---|
(package private) static java.lang.String |
DAEMON_PROPERTIES_FILE
|
protected java.util.Properties |
daemonProperties
Content of the /conf/_deamon.properties file. |
(package private) static java.lang.String |
DEFAULT_PROPERTIES_FILE
|
protected java.util.Properties |
defaultProperties
Content of the /conf/default_deamon.properties file. |
private javax.swing.JFrame |
jframe
The main window of the application. |
Fields inherited from class wjhk.jupload2.context.DefaultJUploadContext |
---|
uploadPolicy |
Constructor Summary | |
---|---|
protected |
JUploadContextExecutable(javax.swing.JFrame jframe)
This constructor does nothing. |
|
JUploadContextExecutable(javax.swing.JFrame jframe,
java.lang.String propertiesURL)
The constructor of the context, which needs the top level container to be created. |
Method Summary | |
---|---|
void |
displayURL(java.lang.String url,
boolean success)
Just throws a UnsupportedOperationException exception. |
javax.swing.JApplet |
getApplet()
Just throws a UnsupportedOperationException exception. |
java.awt.Cursor |
getCursor()
Just throws a UnsupportedOperationException exception. |
boolean |
getParameter(java.lang.String key,
boolean def)
Just throws a UnsupportedOperationException exception. |
float |
getParameter(java.lang.String key,
float def)
Just throws a UnsupportedOperationException exception. |
int |
getParameter(java.lang.String key,
int def)
Just throws a UnsupportedOperationException exception. |
long |
getParameter(java.lang.String key,
long def)
Just throws a UnsupportedOperationException exception. |
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
Get a String parameter value from applet properties or System properties. |
(package private) java.util.Properties |
loadPropertiesFromFileInJar(java.lang.String filename,
java.util.Properties defaultProperties)
Creates and loads a property file, and return the loaded result. |
private java.util.Properties |
loadPropertiesFromURL(java.lang.String propertiesURL,
java.util.Properties defaultProperties)
Creates and loads a property file, and return the loaded result. |
java.lang.String |
normalizeURL(java.lang.String url)
This class doesn't control the URL. |
void |
readCookieFromNavigator(java.util.Vector<java.lang.String> headers)
Just throws a UnsupportedOperationException exception. |
void |
readUserAgentFromNavigator(java.util.Vector<java.lang.String> headers)
Just throws a UnsupportedOperationException exception. |
java.awt.Cursor |
setCursor(java.awt.Cursor cursor)
Just throws a UnsupportedOperationException exception. |
void |
showStatus(java.lang.String status)
Just throws a UnsupportedOperationException exception. |
Methods inherited from class wjhk.jupload2.context.DefaultJUploadContext |
---|
displayDebug, displayDebugParameterValue, displayErr, displayInfo, displayWarn, getBuildDate, getBuildNumber, getLastModified, getLogWindow, getMimeType, getSvnProperties, getUploadPanel, getUploadPolicy, getVersion, init, main, parseBoolean, parseFloat, parseInt, parseLong, registerUnload, runUnload, setProperty, setWaitCursor, startUpload |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String DEFAULT_PROPERTIES_FILE
static final java.lang.String DAEMON_PROPERTIES_FILE
private javax.swing.JFrame jframe
protected java.util.Properties defaultProperties
protected java.util.Properties daemonProperties
Constructor Detail |
---|
protected JUploadContextExecutable(javax.swing.JFrame jframe)
public JUploadContextExecutable(javax.swing.JFrame jframe, java.lang.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.Method Detail |
---|
java.util.Properties loadPropertiesFromFileInJar(java.lang.String filename, java.util.Properties defaultProperties)
filename
- The name of the file, which contains the properties to
loaddefaultProperties
- The default properties value. Put null if no
default Properties should be used.
private java.util.Properties loadPropertiesFromURL(java.lang.String propertiesURL, java.util.Properties defaultProperties)
propertiesURL
- The url that points to the properties configuration
file for the daemon.defaultProperties
- The default properties value. Put null if no
default Properties should be used.
public java.lang.String getParameter(java.lang.String key, java.lang.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(java.lang.String key, int def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default value
public float getParameter(java.lang.String key, float def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default value
public long getParameter(java.lang.String key, long def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default value
public boolean getParameter(java.lang.String key, boolean def)
getParameter
in interface JUploadContext
getParameter
in class DefaultJUploadContext
key
- The parameter namedef
- The default value
public void displayURL(java.lang.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 javax.swing.JApplet getApplet()
getApplet
in interface JUploadContext
getApplet
in class DefaultJUploadContext
public java.awt.Cursor getCursor()
getCursor
in interface JUploadContext
getCursor
in class DefaultJUploadContext
UploadPolicy.setCursor(Cursor)
public java.lang.String normalizeURL(java.lang.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(java.util.Vector<java.lang.String> headers)
readCookieFromNavigator
in interface JUploadContext
readCookieFromNavigator
in class DefaultJUploadContext
headers
- The headers, coming from DefaultUploadPolicy
public void readUserAgentFromNavigator(java.util.Vector<java.lang.String> headers)
readUserAgentFromNavigator
in interface JUploadContext
readUserAgentFromNavigator
in class DefaultJUploadContext
headers
- The headers, coming from DefaultUploadPolicy
public java.awt.Cursor setCursor(java.awt.Cursor cursor)
setCursor
in interface JUploadContext
setCursor
in class DefaultJUploadContext
cursor
- The cursor to set
UploadPolicy.setCursor(Cursor)
public void showStatus(java.lang.String status)
showStatus
in interface JUploadContext
showStatus
in class DefaultJUploadContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |