Exemple #1
0
 public PrivacyList(String username, String name, boolean isDefault, Element listElement) {
   this.userJID = XMPPServer.getInstance().createJID(username, null, true);
   this.name = name;
   this.isDefault = isDefault;
   // Set the new list items
   updateList(listElement);
 }
Exemple #2
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   userJID = new JID(ExternalizableUtil.getInstance().readSafeUTF(in));
   isDefault = ExternalizableUtil.getInstance().readBoolean(in);
   String xml = ExternalizableUtil.getInstance().readSafeUTF(in);
   try {
     Element element = localParser.get().read(new StringReader(xml)).getRootElement();
     updateList(element, false);
   } catch (Exception e) {
     Log.error("Error while parsing Privacy Property", e);
   }
 }
Exemple #3
0
 /**
  * Sets the new list items based on the specified Element. The Element must contain a list of item
  * elements.
  *
  * @param listElement the element containing a list of items.
  */
 public void updateList(Element listElement) {
   updateList(listElement, true);
 }