Package com.ibm.sbt.services.client.connections.common

Examples of com.ibm.sbt.services.client.connections.common.Person


        attribute(TYPE, APPLICATION_ATOM_XML),
        attribute(SOURCE, entity.getActivityUuid())) : null;
  }
   
  protected Element assignedTo() {
    Person assignedTo = entity.getAssignedTo();
    return (assignedTo != null) ? element(Namespace.SNX.getUrl(), ASSIGNEDTO,
        attribute(NAME, assignedTo.getName()),
        attribute(USERID, assignedTo.getUserid())) : null;
  }
View Full Code Here


  /**
   * Create a person from the specified node
   */
  public Person createPerson(Node node, FieldEntry fieldEntry) {
    return new Person(getService(), new XmlDataHandler(node, ConnectionsConstants.nameSpaceCtx, (XPathExpression)fieldEntry.getPath()));
  }
View Full Code Here

 
  public Recommendation(){}

  @Override
  public Person getAuthor(){
    return new Person(getService(), new XmlDataHandler((Node)this.getDataHandler().getData(),
        nameSpaceCtx, (XPathExpression)AtomXPath.author.getPath()));
  }
View Full Code Here

    String userid = TestEnvironment.getSecondaryUserUuid();
   
    PersonField personField = new PersonField();
    personField.setName("test_person");
    personField.setPosition(1000);
    personField.setPerson(new Person(name, email, userid));
   
    activity.addField(personField);
    activity.update();
   
    ActivitySerializer serializer = new ActivitySerializer(activity);
View Full Code Here

  /**
   *
   * @return
   */
  public Person getModifier() {
    return new Person(getService(), new XmlDataHandler((Node)this.getDataHandler().getData(),
          nameSpaceCtx, (XPathExpression)AtomXPath.modifier.getPath()));
  }
View Full Code Here

    public Person getAuthor() {
      if (fields.containsKey(AtomXPath.author.getName())) {
      return (Person)fields.get(AtomXPath.author.getName());
    }
    if (dataHandler != null){
        return new Person(getService(), new XmlDataHandler((Node)this.getDataHandler().getData(),
            ConnectionsConstants.nameSpaceCtx, (XPathExpression)AtomXPath.author.getPath()));
    }
    return null;
    }
View Full Code Here

    public Person getContributor() {
      if (fields.containsKey(AtomXPath.contributor.getName())) {
      return (Person)fields.get(AtomXPath.contributor.getName());
    }
    if (dataHandler != null){
        return new Person(getService(), new XmlDataHandler((Node)this.getDataHandler().getData(),
            ConnectionsConstants.nameSpaceCtx, (XPathExpression)AtomXPath.contributor.getPath()));
    }
    return null;
    }
View Full Code Here

    String userid = TestEnvironment.getSecondaryUserUuid();
   
    PersonField personField = new PersonField();
    personField.setName("test_person");
    personField.setPosition(1000);
    personField.setPerson(new Person(name, email, userid));

    srcActivityNode.addField(personField);

    activityService.createActivityNode(srcActivityNode);
    activityService.createActivityNode(dstActivityNode);

    srcActivityNode = activityService.getActivityNode(srcActivityNode.getActivityNodeUuid());
    Field f = srcActivityNode.getFields()[0];
    ActivityNode an = activityService.moveFieldToEntry(dstActivityNode.getActivityNodeUuid(), f.getFid());

    ActivityNode read = activityService.getActivityNode(dstActivityNode.getActivityNodeUuid());
    PersonField readField = (PersonField)read.getFields()[0];
    Person readPerson = readField.getPerson();
    assertEquals("test_person", readField.getName());
    assertEquals(name, readPerson.getName());
    assertEquals(userid, readPerson.getUserid());
  }
View Full Code Here

      Assert.assertNotNull(activity.getPermissions());
      Assert.assertNotNull(activity.getPosition());
      Assert.assertNotNull(activity.getCollectionTitle());
      Assert.assertNotNull(activity.getActivityNodeUrls());
      Assert.assertNotNull(activity.getMemberListUrl());
      Person author = activity.getAuthor();
      Assert.assertNotNull(author.getName());
      Assert.assertNotNull(author.getUserid());
      Assert.assertNotNull(author.getUserState());
      Person contributor = activity.getContributor();
      Assert.assertNotNull(contributor.getName());
      Assert.assertNotNull(contributor.getUserid());
      Assert.assertNotNull(contributor.getUserState());
    }
  }
View Full Code Here

   * Method to get the Author object for the File
   * @return Person
   */
  public Person getAuthor() {
    if(null == authorEntry) {
       authorEntry = new Person(getService(), new XmlDataHandler((Node)getDataHandler().getData(),
                nameSpaceCtx, (XPathExpression)AtomXPath.author.getPath()));
    }
    return authorEntry;
  }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.connections.common.Person

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.