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