PortletStateContext stateContext = persistenceManager.loadState(stateId);
return new LocalContext(stateContext.getState().getPortletId(), stateContext.getState().getProperties(), stateContext.getId());
}
catch (NoSuchStateException e)
{
throw new NoSuchPortletException(e, portletId);
}
catch (InvalidStateIdException e)
{
throw new InvalidPortletIdException(e, portletId);
}