Beispiel #1
0
 public void save() {
   try {
     privateDataManager.setPrivateData(settingsData);
   } catch (XMPPException e) {
     Log.error("Error in User Settings.", e);
   }
 }
Beispiel #2
0
 public Map<String, String> getSettings() {
   try {
     return settingsData.getMap();
   } catch (Exception ex) {
     Log.error("Error in User Settings.", ex);
   }
   return null;
 }
Beispiel #3
0
  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);
    }
  }
Beispiel #4
0
 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);
         }
       }
     }
   }
 }