p.add(paramTokens.nextToken());
}
int length = p.size()/2+1;
NamedValue[] internalParams = new NamedValue[length];
for (int i=0; i<length-1; i++) {
internalParams[i] = new NamedValue();
internalParams[i].Name = (String)p.get(i*2);
internalParams[i].Value = p.get(i*2+1);
log.println("Name: "+internalParams[i].Name);
log.println("Value: "+(String)internalParams[i].Value);
}
// do we have test jobs?
String testJob = (String)param.get("job");
PropertyValue[]props;
if (testJob==null) {
if ( param.get("job1")==null ) {
// get all test jobs from runner service
XPropertyAccess xPropAcc = (XPropertyAccess)UnoRuntime.queryInterface(XPropertyAccess.class, oObj);
props = xPropAcc.getPropertyValues();
}
else {
int index=1;
p = new Vector();
while ( param.get("job"+index) != null ) {
p.add(param.get("job"+index));
index++;
}
props = new PropertyValue[p.size()];
for ( int i=0; i<props.length; i++ ) {
props[i] = new PropertyValue();
props[i].Value = p.get(i);
}
}
}
else {
props = new PropertyValue[1];
props[0] = new PropertyValue();
props[0].Value = testJob;
}
log.println("Props length: "+ props.length);
for (int i=0; i<props.length; i++) {
XJob xJob = (XJob)UnoRuntime.queryInterface(XJob.class, oObj);
internalParams[length-1] = new NamedValue();
internalParams[length-1].Name = "-o";
internalParams[length-1].Value = props[i].Value;
log.println("Executing: " + (String)props[i].Value);
String erg = null;