private ModuleDefinition composeJob(String name, ModuleType typeHint, String dslDefinition, boolean force){
		assertModuleUpdatability(name, typeHint, force);
		String composedJobXml = composedJobParser.parse(dslDefinition).toXML(name);
		byte bytes[] = createComposedJobJar(composedJobXml);
		ModuleDefinition moduleDefinition = new UploadedModuleDefinition(name, typeHint, bytes) ;
		Assert.isTrue(this.registry.registerNew(moduleDefinition), moduleDefinition + " could not be saved");
		return moduleDefinition;
	}
A service that knows how to handle registration of new module definitions, be it through composition or
upload of actual 'bytecode'. Handles all bookkeeping (such as existence checking, dependency tracking, <i>etc.</i>)
that is common to all registration scenarios.

<p>Also adds pagination to {@code find*()} methods of {@code ModuleRegistry} after the fact.</p>

@author Eric Bottard
@author Gary Russell
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/support/ModuleDefinitionService.java