01: /**
02: *
03: */package nl.hippo.cms.wizard.components;
04:
05: import java.util.Map;
06:
07: /**
08: * Component type that acts as a container of components.
09: * @author a.bogaart@hippo.nl
10: *
11: */
12: public interface ComponentContainer extends Component {
13:
14: /**
15: * Add new child component.
16: * @param component
17: */
18: void addComponent(Component component);
19:
20: /**
21: * Return map of contained components.
22: * @return
23: */
24: Map getComponents();
25:
26: /**
27: * Set the key of child component that is currently selected
28: * @param id map key of component
29: */
30: void setCurrent(String id);
31:
32: /**
33: * Return key of currently selected child component
34: * @return key
35: */
36: String getCurrent();
37:
38: /**
39: * Return child component that is currently selected
40: * @return
41: */
42: Component getCurrentComponent();
43:
44: /**
45: * Get a component from local map, by id.
46: * @param id key of component to look for
47: * @return component matched by key or null
48: */
49: Component getComponentById(String id);
50:
51: /**
52: * Find a component in local component tree
53: * @param id key of component to look for
54: * @return component matched by key or null
55: */
56: Component findComponentById(String id);
57:
58: }
|