* @return the created PortletControl
*/
public PortletControl getControl(String name)
{
PortletControl pc = null;
PortletControlEntry entry = null;
if (name != null)
{
entry = (PortletControlEntry) Registry.getEntry(Registry.PORTLET_CONTROL, name);
}
Map params = null;
try
{
if (entry == null)
{
if (name != null)
{
pc = (PortletControl) Class.forName(name).newInstance();
params = new Hashtable();
}
}
else
{
pc = (PortletControl) Class.forName(entry.getClassname()).newInstance();
params = entry.getParameterMap();
}
}
catch (Exception e)
{
logger.error("Unable to instanciate control " + name + ", using default", e);