false,
context.getStateControllerContext(),
request.getPageNavigationalState());
//
Renderer renderer = rendererFactory.getRenderer(response);
//
renderer.render(new TCKRendererContext(context, tckPageNavigationalState));
}
else
{
String[] tckParamers = req.getParameterValues(TCK_PORTLET_NAME);
Collection<Portlet> portlets = context.getPortlets();
Set<String> involvedPortlets = new LinkedHashSet<String>();
for (String tckParamer : tckParamers)
{
String[] parts = tckParamer.split("/");
String portletAppName = parts[0];
String portletName = parts[1];
//
for (Portlet portlet : portlets)
{
if (portlet.getInfo().getApplicationName().equals(portletAppName)
&& portlet.getInfo().getName().equals(portletName))
{
involvedPortlets.add(portlet.getContext().getId());
}
}
}
if (tckParamers.length > 0 && involvedPortlets.isEmpty())
{
throw new IllegalStateException("Portlets requested by TCK were not found");
}
TCKPortletPageNavigationalState tckPageNavigationalState = new TCKPortletPageNavigationalState(context.getStateControllerContext().createPortletPageNavigationalState(false), involvedPortlets);
//
PageRenderer renderer = new PageRenderer(new ResponseProperties(), tckPageNavigationalState);
//
renderer.render(new TCKRendererContext(context, tckPageNavigationalState));
}
}