}
if ( ! found ) {
log("ERROR: Portlet "+portletName+" not found!");
throw new ServletException("Portlet "+portletName+" not found!");
}
FragmentImpl tckPortlet = new FragmentImpl();
tckPortlet.setType("portlet");
tckPortlet.setName("p"+windowNo++); // set portlet
// property
PropertyImpl property = new PropertyImpl();
property.setName("portlet");
property.setValue(portlet.getId().toString());
tckPortlet.getProperties().add(property);
fragments.add(tckPortlet);
}
FragmentImpl tckCol = new FragmentImpl();
tckCol.setType("column");
tckCol.setName("col");
tckCol.setFragments(fragments);
ArrayList colFragments = new ArrayList();
colFragments.add(tckCol);
FragmentImpl tckRow = new FragmentImpl();
tckRow.setType("row");
tckRow.setName("row");
tckRow.setFragments(colFragments);
ArrayList rowFragments = new ArrayList();
rowFragments.add(tckRow);
//page
FragmentImpl tckPage = new FragmentImpl();
tckPage.setType("page");
tckPage.setName(pageName);
// navigation
NavigationImpl tckNav = new NavigationImpl();
tckNav.setTitle(pageName);
tckNav.setDescription("dynamically generated TCK test page");
tckPage.setNavigation(tckNav);
tckPage.setFragments(rowFragments);
try {
org.apache.pluto.portalImpl.aggregation.Fragment rootFragment =
tckPage.build(getServletConfig(), root);
root.addChild(rootFragment);
} catch (Exception e) {
log("Exception in building new TCK page occured! "+e.getMessage());
throw new ServletException("Exception in building new TCK page occured!", e);
}