comparison artifacts/src/main/java/org/dive4elements/river/themes/Theme.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/themes/Theme.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
1 package org.dive4elements.river.themes;
2
3 import org.w3c.dom.Document;
4 import org.w3c.dom.Node;
5
6
7 /**
8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
9 */
10 public interface Theme {
11
12 /**
13 * Method to initialize the theme.
14 *
15 * @param config The configuration node.
16 */
17 void init(Node config);
18
19
20 /**
21 * Returns the name of the theme.
22 *
23 * @return the name of the theme.
24 */
25 String getName();
26
27
28 /**
29 * Returns the description of the theme.
30 *
31 * @return the description of the theme.
32 */
33 String getDescription();
34
35
36 String getFacet();
37
38 void setFacet(String facet);
39
40 int getIndex();
41
42 void setIndex(int index);
43
44
45 /**
46 * Adds a new attribute.
47 *
48 * @param name The name of the attribute.
49 * @param value The value of the attribute.
50 */
51 void addAttribute(String name, String value);
52
53
54 /**
55 * Returns the value of a specific attribute.
56 *
57 * @param name the name of the attribute.
58 *
59 * @return the value of the attribute <i>name</i>.
60 */
61 String getAttribute(String name);
62
63
64 /**
65 * Adds a new field to the theme.
66 *
67 * @param name The name of the field.
68 * @param field The field.
69 */
70 void addField(String name, ThemeField field);
71
72
73 /**
74 * Sets the value of an field.
75 *
76 * @param name The name of the field.
77 * @param value The new value of the field.
78 */
79 void setFieldValue(String name, Object value);
80
81
82 /**
83 * Returns the field specified by name.
84 *
85 * @param name The name of the desired field.
86 *
87 * @return an field.
88 */
89 ThemeField getField(String name);
90
91
92 /**
93 * Returns the typename of a field.
94 *
95 * @param name the name of the field.
96 *
97 * @return the typename of a field.
98 */
99 String getFieldType(String name);
100
101
102 /**
103 * Returns the value of a field.
104 *
105 * @param name The name of the field.
106 *
107 * @return the value of a field.
108 */
109 Object getFieldValue(String name);
110
111
112 /**
113 * Dumps the theme to XML.
114 *
115 * @return a document.
116 */
117 Document toXML();
118 }
119 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org