throw new PortletInvokerException(e);
}
}
else
{
throw new InvalidPortletIdException("", portletId);
}
}
else if (portletId.startsWith(PRODUCER_CLONE_ID_PREFIX))
{
try
{
String stateId = portletId.substring(PRODUCER_CLONE_ID_PREFIX.length());
PortletStateContext stateContext = persistenceManager.loadState(stateId);
PortletState state = stateContext.getState();
Portlet delegate = super.getPortlet(PortletContext.createPortletContext(state.getPortletId()));
return new ProducerPortlet(portletContext, delegate);
}
catch (NoSuchStateException e)
{
throw new NoSuchPortletException(e, portletId);
}
catch (InvalidStateIdException e)
{
throw new InvalidPortletIdException(e, portletId);
}
}
else
{
return super.getPortlet(portletContext);