01: package org.jicengine;
02:
03: import org.xml.sax.SAXException;
04: import java.io.IOException;
05:
06: /**
07: * <p>
08: * Builder instances read JIC files and execute the construction instructions
09: * in the files. Builder instances are obtained from the <code>JICEngine</code>
10: * class.
11: * </p>
12: *
13: * <p>
14: * Currently, you don't have to operate with Builder instances in order to
15: * process JIC files, you can use the static build-methods of the class
16: * <code>org.jicengine.JICEngine</code>. This class is needed only if there would be a need
17: * to configure the Builder instances somehow before processing. At the moment,
18: * Builders can't be configured in any way.
19: * </p>
20: *
21: *
22: * <p>
23: * Copyright (C) 2004 Timo Laitinen
24: * </p>
25: *
26: * @author Timo Laitinen
27: * @created 2004-09-20
28: * @since JICE-0.10
29: * @see org.jicengine.JICEngine
30: */
31:
32: public interface Builder {
33:
34: /**
35: * <p>
36: * Processes a JIC file and returns the result.
37: * </p>
38: *
39: *
40: * @param instructions instructions on how to build the application.
41: * path of the JIC file + optionally some parameters.
42: * @return the constructed object. It will be the element instance of the
43: * root JIC element. Null is returned if the root JIC element is an action
44: * element.
45: *
46: * @throws IOException if there are problems reading the JIC file.
47: * @throws SAXException if the content in the JIC file is not well-formed XML.
48: * @throws JICException in case of any other exception. Exceptions may occur
49: * because the JIC instructions are not valid or because some method call
50: * resulted in application exception.
51: */
52: public Object build(Instructions instructions) throws IOException,
53: SAXException, JICException;
54:
55: }
|