* param warnings a StringBuffer that any warnings about invalid
* content will be appended to.
*/
- private void configureFromServiceInputProperties(String propList,
+ private boolean configureFromServiceInputProperties(String propList,
StringBuffer warnings)
{
String[] props = separatorListToArray(propList, ",");
if (props == null)
{
- return;
+ return true;
}
;
+ boolean valid=true;
String val = null;
int i;
for (String prop : props)
}
if (prop.equals("gapCharacter"))
{
- if (val == null || val.length() > 1)
+ if (val == null || val.length()==0 || val.length() > 1)
{
+ valid=false;
warnings.append((warnings.length() > 0 ? "\n" : "")
+ ("Invalid service property: gapCharacter=' ' (single character) - was given '"
+ val + "'"));
}
if (prop.equals("returns"))
{
+ int l=warnings.length();
_configureOutputFormatFrom(val, warnings);
+ valid = (l!=warnings.length());
}
}
+ return valid;
}
private String _genOutputFormatString()
public boolean configureFromEncodedString(String encoding,
StringBuffer warnings)
{
- boolean valid = false;
+ boolean invalid = false;
String[] list = separatorListToArray(encoding, "|");
details.Name = list[0];
details.Action = list[1];
details.description = list[2];
- configureFromServiceInputProperties(list[3], warnings);
+ invalid|=!configureFromServiceInputProperties(list[3], warnings);
if (list.length > 5)
{
urlSuffix = list[4];
- valid |= configureFromInputParamEncodedUrl(list[5], warnings);
+ invalid |= !configureFromInputParamEncodedUrl(list[5], warnings);
}
else
{
urlSuffix = null;
- valid |= configureFromInputParamEncodedUrl(list[4], warnings);
+ invalid |= !configureFromInputParamEncodedUrl(list[4], warnings);
}
- return valid;
+ return !invalid;
}
/**
return jobId + urlSuffix;
}
- private List<JvDataType> resultData;
+ private List<JvDataType> resultData=new ArrayList<JvDataType>();
/**
*