public abstract class

BaseLinkedInApiClient

extends Object
implements LinkedInApiClient
java.lang.Object
   ↳ com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient
Known Direct Subclasses

Summary

Constants
String GZIP_ENCODING Field description
Fields
protected static final Set<ProfileField> CONNECTION_FIELDS Field description
protected final Logger LOG The static logger.
private final SchemaElementFactory<?> OBJECT_FACTORY Field description
private static final Charset UTF_8_CHAR_SET Field description
private LinkedInAccessToken accessToken Field description
private LinkedInApiConsumer apiConsumer Field description
private Map<String, String> requestHeaders Field description
Protected Constructors
BaseLinkedInApiClient(String consumerKey, String consumerSecret)
Constructs ...
Public Methods
void addLocale(Locale locale)
void addRequestHeader(String headerName, String headerValue)
Adds the request header.
void deleteCurrentStatus()
Delete current status.
LinkedInAccessToken getAccessToken()
Method description
LinkedInApiConsumer getApiConsumer()
Method description
Connections getConnectionsById(String id, int start, int count, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by id.
Connections getConnectionsById(String id, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by id.
Connections getConnectionsById(String id)
Gets the connections by id.
Connections getConnectionsById(String id, Set<ProfileField> profileFields, int start, int count)
Gets the connections by id.
Connections getConnectionsById(String id, int start, int count)
Gets the connections by id.
Connections getConnectionsById(String id, Set<ProfileField> profileFields)
Gets the connections by id.
Connections getConnectionsById(String id, Set<ProfileField> profileFields, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by id.
Connections getConnectionsById(String id, Set<ProfileField> profileFields, int start, int count, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by id.
Connections getConnectionsByUrl(String url, Set<ProfileField> profileFields, int start, int count)
Gets the connections by url.
Connections getConnectionsByUrl(String url, int start, int count)
Gets the connections by url.
Connections getConnectionsByUrl(String url, Set<ProfileField> profileFields, int start, int count, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by url.
Connections getConnectionsByUrl(String url)
Gets the connections by url.
Connections getConnectionsByUrl(String url, Set<ProfileField> profileFields)
Gets the connections by url.
Connections getConnectionsByUrl(String url, Set<ProfileField> profileFields, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by url.
Connections getConnectionsByUrl(String url, int start, int count, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by url.
Connections getConnectionsByUrl(String url, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections by url.
Connections getConnectionsForCurrentUser(int start, int count)
Gets the connections for current user.
Connections getConnectionsForCurrentUser(Set<ProfileField> profileFields, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections for current user.
Connections getConnectionsForCurrentUser(Set<ProfileField> profileFields, int start, int count)
Gets the connections for current user.
Connections getConnectionsForCurrentUser()
Gets the connections for current user.
Connections getConnectionsForCurrentUser(Set<ProfileField> profileFields)
Gets the connections for current user.
Connections getConnectionsForCurrentUser(int start, int count, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections for current user.
Connections getConnectionsForCurrentUser(Date modificationDate, ConnectionModificationType modificationType)
Gets the connections for current user.
Connections getConnectionsForCurrentUser(Set<ProfileField> profileFields, int start, int count, Date modificationDate, ConnectionModificationType modificationType)
Gets the connections for current user.
UpdateComments getNetworkUpdateComments(String networkUpdateId)
Gets the network update comments.
Likes getNetworkUpdateLikes(String networkUpdateId)
Gets the network update likes.
Network getNetworkUpdates(int start, int count)
Gets the network updates.
Network getNetworkUpdates(Date startDate, Date endDate)
Gets the network updates.
Network getNetworkUpdates(Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate)
Gets the network updates.
Network getNetworkUpdates(Set<NetworkUpdateType> updateTypes)
Gets the network updates.
Network getNetworkUpdates()
Gets the network updates.
Network getNetworkUpdates(Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate, boolean showHiddenMembers)
Gets the network updates.
Network getNetworkUpdates(Set<NetworkUpdateType> updateTypes, int start, int count)
Gets the network updates.
Network getNetworkUpdates(Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate)
Gets the network updates.
Person getProfileByApiRequest(ApiStandardProfileRequest apiRequest)
Gets the profile by API request.
Person getProfileById(String id, Set<ProfileField> profileFields)
Gets the profile by id.
Person getProfileById(String id, ProfileType profileType, Set<ProfileField> profileFields)
Person getProfileById(String id)
Gets the profile by id.
Person getProfileById(String id, ProfileType profileType)
Person getProfileByUrl(String url, ProfileType profileType)
Gets the profile by url.
Person getProfileByUrl(String url, ProfileType profileType, Set<ProfileField> profileFields)
Gets the profile by url.
Person getProfileForCurrentUser()
Gets the profile for current user.
Person getProfileForCurrentUser(Set<ProfileField> profileFields)
Gets the profile for current user.
Map<String, String> getRequestHeaders()
Gets the request headers.
Network getUserUpdates(Set<NetworkUpdateType> updateTypes)
Gets the network updates.
Network getUserUpdates(Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate)
Gets the network updates.
Network getUserUpdates(int start, int count)
Gets the network updates.
Network getUserUpdates()
Gets the network updates.
Network getUserUpdates(String id, Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate)
Gets the network updates.
Network getUserUpdates(String id, Date startDate, Date endDate)
Gets the network updates.
Network getUserUpdates(Date startDate, Date endDate)
Gets the network updates.
Network getUserUpdates(Set<NetworkUpdateType> updateTypes, int start, int count)
Gets the network updates.
Network getUserUpdates(String id, int start, int count)
Gets the network updates.
Network getUserUpdates(String id, Set<NetworkUpdateType> updateTypes)
Gets the network updates.
Network getUserUpdates(String id, Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate)
Gets the network updates.
Network getUserUpdates(String id)
Gets the network updates.
Network getUserUpdates(String id, Set<NetworkUpdateType> updateTypes, int start, int count)
Gets the network updates.
Network getUserUpdates(Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate)
Gets the network updates.
void likePost(String networkUpdateId)
Like post.
void postComment(String networkUpdateId, String commentText)
Post comment.
void postNetworkUpdate(String updateText)
Post network update.
void postShare(String commentText, String title, String url, String imageUrl, VisibilityType visibility)
Post share.
void postShare(String commentText, String title, String url, String imageUrl, VisibilityType visibilityType, boolean postToTwitter)
Post share.
void reShare(String shareId, String commentText, VisibilityType visibilityType)
Re-share.
void removeRequestHeader(String headerName)
Removes the request header.
People searchPeople(Map<SearchParameter, String> searchParameters, SearchSortOrder sortOrder)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, int start, int count, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople()
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count, List<Parameter<FacetType, String>> facets)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count, SearchSortOrder sortOrder)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, int start, int count, SearchSortOrder sortOrder)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count, SearchSortOrder sortOrder)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, List<Parameter<FacetType, String>> facets)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, int start, int count)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, int start, int count, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)
Search people.
People searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, SearchSortOrder sortOrder)
Search people.
PeopleSearch searchPeople(Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, SearchSortOrder sortOrder)
Search people.
void sendInviteByEmail(String email, String firstName, String lastName, String subject, String message)
Send invite.
void sendInviteById(String recepientId, String subject, String message, String authHeader)
Send invite.
void sendInviteToPerson(Person recepient, String subject, String message)
Send invite.
void sendMessage(List<String> recepientIds, String subject, String message)
Send message.
void setAccessToken(LinkedInAccessToken accessToken)
Method description
void setApiConsumer(LinkedInApiConsumer apiConsumer)
Method description
void setRequestHeaders(Map<String, String> requestHeaders)
Sets the request headers.
void unlikePost(String networkUpdateId)
Unlike post.
void updateCurrentStatus(String statusText, boolean postToTwitter)
void updateCurrentStatus(String statusText)
Protected Methods
void assertNotNull(String name, Object value)
void assertNotNullOrEmpty(String name, Collection<?> value)
void assertNotNullOrEmpty(String name, String value)
void assertPositiveNumber(String name, int value)
InputStream callApiMethod(String apiUrl)
InputStream callApiMethod(String apiUrl, String xmlContent, String contentType, HttpMethod method, int expected)
InputStream callApiMethod(String apiUrl, List<HttpHeader> httpHeaders)
InputStream callApiMethod(String apiUrl, int expected, List<HttpHeader> httpHeaders)
void closeConnection(HttpURLConnection connection)
Method description
void closeStream(InputStream is)
Method description
static String convertStreamToString(InputStream is)
Stolen liberally from http://www.kodejava.org/examples/266.html
LinkedInApiClientException createLinkedInApiClientException(Error error)
Method description
abstract LinkedInApiUrls.LinkedInApiUrlBuilder createLinkedInApiUrlBuilder(String urlFormat)
Method description
abstract SchemaElementFactory<?> createObjectFactory()
Method description
InputStream getWrappedInputStream(InputStream is, boolean gzip)
Method description@return
boolean isNullOrEmpty(String s)
Get property as long.
abstract String marshallObject(Object element)
Method description
<T> T readResponse(Class<T> clazz, InputStream is)
Method description
abstract <T> T unmarshallObject(Class<T> clazz, InputStream xmlContent)
Method description
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.code.linkedinapi.client.LinkedInApiClient
From interface com.google.code.linkedinapi.client.LinkedInAuthenticationClient
From interface com.google.code.linkedinapi.client.LinkedInCommunicationClient

Constants

private static final String GZIP_ENCODING

Field description

Constant Value: "gzip"

Fields

protected static final Set<ProfileField> CONNECTION_FIELDS

Field description

protected final Logger LOG

The static logger.

private final SchemaElementFactory<?> OBJECT_FACTORY

Field description

private static final Charset UTF_8_CHAR_SET

Field description

private LinkedInAccessToken accessToken

Field description

private LinkedInApiConsumer apiConsumer

Field description

private Map<String, String> requestHeaders

Field description

Protected Constructors

protected BaseLinkedInApiClient (String consumerKey, String consumerSecret)

Constructs ...

Parameters
consumerKey
consumerSecret

Public Methods

public void addLocale (Locale locale)

Parameters
locale

public void addRequestHeader (String headerName, String headerValue)

Adds the request header.

Parameters
headerName The header name
headerValue The header value

public void deleteCurrentStatus ()

Delete current status. For details see http://developer.linkedin.com/docs/DOC-1007

public LinkedInAccessToken getAccessToken ()

Method description

public LinkedInApiConsumer getApiConsumer ()

Method description

public Connections getConnectionsById (String id, int start, int count, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
start The start
count The count
modificationDate
modificationType
Returns
  • the connections by id

public Connections getConnectionsById (String id, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
modificationDate
modificationType
Returns
  • the connections by id

public Connections getConnectionsById (String id)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
Returns
  • the connections by id

public Connections getConnectionsById (String id, Set<ProfileField> profileFields, int start, int count)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
profileFields The profile fields
start The start
count The count
Returns
  • the connections by id

public Connections getConnectionsById (String id, int start, int count)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
start The start
count The count
Returns
  • the connections by id

public Connections getConnectionsById (String id, Set<ProfileField> profileFields)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
profileFields The profile fields
Returns
  • the connections by id

public Connections getConnectionsById (String id, Set<ProfileField> profileFields, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
profileFields The profile fields
modificationDate
modificationType
Returns
  • the connections by id

public Connections getConnectionsById (String id, Set<ProfileField> profileFields, int start, int count, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
profileFields The profile fields
start The start
count The count
modificationDate
modificationType
Returns
  • the connections by id

public Connections getConnectionsByUrl (String url, Set<ProfileField> profileFields, int start, int count)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
profileFields The profile fields
start The start
count The count
Returns
  • the connections by url

public Connections getConnectionsByUrl (String url, int start, int count)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
start The start
count The count
Returns
  • the connections by url

public Connections getConnectionsByUrl (String url, Set<ProfileField> profileFields, int start, int count, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
profileFields The profile fields
start The start
count The count
modificationDate
modificationType
Returns
  • the connections by url

public Connections getConnectionsByUrl (String url)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
Returns
  • the connections by url

public Connections getConnectionsByUrl (String url, Set<ProfileField> profileFields)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
profileFields The profile fields
Returns
  • the connections by url

public Connections getConnectionsByUrl (String url, Set<ProfileField> profileFields, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
profileFields The profile fields
modificationDate
modificationType
Returns
  • the connections by url

public Connections getConnectionsByUrl (String url, int start, int count, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
start The start
count The count
modificationDate
modificationType
Returns
  • the connections by url

public Connections getConnectionsByUrl (String url, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
modificationDate
modificationType
Returns
  • the connections by url

public Connections getConnectionsForCurrentUser (int start, int count)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
start The start
count The count
Returns
  • the connections for current user

public Connections getConnectionsForCurrentUser (Set<ProfileField> profileFields, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
profileFields The profile fields
modificationDate
modificationType
Returns
  • the connections for current user

public Connections getConnectionsForCurrentUser (Set<ProfileField> profileFields, int start, int count)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
profileFields The profile fields
start The start
count The count
Returns
  • the connections for current user

public Connections getConnectionsForCurrentUser ()

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Returns
  • the connections for current user

public Connections getConnectionsForCurrentUser (Set<ProfileField> profileFields)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
profileFields The profile fields
Returns
  • the connections for current user

public Connections getConnectionsForCurrentUser (int start, int count, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
start The start
count The count
modificationDate
modificationType
Returns
  • the connections for current user

public Connections getConnectionsForCurrentUser (Date modificationDate, ConnectionModificationType modificationType)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
modificationDate
modificationType
Returns
  • the connections for current user

public Connections getConnectionsForCurrentUser (Set<ProfileField> profileFields, int start, int count, Date modificationDate, ConnectionModificationType modificationType)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
profileFields The profile fields
start The start
count The count
modificationDate
modificationType
Returns
  • the connections for current user

public UpdateComments getNetworkUpdateComments (String networkUpdateId)

Gets the network update comments. For details see http://developer.linkedin.com/docs/DOC-1043

Parameters
networkUpdateId The network update id
Returns
  • the network update comments

public Likes getNetworkUpdateLikes (String networkUpdateId)

Gets the network update likes. For details see http://developer.linkedin.com/docs/DOC-1043

Parameters
networkUpdateId The network update id
Returns
  • the network update likes

public Network getNetworkUpdates (int start, int count)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
start The start
count The count
Returns
  • the network updates

public Network getNetworkUpdates (Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
startDate The start date
endDate The end date
Returns
  • the network updates

public Network getNetworkUpdates (Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
startDate The start date
endDate The end date
Returns
  • the network updates

public Network getNetworkUpdates (Set<NetworkUpdateType> updateTypes)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
Returns
  • the network updates

public Network getNetworkUpdates ()

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Returns
  • the network updates

public Network getNetworkUpdates (Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate, boolean showHiddenMembers)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
start The start
count The count
startDate The start date
endDate The end date
showHiddenMembers
Returns
  • the network updates

public Network getNetworkUpdates (Set<NetworkUpdateType> updateTypes, int start, int count)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
start The start
count The count
Returns
  • the network updates

public Network getNetworkUpdates (Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
start The start
count The count
startDate The start date
endDate The end date
Returns
  • the network updates

public Person getProfileByApiRequest (ApiStandardProfileRequest apiRequest)

Gets the profile by API request. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
apiRequest The api request
Returns
  • the profile by api request

public Person getProfileById (String id, Set<ProfileField> profileFields)

Gets the profile by id. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
id The id
profileFields The profile fields
Returns
  • the profile by id

public Person getProfileById (String id, ProfileType profileType, Set<ProfileField> profileFields)

Parameters
id
profileType
profileFields

public Person getProfileById (String id)

Gets the profile by id. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
id The id
Returns
  • the profile by id

public Person getProfileById (String id, ProfileType profileType)

Parameters
id
profileType

public Person getProfileByUrl (String url, ProfileType profileType)

Gets the profile by url. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
url The url
profileType The profile type
Returns
  • the profile by url

public Person getProfileByUrl (String url, ProfileType profileType, Set<ProfileField> profileFields)

Gets the profile by url. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
url The url
profileType The profile type
profileFields The profile fields
Returns
  • the profile by url

public Person getProfileForCurrentUser ()

Gets the profile for current user. For details see http://developer.linkedin.com/docs/DOC-1002

Returns
  • the profile for current user

public Person getProfileForCurrentUser (Set<ProfileField> profileFields)

Gets the profile for current user. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
profileFields The profile fields
Returns
  • the profile for current user

public Map<String, String> getRequestHeaders ()

Gets the request headers.

Returns
  • the request headers

public Network getUserUpdates (Set<NetworkUpdateType> updateTypes)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
Returns
  • the network updates

public Network getUserUpdates (Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
start The start
count The count
startDate The start date
endDate The end date
Returns
  • the network updates

public Network getUserUpdates (int start, int count)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
start The start
count The count
Returns
  • the network updates

public Network getUserUpdates ()

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Returns
  • the network updates

public Network getUserUpdates (String id, Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
id
updateTypes The update types
start The start
count The count
startDate The start date
endDate The end date
Returns
  • the network updates

public Network getUserUpdates (String id, Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
id
startDate The start date
endDate The end date
Returns
  • the network updates

public Network getUserUpdates (Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
startDate The start date
endDate The end date
Returns
  • the network updates

public Network getUserUpdates (Set<NetworkUpdateType> updateTypes, int start, int count)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
start The start
count The count
Returns
  • the network updates

public Network getUserUpdates (String id, int start, int count)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
id
start The start
count The count
Returns
  • the network updates

public Network getUserUpdates (String id, Set<NetworkUpdateType> updateTypes)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
id
updateTypes The update types
Returns
  • the network updates

public Network getUserUpdates (String id, Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
id
updateTypes The update types
startDate The start date
endDate The end date
Returns
  • the network updates

public Network getUserUpdates (String id)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
id
Returns
  • the network updates

public Network getUserUpdates (String id, Set<NetworkUpdateType> updateTypes, int start, int count)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
id
updateTypes The update types
start The start
count The count
Returns
  • the network updates

public Network getUserUpdates (Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
startDate The start date
endDate The end date
Returns
  • the network updates

public void likePost (String networkUpdateId)

Parameters
networkUpdateId The network update id

public void postComment (String networkUpdateId, String commentText)

Post comment. For details see http://developer.linkedin.com/docs/DOC-1043

Parameters
networkUpdateId The network update id
commentText The comment text

public void postNetworkUpdate (String updateText)

Post network update. For details see http://developer.linkedin.com/docs/DOC-1009

Parameters
updateText The update text

public void postShare (String commentText, String title, String url, String imageUrl, VisibilityType visibility)

Parameters
commentText The comment text
title The title
url The url
imageUrl The image url
visibility The visibility

public void postShare (String commentText, String title, String url, String imageUrl, VisibilityType visibilityType, boolean postToTwitter)

Parameters
commentText The comment text
title The title
url The url
imageUrl The image url
visibilityType The visibility
postToTwitter

public void reShare (String shareId, String commentText, VisibilityType visibilityType)

Parameters
shareId The share id
commentText
visibilityType The visibility

public void removeRequestHeader (String headerName)

Removes the request header.

Parameters
headerName The header name

public People searchPeople (Map<SearchParameter, String> searchParameters, SearchSortOrder sortOrder)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
sortOrder The sort order
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, int start, int count, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
start The start
count The count
facets
Returns
  • the people

public People searchPeople ()

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
sortOrder The sort order
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
start The start
count The count
facets
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count, SearchSortOrder sortOrder)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
start The start
count The count
sortOrder The sort order
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
sortOrder The sort order
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
start The start
count The count
sortOrder The sort order
facets
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
start The start
count The count
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, int start, int count, SearchSortOrder sortOrder)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
start The start
count The count
sortOrder The sort order
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count, SearchSortOrder sortOrder)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
start The start
count The count
sortOrder The sort order
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
facets
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
start The start
count The count
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, int start, int count)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
start The start
count The count
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, int start, int count)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
start The start
count The count
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
sortOrder The sort order
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, int start, int count, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
start The start
count The count
sortOrder The sort order
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, int start, int count, SearchSortOrder sortOrder, List<Parameter<FacetType, String>> facets)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
start The start
count The count
sortOrder The sort order
facets
Returns
  • the people

public People searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, SearchSortOrder sortOrder)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
sortOrder The sort order
Returns
  • the people

public PeopleSearch searchPeople (Map<SearchParameter, String> searchParameters, Set<ProfileField> profileFields, Set<FacetField> facetFields, SearchSortOrder sortOrder)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
profileFields
facetFields
sortOrder The sort order
Returns
  • the people

public void sendInviteByEmail (String email, String firstName, String lastName, String subject, String message)

Send invite. For details see http://developer.linkedin.com/docs/DOC-1012

Parameters
email The email
firstName The first name
lastName The last name
subject The subject
message The message

public void sendInviteById (String recepientId, String subject, String message, String authHeader)

Send invite. For details see http://developer.linkedin.com/docs/DOC-1012

To call this method one needs an auth header parameter. This can be obtained by getting getHeaders() from getApiStandardProfileRequest() and then getting the value of header with name AUTH_HEADER_NAME.

Parameters
recepientId The recepient id
subject The subject
message The message
authHeader The auth header

public void sendInviteToPerson (Person recepient, String subject, String message)

Send invite. For details see http://developer.linkedin.com/docs/DOC-1012

To call this method one needs an auth header parameter. This can be obtained by getting getHeaders() from getApiStandardProfileRequest() and then getting the value of header with name AUTH_HEADER_NAME.

Parameters
recepient The recepient
subject The subject
message The message

public void sendMessage (List<String> recepientIds, String subject, String message)

Send message. For details see http://developer.linkedin.com/docs/DOC-1044

Parameters
recepientIds The recepient ids
subject The subject
message The message

public void setAccessToken (LinkedInAccessToken accessToken)

Method description

Parameters
accessToken

public void setApiConsumer (LinkedInApiConsumer apiConsumer)

Method description

Parameters
apiConsumer

public void setRequestHeaders (Map<String, String> requestHeaders)

Sets the request headers.

Parameters
requestHeaders The request headers

public void unlikePost (String networkUpdateId)

Unlike post. For details see http://developer.linkedin.com/docs/DOC-1043

Parameters
networkUpdateId The network update id

public void updateCurrentStatus (String statusText, boolean postToTwitter)

This method is deprecated.
Use postShare(String, String, String, String, VisibilityType, boolean)

Update current status. For details see http://developer.linkedin.com/docs/DOC-1007

Parameters
statusText The status
postToTwitter

public void updateCurrentStatus (String statusText)

This method is deprecated.
Use postShare(String, String, String, String, VisibilityType)

Update current status. For details see http://developer.linkedin.com/docs/DOC-1007

Parameters
statusText The status

Protected Methods

protected void assertNotNull (String name, Object value)

Parameters
name
value

protected void assertNotNullOrEmpty (String name, Collection<?> value)

Parameters
name
value

protected void assertNotNullOrEmpty (String name, String value)

Parameters
name
value

protected void assertPositiveNumber (String name, int value)

Parameters
name
value

protected InputStream callApiMethod (String apiUrl)

Parameters
apiUrl

protected InputStream callApiMethod (String apiUrl, String xmlContent, String contentType, HttpMethod method, int expected)

Parameters
apiUrl
xmlContent
contentType
method
expected

protected InputStream callApiMethod (String apiUrl, List<HttpHeader> httpHeaders)

Parameters
apiUrl
httpHeaders

protected InputStream callApiMethod (String apiUrl, int expected, List<HttpHeader> httpHeaders)

Parameters
apiUrl
expected
httpHeaders

protected void closeConnection (HttpURLConnection connection)

Method description

Parameters
connection

protected void closeStream (InputStream is)

Method description

Parameters
is

protected static String convertStreamToString (InputStream is)

Stolen liberally from http://www.kodejava.org/examples/266.html

Parameters
is

protected LinkedInApiClientException createLinkedInApiClientException (Error error)

Method description

Parameters
error

protected abstract LinkedInApiUrls.LinkedInApiUrlBuilder createLinkedInApiUrlBuilder (String urlFormat)

Method description

Parameters
urlFormat

protected abstract SchemaElementFactory<?> createObjectFactory ()

Method description

protected InputStream getWrappedInputStream (InputStream is, boolean gzip)

Method description@return

Parameters
is
gzip
Throws
IOException

protected boolean isNullOrEmpty (String s)

Get property as long.

Parameters
s

protected abstract String marshallObject (Object element)

Method description

Parameters
element

protected T readResponse (Class<T> clazz, InputStream is)

Method description

Parameters
clazz
is

protected abstract T unmarshallObject (Class<T> clazz, InputStream xmlContent)

Method description

Parameters
clazz
xmlContent