PortletStateType stateType = statefulUpdatedPortletContext.getType();
//
if (consumerContext.stateId == null)
{
throw new NotYetImplemented();
}
//
ConsumerState consumerState = new ConsumerState<Serializable>(updatedPortletContext.getId(), stateType, state);
try
{
persistenceManager.updateState(consumerContext.stateId, consumerState);
}
catch (NoSuchStateException e)
{
// What to do ?
}
catch (InvalidStateIdException e)
{
// What to do ?
}
}
else
{
if (consumerContext.stateId != null)
{
throw new NotYetImplemented();
}
}
// As the point is to make it constant we can simply return it
return portletContext;