* @param grantAccessRequests whether to grant access requests created for the widget
* @return the widget
*/
public static IWidget addNewWidget(W3CWidget model, boolean grantAccessRequests) {
IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
IWidget widget = createWidget(persistenceManager, model);
createAuthor(persistenceManager, model, widget);
createStartFiles(persistenceManager, model,widget);
createNames(persistenceManager, model,widget);
createDescriptions(persistenceManager, model,widget);
createIcons(persistenceManager, model, widget);
createLicenses(persistenceManager, model,widget);
createPreferences(persistenceManager, model,widget);
createFeatures(persistenceManager, model,widget);
persistenceManager.save(widget);
createAccessRequests(persistenceManager, model, widget, grantAccessRequests);
_logger.info("'"+model.getLocalName("en") +"' - " + "Widget was successfully imported into the system as "+widget.getLocalName("en"));
return widget;
}