1 package com.loribel.commons.business.abstraction;
2
3 import java.io.*;
4 import java.util.*;
5
6 import org.w3c.dom.*;
7
8 import com.loribel.commons.exception.*;
9
10 /***
11 * Factory to load meta-data from XML file for BusinessObject.
12 *
13 * @author Grégory Borelli
14 */
15 public interface GB_BOMetaDataFactory
16 {
17
18 /***
19 * Adds meta data of a BusinessObject to this factory.
20 */
21 void addBOMetaData(
22 GB_BOMetaData a_metaData);
23
24 void addDocument(
25 Document a_doc);
26 /***
27 * Add elements to factory from XML (or XSML) File.
28 * The XML File must contain nodes [object] and nodes [property].
29 *
30 * @param a_xmlFile File - the XML file that contains data Business Object
31 */
32 void addFile(
33 File a_xmlFile)
34 throws GB_LoadException;
35
36 /***
37 * Add elements to factory from Reader.
38 */
39 void addReader(
40 Reader a_reader)
41 throws GB_LoadException;
42
43 /***
44 * Add elements to factory from XML (or XSML) File.
45 * The XML File must contain nodes [object] and nodes [property].
46 *
47 * @param a_loader Class - the Class to load ressources
48 * @param a_xmlFilename String - the filename of the XML file that contains data Business Object
49 */
50 void addResource(
51 Class a_loader,
52 String a_xmlFilename)
53 throws GB_LoadException;
54
55 /***
56 * Clear the factory.
57 */
58 void clear();
59
60 /***
61 * Returns the BOMetaData of a businessObject.
62 */
63 GB_BOMetaData getBOMetaData(
64 String a_boName);
65
66 /***
67 * Returns the list of all BONames managed by this factory.
68 */
69 String[] getBONames();
70
71 /***
72 * Returns the property of a businessObject.
73 */
74 GB_BOProperty getProperty(
75 String a_boName,
76 String a_propertyName);
77
78 /***
79 * Returns a map of GB_BOProperty indexed by propertyName.
80 *
81 * @param a_boName String - The businessObject name.
82 *
83 * @return Map key[String] propertyName, value[GB_BOProperty].
84 */
85 Map getPropertyMap(
86 String a_boName);
87
88 /***
89 * Returns the names of properties.
90 */
91 String[] getPropertyNames(
92 String a_boName);
93
94 }