public void save() { try { privateDataManager.setPrivateData(settingsData); } catch (XMPPException e) { Log.error("Error in User Settings.", e); } }
public Map<String, String> getSettings() { try { return settingsData.getMap(); } catch (Exception ex) { Log.error("Error in User Settings.", ex); } return null; }
private UserSettings() { privateDataManager = new PrivateDataManager(ChatsyManager.getConnection()); PrivateDataManager.addPrivateDataProvider( "personal_settings", "jive:user:settings", new SettingsDataProvider()); try { settingsData = (SettingsData) privateDataManager.getPrivateData("personal_settings", "jive:user:settings"); } catch (XMPPException e) { Log.error("Error in User Settings", e); } }
private void populateFeatureSet() { final ServiceDiscoveryManager disco = ServiceDiscoveryManager.getInstanceFor(ChatsyManager.getConnection()); final DiscoverItems items = ChatsyManager.getSessionManager().getDiscoveredItems(); Iterator<DiscoverItems.Item> iter = items.getItems(); while (iter.hasNext()) { DiscoverItems.Item item = iter.next(); String entity = item.getEntityID(); if (entity != null) { if (entity.startsWith("manager.")) { chatsyManagerInstalled = true; try { featureInfo = disco.discoverInfo(item.getEntityID()); } catch (XMPPException e) { Log.error("Error while retrieving feature list for ChatsyManager.", e); } } } } }