JobBuilder.java 1.63 KB
Newer Older
1
2
package eu.simstadt.nf;

3
4
import java.io.File;

5
6
7
8
9
/**
 * Implementations of JobBuilder build nF import and export jobs using nF's XML job format. There should be
 * one implementation for each version of novaFACTORY. The supported version should be returned by
 * supportsNFVersion().
 * 
10
11
12
 * @param <I> A import JobDescriptor.
 * @param <E> JobBuilder takes implementations of JobDescriptor in order to populate the XML export job.
 * 
13
14
 * @author Marcel Bruse
 */
15
public interface JobBuilder<I extends JobDescriptor, E extends JobDescriptor> {
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

	/**
	 * @return Tells the caller the supported version of novaFACTORY.
	 */
	public String supportsNFVersion();
	
	/**
	 * @return The supported version of the XML export job format.
	 */
	public String supportsExportJobVersion();
	
	/** 
	 * @return The supported version of the XML import job format.
	 */
	public String supportsImportJobVersion();
	
	/**
33
	 * Builds a XML export job document. This file can be sent to a nF server instance by the caller afterwards.
34
35
36
	 * 
	 * @param jobDescriptor A job descriptor which describes the export job with all its attributes according to
	 * a valid nF export job DTD.
37
	 * @return Returns a XML export job document.
38
	 */
39
	public File buildExportJobFile(E jobDescriptor);
40
41
	
	/**
42
	 * Builds a zipped import job file. This file can be sent to a nF server instance by the caller afterwards.
43
44
	 * 
	 * @param jobDescriptor A job descriptor which describes the import job with all its attributes according to
45
46
	 * the nF manual.
	 * @return Returns a zipped import job file.
47
	 */
48
	public File buildImportJobFile(I jobDescriptor);
49
50
	
}