@SuppressWarnings("static-access")
public String setPreferenceForKey(String id_key, String key, String value) {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
if(ContextListener.usePreferenceInstanceQueues){
QueueManager.getInstance().queueSetPreferenceRequest(id_key, key, value);
}
else{