- details.Name = list[0];
- details.Action = list[1];
- details.description = list[2];
- invalid|=!configureFromServiceInputProperties(list[3], warnings);
- if (list.length > 5)
+
+ int nextpos=parseServiceList(list,warnings, 0);
+ if (nextpos>0)
+ {
+ return true;
+ }
+ return false;
+ }
+ /**
+ * processes the given list from position p, attempting to configure the service from it.
+ * Service lists are formed by concatenating individual stringified services. The first character of a stringified service is '|', enabling this, and the parser will ignore empty fields in a '|' separated list when they fall outside a service definition.
+ * @param list
+ * @param warnings
+ * @param p
+ * @return
+ */
+ protected int parseServiceList(String[] list, StringBuffer warnings, int p)
+ {
+ boolean invalid = false;
+ // look for the first non-empty position - expect it to be service name
+ while (list[p]!=null && list[p].trim().length()==0)
+ {
+ p++;
+ }
+ details.Name = list[p];
+ details.Action = list[p+1];
+ details.description = list[p+2];
+ invalid |= !configureFromServiceInputProperties(list[p+3], warnings);
+ if (list.length-p > 5 && list[p+5]!=null && list[p+5].trim().length()>5)