Package org.onesocialweb.model.relation

Examples of org.onesocialweb.model.relation.Relation


      else if (itemsElement.attribute("node").getValue().equals(
          RelationManager.NODE)) {
        final RelationDomReader reader = new PersistentRelationDomReader();
        for (Element itemElement : (List<Element>) itemsElement
            .elements("item")) {
          Relation relation = reader.readElement(new ElementAdapter(
              itemElement.element("relation")));
          try {
            RelationManager.getInstance().handleMessage(
                fromJID.toBareJID(), toJID.toBareJID(),
                relation);
View Full Code Here


    add.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {

        // create the relation
        final Relation relation = OswServiceFactory.getService()
            .getRelationFactory().relation();

        relation.setFrom("alardw@vodafonernd.com");
        relation.setTo(jid);
        relation.setNature(vArray[dropdown.getSelectedIndex()]);
        relation.setStatus(REQUEST);

        OswService service = OswServiceFactory.getService();
        service.setupRelation(relation, new RequestCallback<Object>() {

          @Override
View Full Code Here

        Iterator<Relation> iterator = result.iterator();
        while (iterator.hasNext()) {

          // get the info from the relation
          Relation relation = iterator.next();
          String nature = new String();
          String status = new String();
          String from = new String();
          String to = new String();
          String id = new String();

          // check if values are not empty
          if (relation.getId() != null
              && relation.getId().length() > 0) {
            id = relation.getId();
          }
          if (relation.getNature() != null
              && relation.getNature().length() > 0) {
            nature = relation.getNature();
          }
          if (relation.getStatus() != null
              && relation.getStatus().length() > 0) {
            status = relation.getStatus();
          }
          if (relation.getFrom() != null
              && relation.getFrom().length() > 0) {
            from = relation.getFrom();
          }
          if (relation.getTo() != null
              && relation.getTo().length() > 0) {
            to = relation.getTo();
          }

          if (from != null && nature != null && status != null
              && to != null) {
            addRelationshipWidget(id, nature, status, from, to);
View Full Code Here

TOP

Related Classes of org.onesocialweb.model.relation.Relation

Copyright © 2018 www.massapicom. 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.