1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.apache.tiles.definition;
24
25 import java.util.Locale;
26 import java.util.Map;
27
28 import org.apache.tiles.Definition;
29
30 /***
31 *
32 * @version $Rev: 537196 $ $Date: 2007-05-11 16:07:35 +0200 (Fri, 11 May 2007) $
33 */
34 public class MockDefinitions implements Definitions {
35
36 /***
37 * Hokey way to verify that this was created.
38 */
39 private static int instanceCount = 0;
40
41 /***
42 * Hokey way to verify that this class was created.
43 *
44 * @return The number of created instances.
45 */
46 public static int getInstanceCount() {
47 return instanceCount;
48 }
49
50 /*** Creates a new instance of MockDefinitions. */
51 public MockDefinitions() {
52 instanceCount++;
53 }
54
55 /***
56 * Returns a Definition object that matches the given name.
57 *
58 * @param name The name of the Definition to return.
59 * @return the Definition matching the given name or null if none
60 * is found.
61 */
62 public Definition getDefinition(String name) {
63 return null;
64 }
65
66 /***
67 * Adds new locale-specific Definition objects to the internal
68 * collection and resolves inheritance attraibutes.
69 *
70 * @param defsMap The new definitions to add.
71 * @param locale The locale to add the definitions to.
72 */
73 public void addDefinitions(Map<String, Definition> defsMap,
74 java.util.Locale locale) {
75 }
76
77 /***
78 * Returns a Definition object that matches the given name and locale.
79 *
80 * @param name The name of the Definition to return.
81 * @param locale The locale to use to resolve the definition.
82 * @return the Definition matching the given name or null if none
83 * is found.
84 */
85 public Definition getDefinition(String name, java.util.Locale locale) {
86 return null;
87 }
88
89 /***
90 * Adds new Definition objects to the internal collection and
91 * resolves inheritance attraibutes.
92 *
93 * @param defsMap The new definitions to add.
94 */
95 public void addDefinitions(Map<String, Definition> defsMap) {
96 }
97
98 /*** {@inheritDoc} */
99 public void resolveInheritances() throws NoSuchDefinitionException {
100 }
101
102 /*** {@inheritDoc} */
103 public void resolveInheritances(Locale locale) throws NoSuchDefinitionException {
104 }
105
106 /***
107 * Clears definitions.
108 */
109 public void reset() {
110 }
111
112 /*** {@inheritDoc} */
113 public Map<String, Definition> getBaseDefinitions() {
114 return null;
115 }
116
117 }