Examples of PersistentRelation


Examples of org.onesocialweb.openfire.model.relation.PersistentRelation

      }

      // Parse the relation
      RelationDomReader reader = new PersistentRelationDomReader();
      Element e_entry = i_entry.next();
      PersistentRelation relation = (PersistentRelation) reader.readElement(new ElementAdapter(e_entry));
      Log.debug("IQRelationUpdate received request: " + relation);
     
      // Setup the relation (this will also trigger the notification to the user)
      relationManager.updateRelation(sender.toBareJID(), relation);
View Full Code Here

Examples of org.onesocialweb.openfire.model.relation.PersistentRelation

      }

      // Parse the relation
      RelationDomReader reader = new PersistentRelationDomReader();
      Element e_entry = i_entry.next();
      PersistentRelation relation = (PersistentRelation) reader.readElement(new ElementAdapter(e_entry));
      Log.debug("IQRelationSetup received request: " + relation);
     
      // Setup the relation (this will also trigger the notification to the user)
      relationManager.setupRelation(sender.toBareJID(), relation);
View Full Code Here

Examples of org.onesocialweb.openfire.model.relation.PersistentRelation

      throw new InvalidRelationException("Could not find relationship with id " + relation.getId());
    }

    // We update the persisted relation
    em.getTransaction().begin();
    PersistentRelation storedRelation = relations.get(0);
    storedRelation.setStatus(relation.getStatus());
    em.getTransaction().commit();
    em.close();

    // We cleanup and notifiy the relation for the recipient
    storedRelation.setAclRules(null);
    storedRelation.setComment(null);
    notify(userJID, storedRelation);
  }
View Full Code Here

Examples of org.onesocialweb.openfire.model.relation.PersistentRelation

    if (relations.size() > 0) {
      throw new InvalidRelationException("This relation has already been requested");
    }

    // Save the relation
    PersistentRelation persistentRelation = (PersistentRelation) relation;
    persistentRelation.setOwner(localJID);

    em.getTransaction().begin();
    em.persist(persistentRelation);
    em.getTransaction().commit();
    em.close();
View Full Code Here

Examples of org.onesocialweb.openfire.model.relation.PersistentRelation

      throw new InvalidRelationException("Could not find matching relationship");
    }

    // We update the persisted relation
    em.getTransaction().begin();
    PersistentRelation previous = relations.get(0);
    previous.setStatus(relation.getStatus());
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.