Package org.apache.shindig.social.core.model

Examples of org.apache.shindig.social.core.model.PersonImpl


     */
    @Override
    public Future<Person> getPerson(final UserId id, final Set<String> fields, final SecurityToken token)
    {
        log.trace("Entering getPerson");
        Person osPerson = new PersonImpl();

        String openSocialId = null;

        // Retrieve the user id.
        if (id.getUserId(token) != null)
View Full Code Here


     *            - eurekastreams person to be converted.
     * @return converted person object.
     */
    private Person convertToOSPerson(final PersonModelView inPerson)
    {
        Person osPerson = new PersonImpl();
        // Populate the OpenSocial person properties.
        osPerson.setName(new NameImpl(inPerson.getDisplayName()));
        osPerson.setDisplayName(inPerson.getDisplayName());
        osPerson.setId(inPerson.getOpenSocialId());
        osPerson.setAboutMe(inPerson.getDescription());
        osPerson.setProfileUrl(containerBaseUrl + "/#people/" + inPerson.getAccountId());

        List<ListField> emailList = new ArrayList<ListField>();
        emailList.add(new ListFieldImpl("primary", inPerson.getEmail()));
        osPerson.setEmails(emailList);

        AvatarUrlGenerator generator = new AvatarUrlGenerator(EntityType.PERSON);
        osPerson.setThumbnailUrl(containerBaseUrl + generator.getNormalAvatarUrl(inPerson.getAvatarId()));

        osPerson.setAccounts(Collections.singletonList((Account) new AccountImpl(accountTopLevelDomain, null, inPerson
                .getAccountId())));

        return osPerson;
    }
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.core.model.PersonImpl

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.