comparison flys-artifacts/src/main/java/de/intevation/flys/themes/Theme.java @ 1190:f514894ec2fd

merged flys-artifacts/2.5
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:17 +0200
parents b36fd8f21e6a
children 6566c7868456
comparison
equal deleted inserted replaced
917:b48c36076e17 1190:f514894ec2fd
1 package de.intevation.flys.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 /**
37 * Adds a new attribute.
38 *
39 * @param name The name of the attribute.
40 * @param value The value of the attribute.
41 */
42 void addAttribute(String name, String value);
43
44
45 /**
46 * Returns the value of a specific attribute.
47 *
48 * @param name the name of the attribute.
49 *
50 * @return the value of the attribute <i>name</i>.
51 */
52 String getAttribute(String name);
53
54
55 /**
56 * Adds a new field to the theme.
57 *
58 * @param name The name of the field.
59 * @param field The field.
60 */
61 void addField(String name, ThemeField field);
62
63
64 /**
65 * Sets the value of an field.
66 *
67 * @param name The name of the field.
68 * @param value The new value of the field.
69 */
70 void setFieldValue(String name, Object value);
71
72
73 /**
74 * Returns the field specified by name.
75 *
76 * @param name The name of the desired field.
77 *
78 * @return an field.
79 */
80 ThemeField getField(String name);
81
82
83 /**
84 * Returns the typename of a field.
85 *
86 * @param name the name of the field.
87 *
88 * @return the typename of a field.
89 */
90 String getFieldType(String name);
91
92
93 /**
94 * Returns the value of a field.
95 *
96 * @param name The name of the field.
97 *
98 * @return the value of a field.
99 */
100 Object getFieldValue(String name);
101
102
103 /**
104 * Dumps the theme to XML.
105 *
106 * @return a document.
107 */
108 Document toXML();
109 }
110 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org