01: /*
02: * Created on 16-Sep-2006
03: */
04: package uk.org.ponder.rsf.components;
05:
06: /**
07: * A "two-faced" container that expresses a discontinuous "joint" between two
08: * segments of template. The container appears in its containing context as a
09: * BranchContainer with the details contained in the parent - however the IKAT
10: * branch resolution behaviour is "as if" it in fact had the ID given by its
11: * <code>jointID</code> field. This is the core container allowing modularity
12: * of RSF templates and producers ("components").
13: *
14: * @author Antranig Basman (amb26@ponder.org.uk)
15: */
16:
17: public class UIJointContainer extends UIBranchContainer {
18: public String jointID;
19:
20: /**
21: * Create a new UIJointContainer and add it to the component tree.
22: *
23: * @param parent The container to receive this newly created joint container.
24: * @param ID The "client ID" or "source ID" of this container, that is, the
25: * rsf:id under which the host template and producer refer to the
26: * component.
27: * @param jointID The "joint ID" or "target ID" of this container, that is,
28: * the rsf:id under which the implementing or component template
29: * refer to the component.
30: */
31: public UIJointContainer(UIContainer parent, String ID,
32: String jointID) {
33: this .ID = ID;
34: this .jointID = jointID;
35: parent.addComponent(this );
36: }
37:
38: public UIJointContainer(UIContainer parent, String ID,
39: String jointID, String localID) {
40: this .ID = ID;
41: this .jointID = jointID;
42: this .localID = localID;
43: parent.addComponent(this );
44: }
45:
46: public UIJointContainer(UIContainer parent, String ID) {
47: this(parent, ID, null);
48: }
49:
50: }
|