Package org.apache.shindig.social.opensocial.model

Examples of org.apache.shindig.social.opensocial.model.Person


    String jsonPerson = "{person: {aboutMe: 'A person'}}";

    String path = "/people/john.doe/@self";
    RestHandler operation = registry.getRestHandler(path, "PUT");

    Person person = new PersonImpl();
    expect(converter.convertToObject(eq(jsonPerson), eq(Person.class)))
        .andReturn(person);

    expect(personService.updatePerson(eq(JOHN_DOE.iterator().next()),
        eq(person),
View Full Code Here


        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, fields, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, fields, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(nullValue()));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, null, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, null, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, fields, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, fields, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(nullValue()));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, null, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, null, token);
        assertThat(personFuture, is(not(nullValue())));
        Person person = personFuture.get();
        assertThat(person, is(not(nullValue())));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        if (!idSet.contains(person.get(Person.Field.ID.toString()))) {
          continue;
        }

        // Add group support later
        Person personObj = filterFields(person, fields, Person.class);
        Map<String, Object> appData = getPersonAppData(
            person.getString(Person.Field.ID.toString()), fields);
        personObj.setAppData(appData);

        result.add(personObj);
      }

      if (GroupId.Type.self == groupId.getType() && result.isEmpty()) {
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.opensocial.model.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.