Package org.springframework.social.alfresco.api.entities

Examples of org.springframework.social.alfresco.api.entities.Person


    public void getCurrentUser()
        throws JsonParseException,
            JsonMappingException,
            IOException
    {
        Person currentUser = alfresco.getCurrentUser();

        assertEquals(person, currentUser.getId());
    }
View Full Code Here


    public void AdapterTest()
        throws JsonParseException,
            JsonMappingException,
            IOException
    {
        Person currentUser = alfresco.getCurrentUser();
        String displayName = connection.getDisplayName();
       
        assertEquals(currentUser.getFirstName() + " " + currentUser.getLastName(), displayName);
       
        UserProfile userProfile = connection.fetchUserProfile();
       
        assertEquals(currentUser.getEmail(), userProfile.getEmail());
        assertEquals(currentUser.getFirstName(), userProfile.getFirstName());
        assertEquals(currentUser.getLastName(), userProfile.getLastName());
        assertEquals(currentUser.getId(), userProfile.getUsername());
    }
View Full Code Here

    public UserProfile fetchUserProfile(Alfresco alfresco)
    {
        UserProfileBuilder userProfile = new UserProfileBuilder();
        try
        {
            Person currentUser = alfresco.getCurrentUser();

            userProfile.setEmail(currentUser.getEmail()).setFirstName(currentUser.getFirstName()).setLastName(currentUser.getLastName()).setUsername(currentUser.getId());
        }
        catch (JsonParseException e)
        {
            throw new AlfrescoException(e.getMessage(), e);
        }
View Full Code Here

     */
    public void setConnectionValues(Alfresco alfresco, ConnectionValues values)
    {
        try
        {
            Person currentUser = alfresco.getCurrentUser();
            values.setDisplayName(currentUser.getFirstName() + " " + currentUser.getLastName());
            values.setProviderUserId(currentUser.getId());
        }
        catch (JsonParseException e)
        {
            throw new AlfrescoException(e.getMessage(), e);
        }
View Full Code Here

TOP

Related Classes of org.springframework.social.alfresco.api.entities.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.