JobBuilder.java 1.71 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package eu.simstadt.nf;

/**
 * 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().
 * 
 * @param <T> JobBuilder takes implementations of JobDescriptor in order to populate the XML job.
 * @author Marcel Bruse
 */
public interface JobBuilder<T extends JobDescriptor> {

	/**
	 * @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();
	
	/**
	 * Builds a XML export job document as a string. This string representation of an export job can be written
	 * into a file or directly sent to a novaFACTORY server instance by the caller.
	 * 
	 * @param jobDescriptor A job descriptor which describes the export job with all its attributes according to
	 * a valid nF export job DTD.
	 * @return Returns a XML export job document in a string.
	 */
	public String buildExportJob(T jobDescriptor);
	
	/**
	 * Builds a XML import job document as a string. This string representation of an import job can be written
	 * into a file or directly sent to a nF server instance by the caller.
	 * 
	 * @param jobDescriptor A job descriptor which describes the import job with all its attributes according to
	 * a valid nF import job DTD.
	 * @return Returns a XML import job document in a string.
	 */
	public String buildImportJob(T jobDescriptor);
	
}