+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prm = new ArrayList<String>();
+
+ if (value!=null && value.length()>0)
+ {
+ try {
+ prm.add(URLEncoder.encode(value,"UTF-8"));
+ } catch (UnsupportedEncodingException ex)
+ {
+ throw new Error("Couldn't encode '"+value+"' as UTF-8.",ex);
+
+ }
+ }
+ return prm;
+ }
+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "";
+ }
+
+ @Override
+ public boolean configureFromURLtokenString(List<String> tokenstring,
+ StringBuffer warnings)
+ {
+ if (tokenstring.size()>1) {
+ warnings.append("IMPLEMENTATION ERROR: Constant POST parameters cannot have more than one value.");
+ return false;
+ }
+ if (tokenstring.size()==1) {
+ value = tokenstring.get(0);
+ }
+ return true;
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+ warnings.append("IMPLEMENTATION ERROR: No Properties to configure for a Constant parameter.");
+ return false;
+ }
+
+ @Override
+ public List<OptionI> getOptions()
+ {
+ // empty list - this parameter isn't configurable, so don't try.
+ return new ArrayList<OptionI>();
+ }