I'm working with Jberet an implementation of Java EE 7 Batch Processing (JSR-352). I wanted to know if there was a nicer syntax for making a list in the JSL (Job Specification Language) for an object that's used for injection instead of giving a comma delimited list. I wanted to make a list of java classes, and it becomes really long and unreadable if I put them all in one line. This is how I would currently do it
<step id="listExample">
<batchlet ref="com.work.production.imports.batch.batchlet.ListExampleBatchlet">
<properties>
<property name="rawClazz" value="com.workstuff.production.imports.entity.Class1, com.workstuff.production.imports.entity.Class2, com.workstuff.production.imports.entity.Class3"/>
</properties>
</batchlet>
It'd be nice if there was something like:
<step id="listExample">
<batchlet ref="com.workstuff.production.imports.batch.batchlet.ListExampleBatchlet">
<properties>
<property name="rawClazz">
<list>
<li value = "com.workstuff.production.imports.entity.Class1"/>
<li value = "com.workstuff.production.imports.entity.Class2"/>
<li value = "com.workstuff.production.imports.entity.Class3"/>
</list>
</property>
</properties>
</batchlet>
I couldn't find anything like that after searching for about an hour. The implementation of batch that I'm using is Jberet. I know I can simply do string manipulation and create my own list, but I was wondering if there was a cleaner solution.