Skip to content

Commit

Permalink
Ending the JSON mapping of ViadeoProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Treydone committed Sep 14, 2011
1 parent 5e60ca3 commit ca091b7
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 112 deletions.
30 changes: 4 additions & 26 deletions pom.xml
Expand Up @@ -14,23 +14,15 @@
<junit.version>4.8.2</junit.version>
<easymock.version>3.0</easymock.version>
<unitils.version>3.1</unitils.version>

<github.maven.repository>file:///C:/maven-repository/</github.maven.repository>
</properties>

<distributionManagement>
<repository>
<id>maven-config-processor-plugin-repo-releases</id>
<name>Maven Repository for Config Processor Plugin (releases)</name>
<url>svn:https://spring-social-viadeo.googlecode.com/svn/maven-repo/releases
</url>
<uniqueVersion>false</uniqueVersion>
<id>maven-repository</id>
<url>${github.maven.repository}</url>
</repository>
<snapshotRepository>
<id>maven-config-processor-plugin-repo-snapshots</id>
<name>Maven Repository for Config Processor Plugin (snapshots)</name>
<url>svn:https://spring-social-viadeo.googlecode.com/svn/maven-repo/snapshots
</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>

<dependencies>
Expand Down Expand Up @@ -125,20 +117,6 @@
<target>${java-version}</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.6</version>
<dependencies>
<dependency>
<groupId>com.google.code.maven-svn-wagon</groupId>
<artifactId>maven-svn-wagon</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</plugin>

</plugins>

</build>
Expand Down
@@ -1,6 +1,7 @@
package org.springframework.social.viadeo.api;

import java.io.Serializable;
import java.util.Date;

/**
* Model class containing a user's Viadeo profile information.
Expand Down Expand Up @@ -35,6 +36,14 @@ public class ViadeoProfile implements Serializable {
private String interests;

private Long contactCount;

private String introduction;

private String language;

private Date updatedTime;

private Location location;

public ViadeoProfile(String id, String gender, String firstName,
String lastName, String nickName, String profileUrl,
Expand Down Expand Up @@ -116,4 +125,36 @@ public String getSmallImageUrl() {
public void setSmallImageUrl(String smallImageUrl) {
this.smallImageUrl = smallImageUrl;
}

public String getIntroduction() {
return introduction;
}

public void setIntroduction(String introduction) {
this.introduction = introduction;
}

public String getLanguage() {
return language;
}

public void setLanguage(String language) {
this.language = language;
}

public Date getUpdatedTime() {
return updatedTime;
}

public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}

public Location getLocation() {
return location;
}

public void setLocation(Location location) {
this.location = location;
}
}
Expand Up @@ -7,6 +7,7 @@
import org.springframework.social.viadeo.api.ContactCards;
import org.springframework.social.viadeo.api.Experience;
import org.springframework.social.viadeo.api.Job;
import org.springframework.social.viadeo.api.Location;
import org.springframework.social.viadeo.api.News;
import org.springframework.social.viadeo.api.Phone;
import org.springframework.social.viadeo.api.ViadeoProfile;
Expand All @@ -20,6 +21,8 @@
* Jackson module for setting up mixin annotations on Viadeo model types. This
* enables the use of Jackson annotations without directly annotating the model
* classes themselves.
*
* @author Vincent Devillers
*/
public class ViadeoModule extends SimpleModule {

Expand All @@ -41,11 +44,8 @@ public void setupModule(SetupContext context) {
context.setMixInAnnotations(Job.class, JobMixin.class);
context.setMixInAnnotations(JobsResult.class, JobsResultMixin.class);
context.setMixInAnnotations(Phone.class, PhoneMixin.class);
context
.setMixInAnnotations(ContactCards.class,
ContactCardsMixin.class);
context
.setMixInAnnotations(VisitCards.class,
VisitCardsMixin.class);
context.setMixInAnnotations(ContactCards.class, ContactCardsMixin.class);
context.setMixInAnnotations(VisitCards.class, VisitCardsMixin.class);
context.setMixInAnnotations(Location.class, LocationMixin.class);
}
}
@@ -1,5 +1,7 @@
package org.springframework.social.viadeo.api.impl.json;

import java.util.Date;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
Expand Down Expand Up @@ -31,4 +33,13 @@ abstract class ViadeoProfileMixin {

@JsonProperty("picture_small")
String smallImageUrl;

@JsonProperty("introduction")
String introduction;

@JsonProperty("language")
String language;

@JsonProperty("updated_time")
Date updatedTime;
}

0 comments on commit ca091b7

Please sign in to comment.