All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.scribe.up.profile.linkedin.LinkedInProfile Maven / Gradle / Ivy

The newest version!
/*
  Copyright 2012 Jerome Leleu

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package org.scribe.up.profile.linkedin;

import java.util.Locale;

import org.scribe.up.profile.AttributesDefinition;
import org.scribe.up.profile.BaseOAuthProfile;
import org.scribe.up.profile.CommonProfile;
import org.scribe.up.profile.Gender;
import org.scribe.up.profile.OAuthAttributesDefinitions;

/**
 * This class is the user profile for LinkedIn with appropriate getters.
* It is returned by the {@link org.scribe.up.provider.impl.LinkedInProvider}. *

*

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Method :From the JSON profile response :
The attributes of the {@link org.scribe.up.profile.CommonProfile}
String getEmail()null
String getFirstName()the first_name attribute
String getFamilyName()the family_name attribute
String getDisplayName()the first_name attribute followed by a space and the family_name attribute
String getUsername()null
Gender getGender(){@link org.scribe.up.profile.Gender#UNSPECIFIED}
Locale getLocale()null
String getPictureUrl()null
String getProfileUrl()the url attribute
String getLocation()null
More specific attributes
String getHeadline()the headline attribute
* * @see org.scribe.up.provider.impl.LinkedInProvider * @author Jerome Leleu * @since 1.1.0 */ public class LinkedInProfile extends BaseOAuthProfile implements CommonProfile { private static final long serialVersionUID = 8075261836932071663L; @Override protected AttributesDefinition getAttributesDefinition() { return OAuthAttributesDefinitions.linkedinDefinition; } public String getEmail() { return null; } public String getFirstName() { return (String) get(LinkedInAttributesDefinition.FIRST_NAME); } public String getFamilyName() { return (String) get(LinkedInAttributesDefinition.LAST_NAME); } public String getDisplayName() { return getFirstName() + " " + getFamilyName(); } public String getUsername() { return null; } public Gender getGender() { return Gender.UNSPECIFIED; } public Locale getLocale() { return null; } public String getPictureUrl() { return null; } public String getProfileUrl() { return (String) get(LinkedInAttributesDefinition.URL); } public String getLocation() { return null; } public String getHeadline() { return (String) get(LinkedInAttributesDefinition.HEADLINE); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy