1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.pluto.portalImpl.om.page.impl;
21
22 import java.util.ArrayList;
23 import java.util.Collection;
24 import java.util.Iterator;
25
26 import javax.servlet.ServletConfig;
27
28 import org.apache.pluto.util.StringUtils;
29
30 public class PortalImpl implements java.io.Serializable {
31
32 private ArrayList fragments = new ArrayList();
33
34 public PortalImpl()
35 {
36 }
37
38
39
40 public Collection getFragments()
41 {
42 return fragments;
43 }
44
45 public org.apache.pluto.portalImpl.aggregation.RootFragment build(ServletConfig config)
46 throws Exception
47 {
48 org.apache.pluto.portalImpl.aggregation.RootFragment root =
49 new org.apache.pluto.portalImpl.aggregation.RootFragment(config);
50
51 Iterator iterator = fragments.iterator();
52
53 while (iterator.hasNext()) {
54 FragmentImpl fragmentimpl = (FragmentImpl)iterator.next();
55
56 org.apache.pluto.portalImpl.aggregation.Fragment _fragment =
57 fragmentimpl.build(config, root);
58 if (_fragment!=null) {
59 root.addChild(_fragment);
60 }
61 }
62
63 return root;
64 }
65
66 public String toString()
67 {
68 StringBuffer buffer = new StringBuffer(2000);
69 StringUtils.newLine(buffer,0);
70 buffer.append(getClass().toString()); buffer.append(":");
71 StringUtils.newLine(buffer,0);
72 buffer.append("{");
73
74 Iterator iterator = fragments.iterator();
75
76 while (iterator.hasNext()) {
77 buffer.append(((FragmentImpl)iterator.next()).toString(2));
78 }
79
80 StringUtils.newLine(buffer,0);
81 buffer.append("}");
82 return buffer.toString();
83 }
84
85 }