1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.tiles.template;
23
24 import org.apache.tiles.Attribute;
25 import org.apache.tiles.TilesContainer;
26
27 /***
28 * Resolves an attribute, depending on the given parameters.
29 *
30 * @version $Rev: 765774 $ $Date: 2009-04-16 23:43:00 +0200 (gio, 16 apr 2009) $
31 * @since 2.2.0
32 */
33 public interface AttributeResolver {
34
35 /***
36 * Computes the attribute.
37 *
38 * @param container The Tiles container to use.
39 * @param attribute The attribute to return immediately, if not null.
40 * @param name The name of the attribute.
41 * @param role A comma-separated list of roles. If present, the attribute
42 * will be rendered only if the current user belongs to one of the roles.
43 * @param ignore If <code>true</code> if the computed attribute is null, this problem will be ignored.
44 * @param defaultValue The default value of the attribute. To use only if the attribute was not computed.
45 * @param defaultValueRole The default comma-separated list of roles. To use only if the attribute was not computed.
46 * @param defaultValueType The default type of the attribute. To use only if the attribute was not computed.
47 * @param requestItems The request objects.
48 * @return The computed attribute.
49 * @since 2.2.0
50 */
51 Attribute computeAttribute(TilesContainer container, Attribute attribute,
52 String name, String role, boolean ignore,
53 Object defaultValue, String defaultValueRole, String defaultValueType, Object... requestItems);
54 }