*
* @deprecated Use getPortletById()
*/
public ConcreteElement getPortlet(String name)
{
ConcreteElement result = null;
Portlet found = null;
Stack sets = new Stack();
sets.push(rundata.getProfile().getRootSet());
while ((sets.size() > 0) && (found==null))
{
PortletSet set = (PortletSet)sets.pop();
if (set.getName().equals(name))
{
found = set;
}
else
{
Enumeration en = set.getPortlets();
while((found==null) && en.hasMoreElements())
{
Portlet p = (Portlet)en.nextElement();
// unstack the controls to find the real PortletSets
Portlet real = p;
while (real instanceof PortletControl)
{
real = ((PortletControl)p).getPortlet();
}
if (real instanceof PortletSet)
{
// we'll explore this set afterwards
sets.push(real);
}
else if (p.getName().equals(name))
{
found = p;
}
}
}
}
if (found!=null)
{
result = found.getContent(rundata);
}
if (result==null)
{
//the customizer already streamed its content, return a stub
result = new ConcreteElement();
}
return result;
}