01: package org.vraptor.scope;
02:
03: /**
04: * A simple context, similar to a map.
05: *
06: * @author Guilherme Silveira
07: * @author Paulo Silveira
08: */
09: public interface Context {
10: /**
11: * Sets an attribute. Optional operation.
12: *
13: * @param name
14: * name
15: * @param value
16: * value
17: */
18: void setAttribute(String name, Object value);
19:
20: /**
21: * Retrieves an attribute
22: *
23: * @param name
24: * name
25: * @return value or null if not found
26: */
27: Object getAttribute(String name);
28:
29: /**
30: * Whether it contains an attribute
31: *
32: * @param name
33: * name
34: * @return true if contained
35: */
36: boolean hasAttribute(String name);
37:
38: /**
39: * Removes an attribute
40: *
41: * @param name
42: * name
43: * @return value
44: */
45: Object removeAttribute(String name);
46: }
|