01: package fr.aliacom.form.common;
02:
03: /**
04: * Implementations of this interface are responsible of parsing xml forms. They
05: * can be implemented with DOM and SAX parsers. They are called in a
06: * synchronized way, so implementations do not need to be thread safe. They
07: * should not be used directly by client code.
08: *
09: * This
10: *
11: * @author tom
12: *
13: * (C) 2001, 2003 Thomas Cataldo
14: */
15: public interface IFormParser {
16:
17: /**
18: * This method is called by the <code>FormManager</code> to create an
19: * instance of IForm
20: *
21: * @param form the parent form (not null for dialog forms)
22: * @param formName the name of the xml ressource to parse
23: * @param ctx the value that will be loaded later in the form
24: * @return IForm the form resulting from parsing.
25: */
26: public IForm parse(IForm form, String formName, FormContext ctx);
27:
28: /**
29: * This method is called by the <code>FormManager</code> after each call to
30: * any parse method.
31: * You can clean up any ressources used for parsing the form.
32: */
33: public void reset();
34:
35: /**
36: * Parses the content of an xml for as a child component of an existing
37: * formComponent. For example, the <code>addTab</code> method in
38: * <code>ITabbedPane</code> implementions often uses this method.
39: *
40: * @param form
41: * @param parent
42: * @param formName
43: * @param newVars
44: * @return IFormComponent
45: */
46: public IFormComponent parse(IForm form, IFormComponent parent,
47: String formName, FormContext newVars);
48:
49: }
|