|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwjhk.jupload2.policies.UploadPolicyFactory
public class UploadPolicyFactory
This class is used to control creation of the uploadPolicy instance,
according to applet parameters (or System properties).
The used parameters are:
DefaultUploadPolicy,
CoppermineUploadPolicy
| Constructor Summary | |
|---|---|
UploadPolicyFactory()
|
|
| Method Summary | |
|---|---|
static boolean |
getParameter(JUploadApplet theApplet,
String key,
boolean def,
UploadPolicy uploadPolicy)
Get a boolean parameter value from applet properties or System properties. |
static float |
getParameter(JUploadApplet theApplet,
String key,
float def,
UploadPolicy uploadPolicy)
Get a String parameter value from applet properties or System properties. |
static int |
getParameter(JUploadApplet theApplet,
String key,
int def,
UploadPolicy uploadPolicy)
Get a String parameter value from applet properties or System properties. |
static long |
getParameter(JUploadApplet theApplet,
String key,
long def,
UploadPolicy uploadPolicy)
Get a String parameter value from applet properties or System properties. |
static String |
getParameter(JUploadApplet theApplet,
String key,
String def,
UploadPolicy uploadPolicy)
Get a String parameter value from applet properties or System properties. |
static UploadPolicy |
getUploadPolicy(JUploadApplet theApplet)
Returns an upload Policy for the given applet and URL. |
static boolean |
parseBoolean(String value,
boolean def,
UploadPolicy uploadPolicy)
This function try to parse value as a boolean. |
static float |
parseFloat(String value,
float def,
UploadPolicy uploadPolicy)
This function try to parse value as a float number. |
static int |
parseInt(String value,
int def,
UploadPolicy uploadPolicy)
This function try to parse value as an integer. |
static long |
parseLong(String value,
long def,
UploadPolicy uploadPolicy)
This function try to parse value as a Long. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UploadPolicyFactory()
| Method Detail |
|---|
public static UploadPolicy getUploadPolicy(JUploadApplet theApplet)
throws Exception
theApplet - if not null : use this Applet Parameters. If null, use
System properties.
Exception
public static String getParameter(JUploadApplet theApplet,
String key,
String def,
UploadPolicy uploadPolicy)
theApplet - The applet which provides the parameter. If null, the
parameter is retrieved from the system property.key - The name of the parameter to fetch.def - A default value which is used, when the specified parameter is
not set.uploadPolicy - Unused
public static int getParameter(JUploadApplet theApplet,
String key,
int def,
UploadPolicy uploadPolicy)
theApplet - The current appletkey - The parameter namedef - The default valueuploadPolicy - The current upload policy
public static float getParameter(JUploadApplet theApplet,
String key,
float def,
UploadPolicy uploadPolicy)
theApplet - The current appletkey - The parameter namedef - The default valueuploadPolicy - The current upload policy
public static long getParameter(JUploadApplet theApplet,
String key,
long def,
UploadPolicy uploadPolicy)
theApplet - The current appletkey - The parameter namedef - The default valueuploadPolicy - The current upload policy
public static boolean getParameter(JUploadApplet theApplet,
String key,
boolean def,
UploadPolicy uploadPolicy)
theApplet - The current appletkey - The parameter namedef - The default valueuploadPolicy - The current upload policy
public static int parseInt(String value,
int def,
UploadPolicy uploadPolicy)
value - The string value, that must be parseddef - The default valueuploadPolicy - The current upload policy
public static float parseFloat(String value,
float def,
UploadPolicy uploadPolicy)
value - The string value, that must be parseddef - The default valueuploadPolicy - The current upload policy
public static long parseLong(String value,
long def,
UploadPolicy uploadPolicy)
value - The string value, that must be parseddef - The default valueuploadPolicy - The current upload policy
public static boolean parseBoolean(String value,
boolean def,
UploadPolicy uploadPolicy)
value - The new value for this property. If invalid, the default
value is used.def - The default value: used if value is invalid.uploadPolicy - If not null, it will be used to display a warning
when the value is invalid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||