forked from spring-attic/spring-social-linkedin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to handle retrieval of LinkedIn Network Updates
- Loading branch information
robdrysdale
committed
Nov 4, 2011
1 parent
4a860db
commit 46f0bb5
Showing
36 changed files
with
1,344 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
spring-social-linkedin/src/main/java/org/springframework/social/linkedin/api/Company.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
import java.io.Serializable; | ||
|
||
public class Company implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private final String id; | ||
private final String name; | ||
|
||
public Company(String id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
public String getName() { | ||
return name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
...linkedin/src/main/java/org/springframework/social/linkedin/api/LinkedInNetworkUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* Copyright 2010 the original author or authors. | ||
* | ||
* 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.springframework.social.linkedin.api; | ||
|
||
import java.io.Serializable; | ||
import java.util.Date; | ||
import java.util.List; | ||
|
||
/** | ||
* Model class containing a user's LinkedIn Network update information. | ||
* @author Robert Drysdale | ||
*/ | ||
public class LinkedInNetworkUpdate implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private final Date timestamp; | ||
|
||
private final String updateKey; | ||
|
||
private final UpdateType updateType; | ||
|
||
private boolean commentable; | ||
|
||
private boolean likable; | ||
|
||
private boolean liked; | ||
|
||
private int numLikes; | ||
|
||
private List<LinkedInProfile> likes; | ||
|
||
private UpdateContent updateContent; | ||
|
||
private List<String> updatedFields; | ||
|
||
public LinkedInNetworkUpdate(Date timestamp, String updateKey, UpdateType updateType) { | ||
this.timestamp = timestamp; | ||
this.updateKey = updateKey; | ||
this.updateType = updateType; | ||
} | ||
|
||
public Date getTimestamp() { | ||
return timestamp; | ||
} | ||
|
||
public String getUpdateKey() { | ||
return updateKey; | ||
} | ||
|
||
public UpdateType getUpdateType() { | ||
return updateType; | ||
} | ||
|
||
public UpdateContent getUpdateContent() { | ||
return updateContent; | ||
} | ||
|
||
public boolean isCommentable() { | ||
return commentable; | ||
} | ||
|
||
public boolean isLikable() { | ||
return likable; | ||
} | ||
|
||
public boolean isLiked() { | ||
return liked; | ||
} | ||
|
||
public int getNumLikes() { | ||
return numLikes; | ||
} | ||
|
||
public List<LinkedInProfile> getLikes() { | ||
return likes; | ||
} | ||
|
||
public List<String> getUpdatedFields() { | ||
return updatedFields; | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
...inkedin/src/main/java/org/springframework/social/linkedin/api/LinkedInNetworkUpdates.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2010 the original author or authors. | ||
* | ||
* 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.springframework.social.linkedin.api; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* A model class containing a list of a user's network updates on LinkedIn. | ||
* | ||
* @author Robert Drysdale | ||
*/ | ||
public class LinkedInNetworkUpdates { | ||
|
||
private List<LinkedInNetworkUpdate> updates; | ||
|
||
public LinkedInNetworkUpdates(List<LinkedInNetworkUpdate> updates) { | ||
this.updates = updates; | ||
} | ||
|
||
/** | ||
* Retrieves the list of network updates | ||
* | ||
* @return a list of network updates | ||
*/ | ||
public List<LinkedInNetworkUpdate> getUpdates() { | ||
return updates; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...ng-social-linkedin/src/main/java/org/springframework/social/linkedin/api/MemberGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
import java.io.Serializable; | ||
|
||
public class MemberGroup implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private final String id; | ||
private final String name; | ||
private final String url; | ||
|
||
public MemberGroup(String id, String name, String url) { | ||
this.id = id; | ||
this.name = name; | ||
this.url = url; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...social-linkedin/src/main/java/org/springframework/social/linkedin/api/PersonActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
import java.io.Serializable; | ||
|
||
public class PersonActivity implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private final int appId; | ||
private final String body; | ||
|
||
public PersonActivity(int appId, String body) { | ||
this.appId = appId; | ||
this.body = body; | ||
} | ||
|
||
public int getAppId() { | ||
return appId; | ||
} | ||
|
||
public String getBody() { | ||
return body; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...social-linkedin/src/main/java/org/springframework/social/linkedin/api/Recommendation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
import java.io.Serializable; | ||
|
||
public class Recommendation implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private final String id; | ||
private final String recommendationSnippet; | ||
private final RecommendationType recommendationType; | ||
private final LinkedInProfile recommender; | ||
|
||
public Recommendation(String id, String recommendationSnippet, | ||
RecommendationType recommendationType, LinkedInProfile recommender) { | ||
this.id = id; | ||
this.recommendationSnippet = recommendationSnippet; | ||
this.recommendationType = recommendationType; | ||
this.recommender = recommender; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getRecommendationSnippet() { | ||
return recommendationSnippet; | ||
} | ||
|
||
public RecommendationType getRecommendationType() { | ||
return recommendationType; | ||
} | ||
|
||
public LinkedInProfile getRecommender() { | ||
return recommender; | ||
} | ||
|
||
public static enum RecommendationType { | ||
BUSINESS_PARTNER, | ||
COLLEAGUE, | ||
EDUCATION, | ||
SERVICE_PROVIDER | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...-social-linkedin/src/main/java/org/springframework/social/linkedin/api/UpdateContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
|
||
public class UpdateContent extends LinkedInProfile { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public UpdateContent(String id, String firstName, String lastName, | ||
String headline, String industry, String publicProfileUrl, | ||
String standardProfileUrl, String profilePictureUrl) { | ||
super(id, firstName, lastName, headline, industry, publicProfileUrl, | ||
standardProfileUrl, profilePictureUrl); | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...nkedin/src/main/java/org/springframework/social/linkedin/api/UpdateContentConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
import java.util.List; | ||
|
||
|
||
|
||
public class UpdateContentConnection extends UpdateContent { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private List<LinkedInProfile> connections; | ||
|
||
public UpdateContentConnection(String id, String firstName, | ||
String lastName, String headline, String industry, | ||
String publicProfileUrl, String standardProfileUrl, | ||
String profilePictureUrl) { | ||
super(id, firstName, lastName, headline, industry, publicProfileUrl, | ||
standardProfileUrl, profilePictureUrl); | ||
} | ||
|
||
public List<LinkedInProfile> getConnections() { | ||
return connections; | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...l-linkedin/src/main/java/org/springframework/social/linkedin/api/UpdateContentFollow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
public class UpdateContentFollow extends UpdateContent { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private String action; | ||
|
||
private Company following; | ||
|
||
public UpdateContentFollow(String id, String firstName, String lastName, | ||
String headline, String industry, String publicProfileUrl, | ||
String standardProfileUrl, String profilePictureUrl) { | ||
super(id, firstName, lastName, headline, industry, publicProfileUrl, | ||
standardProfileUrl, profilePictureUrl); | ||
} | ||
|
||
public String getAction() { | ||
return action; | ||
} | ||
|
||
public Company getFollowing() { | ||
return following; | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...al-linkedin/src/main/java/org/springframework/social/linkedin/api/UpdateContentGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.springframework.social.linkedin.api; | ||
|
||
import java.util.List; | ||
|
||
public class UpdateContentGroup extends UpdateContent { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private List<MemberGroup> memberGroups; | ||
|
||
public UpdateContentGroup(String id, String firstName, String lastName, | ||
String headline, String industry, String publicProfileUrl, | ||
String standardProfileUrl, String profilePictureUrl) { | ||
super(id, firstName, lastName, headline, industry, publicProfileUrl, | ||
standardProfileUrl, profilePictureUrl); | ||
} | ||
|
||
public List<MemberGroup> getMemberGroups() { | ||
return memberGroups; | ||
} | ||
|
||
|
||
|
||
} |
Oops, something went wrong.