byte[] state = updatedPortletContext.getState();
if (state != null)
{
if (consumerContext.stateId == null)
{
throw new NotYetImplemented();
}
//
ConsumerState consumerState = new ConsumerState(updatedPortletContext.getId(), 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;