protected void update(String resourceId, HttpServletRequest request, HttpServletResponse response)
throws ResourceNotFoundException, InvalidParametersException,
UnauthorizedAccessException {
IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
IWidget widget = persistenceManager.findWidgetByGuid(resourceId);
// attempt to get specific widget by id
if (widget == null) {
persistenceManager = PersistenceManagerFactory.getPersistenceManager();
widget = persistenceManager.findById(IWidget.class, resourceId);
}