spring-projects$greenhouse
Date
Date getEndDate()
Date
Date getEndTime()
spring-projects$greenhouse
Date
Date getStartDate()
Date
Date getStartTime()
spring-projects$greenhouse
String
String getDescription()
String
String getSummary()
spring-projects$greenhouse
Model model
model.addAttribute(eventRepository.findUpcomingEvents());
		return "events/list";
String
String upcomingEventsView(Model model)
Model model
model.addAttribute(eventsService.findEventsAfter(new Date()));
		return "events/list";
	@RequestMapping(value="/{eventId
String
String listEvents(Model model)
spring-projects$greenhouse
Date endDate
void
void setEndDate(Date endDate)
Date endTime
void
void setEndTime(Date endTime)
spring-projects$greenhouse
Date startDate
void
void setStartDate(Date startDate)
Date startTime
void
void setStartTime(Date startTime)
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEvent.java
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEvent.java?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/java/com/springsource/greenhouse/events/Event.java
	private Long id;
	private Date startDate;
	private Date endDate;
	private String location;
	private String description;
	
	public Long getId() {
		return id;
	public void setId(Long id) {
	
	public Date getStartDate() {
		return startDate;
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	public Date getEndDate() {
		return endDate;
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}
src/main/java/com/springsource/greenhouse/events/Event.java
return id;
	public void setId(Long id) {
	
	public Date getStartDate() {
		return startDate;
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	public Date getEndDate() {
		return endDate;
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	public String getDescription() {
		return this.description;
Long getId()
String description
src/main/java/com/springsource/greenhouse/events/Event.java
this.description = description;
void setDescription(String description)
	private long id;
	private String friendlyId;
	
	private String location;

	private String description;

	private Date startTime;
	private Date endTime;
	private String hashtag;
	public long getId() {
		return this.id;
	public void setId(long id) {

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return this.endTime;
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	public String getHashtag() {
		return this.hashtag;
	public void setHashtag(String hashtag) {
		this.hashtag = hashtag;
	public void setFriendlyId(String friendlyId) {
	    this.friendlyId = friendlyId;
    }
	public String getFriendlyId() {
	    return friendlyId;
    }
}
src/main/java/com/springsource/greenhouse/events/Event.java
return this.id;
	public void setId(long id) {

	public String getDescription() {
		return this.description;
long getId()
String description
src/main/java/com/springsource/greenhouse/events/Event.java
this.description = description;
void setDescription(String description)
src/main/java/com/springsource/greenhouse/events/Event.java
return this.startTime;
Date getStartTime()
Date startTime
src/main/java/com/springsource/greenhouse/events/Event.java
this.startTime = startTime;
void setStartTime(Date startTime)
src/main/java/com/springsource/greenhouse/events/Event.java
return this.endTime;
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	public String getHashtag() {
		return this.hashtag;
	public void setHashtag(String hashtag) {
		this.hashtag = hashtag;
	public void setFriendlyId(String friendlyId) {
	    this.friendlyId = friendlyId;
Date getEndTime()
src/main/java/com/springsource/greenhouse/events/Event.java
return friendlyId;
String getFriendlyId()
@@ -4,27 +4,23 @@
 
 public class Event {
 
-	private long id;
+	private Long id;
 
-	private String friendlyId;
-	
 	private String title;
 
-	private String location;
-
-	private String description;
-
-	private Date startTime;
+	private Date startDate;
 
-	private Date endTime;
+	private Date endDate;
 
-	private String hashtag;
+	private String location;
 
-	public long getId() {
-		return this.id;
+	private String description;
+	
+	public Long getId() {
+		return id;
 	}
 
-	public void setId(long id) {
+	public void setId(Long id) {
 		this.id = id;
 	}
 
@@ -35,37 +31,21 @@ public String getTitle() {
 	public void setTitle(String title) {
 		this.title = title;
 	}
-
-	public String getDescription() {
-		return this.description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public Date getStartTime() {
-		return this.startTime;
-	}
-
-	public void setStartTime(Date startTime) {
-		this.startTime = startTime;
-	}
-
-	public Date getEndTime() {
-		return this.endTime;
+	
+	public Date getStartDate() {
+		return startDate;
 	}
 
-	public void setEndTime(Date endTime) {
-		this.endTime = endTime;
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
 	}
 
-	public String getHashtag() {
-		return this.hashtag;
+	public Date getEndDate() {
+		return endDate;
 	}
 
-	public void setHashtag(String hashtag) {
-		this.hashtag = hashtag;
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
 	}
 
 	public void setLocation(String location) {
@@ -76,11 +56,12 @@ public String getLocation() {
 		return location;
 	}
 
-	public void setFriendlyId(String friendlyId) {
-	    this.friendlyId = friendlyId;
-    }
+	public String getDescription() {
+		return this.description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
 
-	public String getFriendlyId() {
-	    return friendlyId;
-    }
-}
+}
\ No newline at end of file
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEvent.java
a29c0c77856304cf6c4c74575018c7ca86677cd8
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEventSession.java
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEventSession.java?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/java/com/springsource/greenhouse/events/EventSession.java
import java.util.Collections;
import java.util.Set;
	private Short code;
	private String title;
	private String description;
	private Set<EventSessionLeader> leaders;
	public EventSession(Short code, String title, Date startTime, Date endTime, String description, EventSessionLeader leader) {
		this(code, title, startTime, endTime, description, Collections.singleton(leader));
		
	public EventSession(Short code, String title, Date startTime, Date endTime, String description, Set<EventSessionLeader> leaders) {
		this.code = code;
		this.description = description;

	public Short getCode() {
		return code;
	public String getTitle() {
		return title;
	public String getDescription() {
		return description;
	public Set<EventSessionLeader> getLeaders() {
		return leaders;

}
Short code  String title  Date startTime  Date endTime  String description  EventSessionLeader leader
src/main/java/com/springsource/greenhouse/events/EventSession.java
this(code, title, startTime, endTime, description, Collections.singleton(leader));
		
	public EventSession(Short code, String title, Date startTime, Date endTime, String description, Set<EventSessionLeader> leaders) {
		this.code = code;
		this.description = description;

	public Short getCode() {
		return code;
	public String getTitle() {
		return title;
	public String getDescription() {
		return description;
	public Set<EventSessionLeader> getLeaders() {
		return leaders;
public EventSession(Short code, String title, Date startTime, Date endTime, String description, EventSessionLeader leader)
import java.util.ArrayList;
import java.util.List;
	private String title;
	private String summary;
	private List<SessionLeader> leaders;
	private String hashtag;
	public EventSession(String title, String summary, Date startTime,
			Date endTime, SessionLeader leader, String hashtag) {
		super();
		this.title = title;
		this.summary = summary;
		this.startTime = startTime;
		this.endTime = endTime;
		
		this.leaders = new ArrayList<SessionLeader>();
		this.leaders.add(leader);
		this.hashtag = hashtag;

	public EventSession(String title, String summary, Date startTime,
			Date endTime, List<SessionLeader> leaders, String hashtag) {
		super();
		this.summary = summary;
		this.hashtag = hashtag;
	
	public String getTitle() {
		return title;
	public String getSummary() {
		return summary;
	public List<SessionLeader> getLeaders() {
		return leaders;
	public String getHashtag() {
		return hashtag;
}
String title  String summary  Date startTime 
			Date endTime  SessionLeader leader  String hashtag
src/main/java/com/springsource/greenhouse/events/EventSession.java
super();
		this.title = title;
		this.summary = summary;
		this.startTime = startTime;
		this.endTime = endTime;
		
		this.leaders = new ArrayList<SessionLeader>();
		this.leaders.add(leader);
		this.hashtag = hashtag;

	public EventSession(String title, String summary, Date startTime,
			Date endTime, List<SessionLeader> leaders, String hashtag) {
		super();
		this.summary = summary;
		this.hashtag = hashtag;
	
	public String getTitle() {
		return title;
	public String getSummary() {
		return summary;
	public List<SessionLeader> getLeaders() {
		return leaders;
	public String getHashtag() {
		return hashtag;
public EventSession(String title, String summary, Date startTime,
			Date endTime, SessionLeader leader, String hashtag)
@@ -1,53 +1,42 @@
 package com.springsource.greenhouse.events;
 
-import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
-import java.util.List;
+import java.util.Set;
 
 public class EventSession {
 	
-	private String title;
+	private Short code;
 	
-	private String summary;
+	private String title;
 	
 	private Date startTime;
 	
 	private Date endTime;
 
-	private List<SessionLeader> leaders;
+	private String description;
 	
-	private String hashtag;
+	private Set<EventSessionLeader> leaders;
 
-	public EventSession(String title, String summary, Date startTime,
-			Date endTime, SessionLeader leader, String hashtag) {
-		super();
-		this.title = title;
-		this.summary = summary;
-		this.startTime = startTime;
-		this.endTime = endTime;
-		
-		this.leaders = new ArrayList<SessionLeader>();
-		this.leaders.add(leader);
-		this.hashtag = hashtag;
+	public EventSession(Short code, String title, Date startTime, Date endTime, String description, EventSessionLeader leader) {
+		this(code, title, startTime, endTime, description, Collections.singleton(leader));
 	}
-
-	public EventSession(String title, String summary, Date startTime,
-			Date endTime, List<SessionLeader> leaders, String hashtag) {
-		super();
+		
+	public EventSession(Short code, String title, Date startTime, Date endTime, String description, Set<EventSessionLeader> leaders) {
+		this.code = code;
 		this.title = title;
-		this.summary = summary;
 		this.startTime = startTime;
 		this.endTime = endTime;
+		this.description = description;
 		this.leaders = leaders;
-		this.hashtag = hashtag;
 	}
-	
-	public String getTitle() {
-		return title;
+
+	public Short getCode() {
+		return code;
 	}
 
-	public String getSummary() {
-		return summary;
+	public String getTitle() {
+		return title;
 	}
 
 	public Date getStartTime() {
@@ -58,11 +47,12 @@ public Date getEndTime() {
 		return endTime;
 	}
 
-	public List<SessionLeader> getLeaders() {
-		return leaders;
+	public String getDescription() {
+		return description;
 	}
 
-	public String getHashtag() {
-		return hashtag;
+	public Set<EventSessionLeader> getLeaders() {
+		return leaders;
 	}
-}
+
+}
\ No newline at end of file
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEventSession.java
8ad75fa5655b873084ece0f8f8ccbde036849949
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEventsController.java
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEventsController.java?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/java/com/springsource/greenhouse/events/EventsController.java
import org.springframework.security.oauth.extras.OAuthAccessToken;
	private EventRepository eventRepository;
	private TwitterOperations twitter;
		
	public EventsController(EventRepository eventRepository, TwitterOperations twitter) {
		this.eventRepository = eventRepository;
	// for web service (JSON) clients
	@RequestMapping(method=RequestMethod.GET, headers="Accept=application/json") 
	public @ResponseBody List<Event> upcomingEvents() {
		return eventRepository.findUpcomingEvents();
	@RequestMapping(value="/{id}/tweets", method=RequestMethod.GET, headers="Accept=application/json")
	public @ResponseBody SearchResults tweets(@PathVariable Long id,  @RequestParam(defaultValue="1") Integer page, @RequestParam(defaultValue="10") Integer pageSize) {
		return twitter.search(eventRepository.getEventSearchString(id), page, pageSize);
	@RequestMapping(value="/{id}/tweets", method=RequestMethod.POST)
	public @ResponseBody void postTweet(Long eventId, @RequestParam String status, @OAuthAccessToken("twitter") OAuthConsumerToken accessToken) {
		twitter.updateStatus(accessToken, status);
	@RequestMapping(value="/{id}/sessions/today", method=RequestMethod.GET, headers="Accept=application/json")
	public @ResponseBody List<EventSession> sessionsToday(@PathVariable Long id) {
		return eventRepository.findTodaysSessions(id);
	}
	@RequestMapping(value="/{id}/sessions/{code}/tweets", method=RequestMethod.GET, headers="Accept=application/json")
	public @ResponseBody SearchResults sessionTweets(@PathVariable Long id, Short code, @RequestParam(defaultValue="1") Integer page, @RequestParam(defaultValue="10") Integer pageSize) {
		return twitter.search(eventRepository.getEventSessionSearchString(id, code), page, pageSize);
	}
	@RequestMapping(value="/{id}/sessions/{code}/tweets", method=RequestMethod.POST)
	public @ResponseBody void postSessionTweet(Long id, Short code, @RequestParam String status, @OAuthAccessToken("twitter") OAuthConsumerToken accessToken) {
		twitter.updateStatus(accessToken, status);
	}
	// for web browser (HTML) clients
	
	@RequestMapping(method=RequestMethod.GET, headers="Accept=text/html")
	public String upcomingEventsView(Model model) {
		model.addAttribute(eventRepository.findUpcomingEvents());
		return "events/list";
	
}
EventRepository eventRepository  TwitterOperations twitter
src/main/java/com/springsource/greenhouse/events/EventsController.java
this.eventRepository = eventRepository;
	// for web service (JSON) clients
	@RequestMapping(method=RequestMethod.GET, headers="Accept=application/json") 
	public @ResponseBody List<Event> upcomingEvents() {
		return eventRepository.findUpcomingEvents();
	@RequestMapping(value="/{id
public EventsController(EventRepository eventRepository, TwitterOperations twitter)
Model model
src/main/java/com/springsource/greenhouse/events/EventsController.java
model.addAttribute(eventRepository.findUpcomingEvents());
		return "events/list";
String upcomingEventsView(Model model)
import java.util.ArrayList;
import java.util.Date;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
	private EventsService eventsService;
	private TwitterOperations twitter;
	private final Logger logger = LoggerFactory.getLogger(getClass());
	public EventsController(EventsService eventsService, TwitterOperations twitter) {
		this.eventsService = eventsService;
	@RequestMapping(method=RequestMethod.GET, headers="Accept=application/json") 
	public @ResponseBody List<Event> eventsData() {
		return eventsService.findEventsAfter(new Date());
	}
	@RequestMapping(method=RequestMethod.GET)
	public String listEvents(Model model) {
		model.addAttribute(eventsService.findEventsAfter(new Date()));
		return "events/list";
	@RequestMapping(value="/{eventId}", method=RequestMethod.GET, headers="Accept=application/json")
	public @ResponseBody Event eventData(@PathVariable long eventId) {
		return eventsService.findEventById(eventId);
	@RequestMapping(value="/{eventName}", method=RequestMethod.GET)
	public String viewEvent(OAuthConsumerToken accessToken, @PathVariable String eventName, Model model) {
		Event event = eventsService.findEventByPublicId(eventName);
		model.addAttribute(event);
		model.addAttribute(twitter.search(accessToken, event.getHashtag(), 1, 10));
		return "events/view";
	
	@RequestMapping(value="/{eventId}/tweets", method=RequestMethod.GET, headers="Accept=application/json")
	public @ResponseBody SearchResults listEventTweets(OAuthConsumerToken accessToken, @PathVariable long eventId, 
			@RequestParam(defaultValue="1") int page, @RequestParam(defaultValue="10") int perPage) {
		Event event = eventsService.findEventById(eventId);
		return twitter.search(accessToken, event.getHashtag(), page, perPage);
	}
	
	// This method is stubbed out to test posting a twitter status
	@RequestMapping(value="/tweet", method=RequestMethod.POST)//, headers="Accept=application/json")
	public @ResponseBody String postTweet(OAuthConsumerToken accessToken, @RequestParam String status) {
		logger.info("twitter update: " + status);
		
		return "hello";
	}
		
	// This method should return all sessions for the current day
	@RequestMapping(value="/{eventId}/currentsessions", method=RequestMethod.GET, headers="Accept=application/json")
	public @ResponseBody List<EventSession> listCurrentSessions(@PathVariable long eventId) {
		
		// This is just a bunch of test session data that updates to the current date so 
		// we can always see upcoming and happening now sessions.
		
		List<EventSession> sessions = new ArrayList<EventSession>();
		
		Date now = new Date();
		int year = now.getYear() + 1900;
		int month = now.getMonth() + 1;
		int date = now.getDate();
		
		Date startTime = new DateTime(year, month, date, 8, 30, 0, 0).toDate();
		Date endTime = new DateTime(year, month, date, 10, 0, 0, 0).toDate();
		
		for (int i = 0; i < 9; i++)
		{
			sessions.add(new EventSession("Test Session A" + i, "Description for Test Session A" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-A" + i));
		}

		startTime = new DateTime(year, month, date, 10, 15, 0, 0).toDate();
		endTime = new DateTime(year, month, date, 11, 45, 0, 0).toDate();
		
		for (int i = 0; i < 9; i++)
		{
			List<SessionLeader> leaders = new ArrayList<SessionLeader>();
			leaders.add(new SessionLeader("Roy", "Clarkson"));
			leaders.add(new SessionLeader("Jeremy", "Grelle"));
			sessions.add(new EventSession("Test Session B" + i, "Description for Test Session B" + i, startTime, endTime, leaders, "#SpringOne2GX-B" + i));
		}

		startTime = new DateTime(year, month, date, 12, 45, 0, 0).toDate();
		endTime = new DateTime(year, month, date, 14, 15, 0, 0).toDate();
		
		for (int i = 0; i < 9; i++)
		{
			sessions.add(new EventSession("Test Session C" + i, "Description for Test Session C" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-C" + i));
		}
		startTime = new DateTime(year, month, date, 14, 45, 0, 0).toDate();
		endTime = new DateTime(year, month, date, 16, 15, 0, 0).toDate();
		for (int i = 0; i < 9; i++)
		{
			sessions.add(new EventSession("Test Session D" + i, "Description for Test Session D" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-D" + i));
		}
		startTime = new DateTime(year, month, date, 16, 30, 0, 0).toDate();
		endTime = new DateTime(year, month, date, 18, 0, 0, 0).toDate();
		for (int i = 0; i < 9; i++)
		{
			sessions.add(new EventSession("Test Session E" + i, "Description for Test Session E" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-E" + i));
		}
				
//		sessions.add(new EventSession("What's new in Spring 3", "Come see the latest Spring Framework features!", new DateTime(2010, 10, 20, 8, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new SessionLeader("Juergen", "Hoeller")));
//		sessions.add(new EventSession("What's new in Grails 2", "Come see the latest Grails features!", new DateTime(2010, 10, 20, 8, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new SessionLeader("Graeme", "Rocher")));
//		sessions.add(new EventSession("Building Social Ready Webapps", "Come learn how to do the social stuff!", new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 10, 0, 0, 0).toDate(), new SessionLeader("Craig", "Walls")));
//		
//		List<SessionLeader> mobileLeaders = new ArrayList<SessionLeader>();
//		mobileLeaders.add(new SessionLeader("Roy", "Clarkson"));
//		mobileLeaders.add(new SessionLeader("Jeremy", "Clarkson"));
//		sessions.add(new EventSession("Choices in Mobile Application Development", "Come learn how to do the mobile stuff!", new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 10, 0, 0, 0).toDate(), mobileLeaders));
		
		return sessions;
}
EventsService eventsService  TwitterOperations twitter
src/main/java/com/springsource/greenhouse/events/EventsController.java
this.eventsService = eventsService;
	@RequestMapping(method=RequestMethod.GET, headers="Accept=application/json") 
	public @ResponseBody List<Event> eventsData() {
		return eventsService.findEventsAfter(new Date());
public EventsController(EventsService eventsService, TwitterOperations twitter)
Model model
src/main/java/com/springsource/greenhouse/events/EventsController.java
model.addAttribute(eventsService.findEventsAfter(new Date()));
		return "events/list";
	@RequestMapping(value="/{eventId
String listEvents(Model model)
@PathVariable long eventId
src/main/java/com/springsource/greenhouse/events/EventsController.java
return eventsService.findEventById(eventId);
	@RequestMapping(value="/{eventName
Event eventData(@PathVariable long eventId)
OAuthConsumerToken accessToken  @PathVariable String eventName  Model model
src/main/java/com/springsource/greenhouse/events/EventsController.java
Event event = eventsService.findEventByPublicId(eventName);
		model.addAttribute(event);
		model.addAttribute(twitter.search(accessToken, event.getHashtag(), 1, 10));
		return "events/view";
	
	@RequestMapping(value="/{eventId
String viewEvent(OAuthConsumerToken accessToken, @PathVariable String eventName, Model model)
OAuthConsumerToken accessToken  @RequestParam String status
src/main/java/com/springsource/greenhouse/events/EventsController.java
logger.info("twitter update: " + status);
		
		return "hello";
String postTweet(OAuthConsumerToken accessToken, @RequestParam String status)
@@ -1,15 +1,11 @@
 package com.springsource.greenhouse.events;
 
-import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 
 import javax.inject.Inject;
 
-import org.joda.time.DateTime;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.security.oauth.consumer.token.OAuthConsumerToken;
+import org.springframework.security.oauth.extras.OAuthAccessToken;
 import org.springframework.social.twitter.SearchResults;
 import org.springframework.social.twitter.TwitterOperations;
 import org.springframework.stereotype.Controller;
@@ -24,121 +20,54 @@
 @RequestMapping("/events")
 public class EventsController {
 	
-	private EventsService eventsService;
-	private TwitterOperations twitter;
-	private final Logger logger = LoggerFactory.getLogger(getClass());
+	private EventRepository eventRepository;
 	
+	private TwitterOperations twitter;
+		
 	@Inject
-	public EventsController(EventsService eventsService, TwitterOperations twitter) {
-		this.eventsService = eventsService;
+	public EventsController(EventRepository eventRepository, TwitterOperations twitter) {
+		this.eventRepository = eventRepository;
 		this.twitter = twitter;
 	}
 	
-	@RequestMapping(method=RequestMethod.GET, headers="Accept=application/json") 
-	public @ResponseBody List<Event> eventsData() {
-		return eventsService.findEventsAfter(new Date());
-	}
+	// for web service (JSON) clients
 	
-	@RequestMapping(method=RequestMethod.GET)
-	public String listEvents(Model model) {
-		model.addAttribute(eventsService.findEventsAfter(new Date()));
-		return "events/list";
+	@RequestMapping(method=RequestMethod.GET, headers="Accept=application/json") 
+	public @ResponseBody List<Event> upcomingEvents() {
+		return eventRepository.findUpcomingEvents();
 	}
 
-	@RequestMapping(value="/{eventId}", method=RequestMethod.GET, headers="Accept=application/json")
-	public @ResponseBody Event eventData(@PathVariable long eventId) {
-		return eventsService.findEventById(eventId);
+	@RequestMapping(value="/{id}/tweets", method=RequestMethod.GET, headers="Accept=application/json")
+	public @ResponseBody SearchResults tweets(@PathVariable Long id,  @RequestParam(defaultValue="1") Integer page, @RequestParam(defaultValue="10") Integer pageSize) {
+		return twitter.search(eventRepository.getEventSearchString(id), page, pageSize);
 	}
 
-	@RequestMapping(value="/{eventName}", method=RequestMethod.GET)
-	public String viewEvent(OAuthConsumerToken accessToken, @PathVariable String eventName, Model model) {
-		Event event = eventsService.findEventByPublicId(eventName);
-		model.addAttribute(event);
-		model.addAttribute(twitter.search(accessToken, event.getHashtag(), 1, 10));
-		return "events/view";
+	@RequestMapping(value="/{id}/tweets", method=RequestMethod.POST)
+	public @ResponseBody void postTweet(Long eventId, @RequestParam String status, @OAuthAccessToken("twitter") OAuthConsumerToken accessToken) {
+		twitter.updateStatus(accessToken, status);
 	}
-	
-	@RequestMapping(value="/{eventId}/tweets", method=RequestMethod.GET, headers="Accept=application/json")
-	public @ResponseBody SearchResults listEventTweets(OAuthConsumerToken accessToken, @PathVariable long eventId, 
-			@RequestParam(defaultValue="1") int page, @RequestParam(defaultValue="10") int perPage) {
-		Event event = eventsService.findEventById(eventId);
-		return twitter.search(accessToken, event.getHashtag(), page, perPage);
-	}
-	
-	// This method is stubbed out to test posting a twitter status
-	@RequestMapping(value="/tweet", method=RequestMethod.POST)//, headers="Accept=application/json")
-	public @ResponseBody String postTweet(OAuthConsumerToken accessToken, @RequestParam String status) {
-		logger.info("twitter update: " + status);
-		
-		return "hello";
-	}
-		
-	// This method should return all sessions for the current day
-	@RequestMapping(value="/{eventId}/currentsessions", method=RequestMethod.GET, headers="Accept=application/json")
-	public @ResponseBody List<EventSession> listCurrentSessions(@PathVariable long eventId) {
-		
-		// This is just a bunch of test session data that updates to the current date so 
-		// we can always see upcoming and happening now sessions.
-		
-		List<EventSession> sessions = new ArrayList<EventSession>();
-		
-		Date now = new Date();
-		int year = now.getYear() + 1900;
-		int month = now.getMonth() + 1;
-		int date = now.getDate();
-		
-		Date startTime = new DateTime(year, month, date, 8, 30, 0, 0).toDate();
-		Date endTime = new DateTime(year, month, date, 10, 0, 0, 0).toDate();
-		
-		for (int i = 0; i < 9; i++)
-		{
-			sessions.add(new EventSession("Test Session A" + i, "Description for Test Session A" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-A" + i));
-		}
-
-		startTime = new DateTime(year, month, date, 10, 15, 0, 0).toDate();
-		endTime = new DateTime(year, month, date, 11, 45, 0, 0).toDate();
-		
-		for (int i = 0; i < 9; i++)
-		{
-			List<SessionLeader> leaders = new ArrayList<SessionLeader>();
-			leaders.add(new SessionLeader("Roy", "Clarkson"));
-			leaders.add(new SessionLeader("Jeremy", "Grelle"));
-			sessions.add(new EventSession("Test Session B" + i, "Description for Test Session B" + i, startTime, endTime, leaders, "#SpringOne2GX-B" + i));
-		}
-
-		startTime = new DateTime(year, month, date, 12, 45, 0, 0).toDate();
-		endTime = new DateTime(year, month, date, 14, 15, 0, 0).toDate();
-		
-		for (int i = 0; i < 9; i++)
-		{
-			sessions.add(new EventSession("Test Session C" + i, "Description for Test Session C" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-C" + i));
-		}
 
-		startTime = new DateTime(year, month, date, 14, 45, 0, 0).toDate();
-		endTime = new DateTime(year, month, date, 16, 15, 0, 0).toDate();
+	@RequestMapping(value="/{id}/sessions/today", method=RequestMethod.GET, headers="Accept=application/json")
+	public @ResponseBody List<EventSession> sessionsToday(@PathVariable Long id) {
+		return eventRepository.findTodaysSessions(id);
+	}
 
-		for (int i = 0; i < 9; i++)
-		{
-			sessions.add(new EventSession("Test Session D" + i, "Description for Test Session D" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-D" + i));
-		}
+	@RequestMapping(value="/{id}/sessions/{code}/tweets", method=RequestMethod.GET, headers="Accept=application/json")
+	public @ResponseBody SearchResults sessionTweets(@PathVariable Long id, Short code, @RequestParam(defaultValue="1") Integer page, @RequestParam(defaultValue="10") Integer pageSize) {
+		return twitter.search(eventRepository.getEventSessionSearchString(id, code), page, pageSize);
+	}
 
-		startTime = new DateTime(year, month, date, 16, 30, 0, 0).toDate();
-		endTime = new DateTime(year, month, date, 18, 0, 0, 0).toDate();
+	@RequestMapping(value="/{id}/sessions/{code}/tweets", method=RequestMethod.POST)
+	public @ResponseBody void postSessionTweet(Long id, Short code, @RequestParam String status, @OAuthAccessToken("twitter") OAuthConsumerToken accessToken) {
+		twitter.updateStatus(accessToken, status);
+	}
 
-		for (int i = 0; i < 9; i++)
-		{
-			sessions.add(new EventSession("Test Session E" + i, "Description for Test Session E" + i, startTime, endTime, new SessionLeader("Johnny", "Speaker"), "#SpringOne2GX-E" + i));
-		}
-				
-//		sessions.add(new EventSession("What's new in Spring 3", "Come see the latest Spring Framework features!", new DateTime(2010, 10, 20, 8, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new SessionLeader("Juergen", "Hoeller")));
-//		sessions.add(new EventSession("What's new in Grails 2", "Come see the latest Grails features!", new DateTime(2010, 10, 20, 8, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new SessionLeader("Graeme", "Rocher")));
-//		sessions.add(new EventSession("Building Social Ready Webapps", "Come learn how to do the social stuff!", new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 10, 0, 0, 0).toDate(), new SessionLeader("Craig", "Walls")));
-//		
-//		List<SessionLeader> mobileLeaders = new ArrayList<SessionLeader>();
-//		mobileLeaders.add(new SessionLeader("Roy", "Clarkson"));
-//		mobileLeaders.add(new SessionLeader("Jeremy", "Clarkson"));
-//		sessions.add(new EventSession("Choices in Mobile Application Development", "Come learn how to do the mobile stuff!", new DateTime(2010, 10, 20, 9, 0, 0, 0).toDate(), new DateTime(2010, 10, 20, 10, 0, 0, 0).toDate(), mobileLeaders));
-		
-		return sessions;
+	// for web browser (HTML) clients
+	
+	@RequestMapping(method=RequestMethod.GET, headers="Accept=text/html")
+	public String upcomingEventsView(Model model) {
+		model.addAttribute(eventRepository.findUpcomingEvents());
+		return "events/list";
 	}
-}
+	
+}
\ No newline at end of file
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fevents%2FEventsController.java
91853c18f521554e3803f165de7c3cd6e37904b3
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fmembers%2FMembersController.java
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fmembers%2FMembersController.java?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/java/com/springsource/greenhouse/members/MembersController.java
	private MemberRepository membersService;
	public MembersController(MemberRepository membersService) {
	private MembersService membersService;
	public MembersController(MembersService membersService) {
@@ -14,10 +14,10 @@
 @RequestMapping("/members/*")
 public class MembersController {
 
-	private MembersService membersService;
+	private MemberRepository membersService;
 	
 	@Inject
-	public MembersController(MembersService membersService) {
+	public MembersController(MemberRepository membersService) {
 		this.membersService = membersService;
 	}
 
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fmembers%2FMembersController.java
090a76e9c4bd34b588a1a02e20f57b5dad344a86
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Forg%2Fspringframework%2Fsocial%2Ftwitter%2FTwitterOperations.java
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fjava%2Forg%2Fspringframework%2Fsocial%2Ftwitter%2FTwitterOperations.java?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/java/org/springframework/social/twitter/TwitterOperations.java
	
	

	SearchResults search(String query, int page, int pageSize);

	
	
@@ -7,9 +7,16 @@
 public interface TwitterOperations {
 
 	String getScreenName(OAuthConsumerToken accessToken);
+	
 	List<String> getFriends(OAuthConsumerToken accessToken, String screenName);
+	
 	void updateStatus(OAuthConsumerToken accessToken, String message);
+
+	SearchResults search(String query, int page, int pageSize);
+
 	SearchResults search(OAuthConsumerToken accessToken, String query);
+	
 	SearchResults search(OAuthConsumerToken accessToken, String query, int page, int resultsPerPage);
+	
 	SearchResults search(OAuthConsumerToken accessToken, String query, int page, int resultsPerPage, int sinceId, int maxId);
 }
\ No newline at end of file
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Forg%2Fspringframework%2Fsocial%2Ftwitter%2FTwitterOperations.java
5f2d89b59bde98fd1e4e9db6e0372c1768738f07
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Forg%2Fspringframework%2Fsocial%2Ftwitter%2FTwitterService.java
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fjava%2Forg%2Fspringframework%2Fsocial%2Ftwitter%2FTwitterService.java?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/java/org/springframework/social/twitter/TwitterService.java
	public SearchResults search(String query, int page, int resultsPerPage) {
		return search(null, query, page, resultsPerPage, 0, 0);
	}
	
String query  int page  int resultsPerPage
src/main/java/org/springframework/social/twitter/TwitterService.java
return search(null, query, page, resultsPerPage, 0, 0);
SearchResults search(String query, int page, int resultsPerPage)
@@ -70,6 +70,10 @@ public SearchResults search(OAuthConsumerToken accessToken, String query) {
 		return search(accessToken, query, 1, DEFAULT_RESULTS_PER_PAGE, 0, 0);
 	}
 
+	public SearchResults search(String query, int page, int resultsPerPage) {
+		return search(null, query, page, resultsPerPage, 0, 0);
+	}
+	
 	public SearchResults search(OAuthConsumerToken accessToken, String query, int page, int resultsPerPage) {
 		return search(accessToken, query, page, resultsPerPage, 0, 0);
 	}
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fjava%2Forg%2Fspringframework%2Fsocial%2Ftwitter%2FTwitterService.java
160f20996255494d2a4b11398040e06c8736bf27
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fwebapp%2FWEB-INF%2Fdatabase%2Fdata.sql
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fwebapp%2FWEB-INF%2Fdatabase%2Fdata.sql?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/webapp/WEB-INF/database/data.sql
insert into Member (firstName, lastName, email, password, username) values ('Jeremy', 'Grelle', 'jgrelle@vmware.com', 'churchkeys', 'jgrelle');
insert into MemberGroup (name, description, profileKey, searchString, leader) values ('SpringOne2gx', 'The premier event for Spring technologies', 'springone2gx', '#springone2gx', 1);
insert into Event (title, startDate, endDate, location, description, memberGroup) values ('SpringOne/2GX', '2010-10-19', '2010-10-22', 'SpringOne 2GX is a one-of-a-kind conference for application developers, solution architects, web operations and IT teams who develop, deploy and manage business applications.', 'Chicago, IL', 1);
insert into EventTrack (name, description, chair, event) values ('Essential Spring', 'Spring techniques and technologies applicable to most classes of applications', 2, 1);
insert into EventTrack (name, description, chair, event) values ('Web Application Development', 'What you need to know to build rich web applications', 1, 1);
insert into EventSession (code, title, startTime, endTime, description, event, track) values (201, 
	'Mastering MVC 3', '2010-10-20 12:45:00', '2010-10-20 14:15:00',
	'A deep-dive into the latest capabilities of Spring MVC, Spring%27s REST-ful web application development platform.', 1, 2);
insert into EventSessionLeader (session, leader) values (201, 1);

insert into EventSession (code, title, startTime, endTime, description, event, track) values (202, 
	'Inside Web Flow 3 Development', '2010-10-20 14:45:00', '2010-10-20 16:15:00',
	'A look inside the development of Spring Web Flow 3, the next-generation version of Spring%27s stateful controller framework for orchestrating multi-step user dialogs.', 1, 2);
insert into EventSessionLeader (session, leader) values (202, 1);

insert into EventSession (code, title, startTime, endTime, description, event, track) values (203, 
	'Developing Social-Ready Web Applications', '2010-10-21 12:45:00', '2010-10-21 14:15:00',
	'Businesses are increasingly recognizing the value of connecting with their customers on a more personal level. Companies can utilize social networking to transition from "Big Faceless Corporation" to "Friend" by taking their wares to the online communities where their customers are. In this age of social media, those communities are found at social network sites such as Facebook, Twitter, and LinkedIn. In this session, you%27ll learn how to build Spring-based applications that interact with the various social networks. We%27ll talk about new features in the Spring portfolio to support integration with social networks as well as how to start building social features into your own applications.',
	1, 2);
insert into EventSessionLeader (session, leader) values (203, 2);
	
insert into EventSession (code, title, startTime, endTime, description, event, track) values (204, 
	'Choices in Moble Application Development', '2010-10-21 14:45:00', '2010-10-21 16:15:00',
	'With the rising prevalence of advanced mobile platforms such as iPhone, Android, and Web OS, the desire for rich mobile clients as another means of accessing enterprise services is becoming something that can no longer be ignored. In this session, we will explore the current mobile development landscape and discuss what you as a Spring developer can do to support this increasingly important paradigm. We will examine the benefits and tradeoffs of native mobile client development vs. web-based mobile client development, and we will explore some of the emerging cross-platform options such as PhoneGap. We will look at the various strategies for utilizing a Spring back-end with these mobile platforms, such as consumption of RESTful services, authentication and authorization via OAuth, and server-push style messaging.',
	1, 2);
insert into EventSessionLeader (session, leader) values (204, 3);
insert into EventSessionLeader (session, leader) values (204, 4);
insert into MemberGroup (publicId, name, description, hashtag, leader) values ('SpringOne', 'SpringOne', 'The premier Spring Framework event.', '#springone', 1);
insert into Event (publicId, title, description, startTime, endTime, location, memberGroup, hashtag) values ('springone_2gx', 'SpringOne/2GX', 
    'SpringOne 2GX is a one-of-a-kind conference for application developers, solution architects, web operations and IT teams who develop, deploy and manage business applications.', 
    '2010-10-19', '2010-10-22', 'Chicago, IL', 1, '#springone2gx');
insert into EventTrack (name, description, chair, event) values ('Core Spring', 'The low-down on the core Spring Framework', 1, 1);
insert into EventSession (code, title, description, startTime, endTime, speaker, event, track, hashtag) values ('CS1', 
	'Developing Social-Ready Web Applications', 
	'Businesses are increasingly recognizing the value of connecting with their customers on a more personal level. Companies can utilize social networking to transition from "Big Faceless Corporation" to "Friend" by taking their wares to the online communities where their customers are. In this age of social media, those communities are found at social network sites such as Facebook, Twitter, and LinkedIn. In this session, you%27ll learn how to build Spring-based applications that interact with the various social networks. We%27ll talk about new features in the Spring portfolio to support integration with social networks as well as how to start building social features into your own applications.', 
	'2010-10-20', '2010-10-20', 2, 1, 1, '#s12gxcs1');
@@ -1,22 +1,40 @@
 insert into Member (firstName, lastName, email, password, username) values ('Keith' , 'Donald', 'kdonald@vmware.com', 'melbourne', 'kdonald');
 insert into Member (firstName, lastName, email, password, username) values ('Craig' , 'Walls', 'craig@habuma.com', 'plano', 'habuma');
 insert into Member (firstName, lastName, email, password, username) values ('Roy', 'Clarkson', 'rclarkson@vmware.com', 'atlanta', 'rclarkson');
+insert into Member (firstName, lastName, email, password, username) values ('Jeremy', 'Grelle', 'jgrelle@vmware.com', 'churchkeys', 'jgrelle');
 
 insert into App (consumerKey, name, description, website, callbackUrl, secret, owner) values ('a08318eb478a1ee31f69a55276f3af64', 'Greenhouse for the iPhone', 'Awesome', 'http://www.springsource.com', 'x-com-springsource-greenhouse://oauth-response', '80e7f8f7ba724aae9103f297e5fb9bdf', 2);
 
 insert into Update (text, updateTimestamp, member) values ('Keith Donald signed up', 1278019179970, 1);
 insert into Update (text, updateTimestamp, member) values ('Craig Walls signed up', 1278017173970, 2);
 insert into Update (text, updateTimestamp, member) values ('Roy Clarkson signed up', 1274015177470, 3);
 
-insert into MemberGroup (publicId, name, description, hashtag, leader) values ('SpringOne', 'SpringOne', 'The premier Spring Framework event.', '#springone', 1);
+insert into MemberGroup (name, description, profileKey, searchString, leader) values ('SpringOne2gx', 'The premier event for Spring technologies', 'springone2gx', '#springone2gx', 1);
 
-insert into Event (publicId, title, description, startTime, endTime, location, memberGroup, hashtag) values ('springone_2gx', 'SpringOne/2GX', 
-    'SpringOne 2GX is a one-of-a-kind conference for application developers, solution architects, web operations and IT teams who develop, deploy and manage business applications.', 
-    '2010-10-19', '2010-10-22', 'Chicago, IL', 1, '#springone2gx');
+insert into Event (title, startDate, endDate, location, description, memberGroup) values ('SpringOne/2GX', '2010-10-19', '2010-10-22', 'SpringOne 2GX is a one-of-a-kind conference for application developers, solution architects, web operations and IT teams who develop, deploy and manage business applications.', 'Chicago, IL', 1);
 
-insert into EventTrack (name, description, chair, event) values ('Core Spring', 'The low-down on the core Spring Framework', 1, 1);
+insert into EventTrack (name, description, chair, event) values ('Essential Spring', 'Spring techniques and technologies applicable to most classes of applications', 2, 1);
+insert into EventTrack (name, description, chair, event) values ('Web Application Development', 'What you need to know to build rich web applications', 1, 1);
 
-insert into EventSession (code, title, description, startTime, endTime, speaker, event, track, hashtag) values ('CS1', 
-	'Developing Social-Ready Web Applications', 
-	'Businesses are increasingly recognizing the value of connecting with their customers on a more personal level. Companies can utilize social networking to transition from "Big Faceless Corporation" to "Friend" by taking their wares to the online communities where their customers are. In this age of social media, those communities are found at social network sites such as Facebook, Twitter, and LinkedIn. In this session, you%27ll learn how to build Spring-based applications that interact with the various social networks. We%27ll talk about new features in the Spring portfolio to support integration with social networks as well as how to start building social features into your own applications.', 
-	'2010-10-20', '2010-10-20', 2, 1, 1, '#s12gxcs1');
+insert into EventSession (code, title, startTime, endTime, description, event, track) values (201, 
+	'Mastering MVC 3', '2010-10-20 12:45:00', '2010-10-20 14:15:00',
+	'A deep-dive into the latest capabilities of Spring MVC, Spring%27s REST-ful web application development platform.', 1, 2);
+insert into EventSessionLeader (session, leader) values (201, 1);
+
+insert into EventSession (code, title, startTime, endTime, description, event, track) values (202, 
+	'Inside Web Flow 3 Development', '2010-10-20 14:45:00', '2010-10-20 16:15:00',
+	'A look inside the development of Spring Web Flow 3, the next-generation version of Spring%27s stateful controller framework for orchestrating multi-step user dialogs.', 1, 2);
+insert into EventSessionLeader (session, leader) values (202, 1);
+
+insert into EventSession (code, title, startTime, endTime, description, event, track) values (203, 
+	'Developing Social-Ready Web Applications', '2010-10-21 12:45:00', '2010-10-21 14:15:00',
+	'Businesses are increasingly recognizing the value of connecting with their customers on a more personal level. Companies can utilize social networking to transition from "Big Faceless Corporation" to "Friend" by taking their wares to the online communities where their customers are. In this age of social media, those communities are found at social network sites such as Facebook, Twitter, and LinkedIn. In this session, you%27ll learn how to build Spring-based applications that interact with the various social networks. We%27ll talk about new features in the Spring portfolio to support integration with social networks as well as how to start building social features into your own applications.',
+	1, 2);
+insert into EventSessionLeader (session, leader) values (203, 2);
+	
+insert into EventSession (code, title, startTime, endTime, description, event, track) values (204, 
+	'Choices in Moble Application Development', '2010-10-21 14:45:00', '2010-10-21 16:15:00',
+	'With the rising prevalence of advanced mobile platforms such as iPhone, Android, and Web OS, the desire for rich mobile clients as another means of accessing enterprise services is becoming something that can no longer be ignored. In this session, we will explore the current mobile development landscape and discuss what you as a Spring developer can do to support this increasingly important paradigm. We will examine the benefits and tradeoffs of native mobile client development vs. web-based mobile client development, and we will explore some of the emerging cross-platform options such as PhoneGap. We will look at the various strategies for utilizing a Spring back-end with these mobile platforms, such as consumption of RESTful services, authentication and authorization via OAuth, and server-push style messaging.',
+	1, 2);
+insert into EventSessionLeader (session, leader) values (204, 3);
+insert into EventSessionLeader (session, leader) values (204, 4);
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fwebapp%2FWEB-INF%2Fdatabase%2Fdata.sql
2cb87388858bee61bb303668d7c3531465aa47ed
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fwebapp%2FWEB-INF%2Fdatabase%2Fschema-event.sql
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Fmain%2Fwebapp%2FWEB-INF%2Fdatabase%2Fschema-event.sql?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/main/webapp/WEB-INF/database/schema-event.sql
					profileKey varchar unique,					
					searchString varchar,
					startDate date,
					endDate date,
					description varchar,
create table EventSession (code smallint,
					description varchar,
					foreign key (track) references EventTrack(id));

create table EventSessionLeader (session smallint not null,
					leader bigint not null,
					primary key (session, leader),
					foreign key (session) references EventSession(code),
					foreign key (leader) references Member(id));	
					publicId varchar not null,
					hashtag varchar,
					publicId varchar not null,
					description varchar,
					startTime timestamp,
					endTime timestamp,
					hashtag varchar,
create table EventSession (code varchar,
					description varchar,
					speaker bigint not null,
					hashtag varchar,
					foreign key (speaker) references Member(id),
					foreign key (track) references EventTrack(id));
@@ -1,21 +1,19 @@
 create table MemberGroup (id identity,
-					publicId varchar not null,
 					name varchar not null,
 					description varchar,
-					hashtag varchar,
+					profileKey varchar unique,					
+					searchString varchar,
 					leader bigint not null,
 					primary key (id),
 					foreign key (leader) references Member(id));
 					
 create table Event (id identity,
-					publicId varchar not null,
 					title varchar not null,
-					description varchar,
-					startTime timestamp,
-					endTime timestamp,
+					startDate date,
+					endDate date,
 					location varchar,
+					description varchar,
 					memberGroup bigint not null,
-					hashtag varchar,
 					primary key (id),
 					foreign key (memberGroup) references MemberGroup(id));
 
@@ -28,16 +26,19 @@ create table EventTrack (id identity,
 					foreign key (chair) references Member(id),
 					foreign key (event) references Event(id));
 
-create table EventSession (code varchar,
+create table EventSession (code smallint,
 					title varchar not null,
-					description varchar,
 					startTime timestamp,
 					endTime timestamp,
-					speaker bigint not null,
+					description varchar,
 					event bigint not null,
 					track bigint,
-					hashtag varchar,
 					primary key (code, event),
-					foreign key (speaker) references Member(id),
 					foreign key (event) references Event(id),
-					foreign key (track) references EventTrack(id));
\ No newline at end of file
+					foreign key (track) references EventTrack(id));
+
+create table EventSessionLeader (session smallint not null,
+					leader bigint not null,
+					primary key (session, leader),
+					foreign key (session) references EventSession(code),
+					foreign key (leader) references Member(id));	
\ No newline at end of file
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Fmain%2Fwebapp%2FWEB-INF%2Fdatabase%2Fschema-event.sql
db1f05bbf20aad6ceeae5bf29591f916d7c8b2ab
modified
https://github.com/spring-attic/greenhouse/blob/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Ftest%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fmembers%2FMembersControllerTest.java
https://api.github.com/repos/spring-attic/greenhouse/contents/src%2Ftest%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fmembers%2FMembersControllerTest.java?ref=26132fb65137f90d5223bf5bddc0c7a296577aec
src/test/java/com/springsource/greenhouse/members/MembersControllerTest.java
    	MemberRepository membersService = new JdbcMemberRepository(jdbcTemplate);
    	MembersService membersService = new DefaultMembersService(jdbcTemplate);
@@ -27,7 +27,7 @@ public void setup() {
     			new FileSystemResource("src/main/webapp/WEB-INF/database/schema-member.sql"),
     			new ClassPathResource("MembersControllerTest.sql", getClass()));
     	jdbcTemplate = new JdbcTemplate(db);
-    	MembersService membersService = new DefaultMembersService(jdbcTemplate);
+    	MemberRepository membersService = new JdbcMemberRepository(jdbcTemplate);
     	controller = new MembersController(membersService);
     }
     
https://github.com/spring-attic/greenhouse/raw/26132fb65137f90d5223bf5bddc0c7a296577aec/src%2Ftest%2Fjava%2Fcom%2Fspringsource%2Fgreenhouse%2Fmembers%2FMembersControllerTest.java
3888305c5d402662e0d78753f131c08e90c46f83
modified
spring-projects$greenhouse
Model model
model.addAttribute(eventRepository.findUpcomingEvents());
		return "events/list";
String
String upcomingEventsView(Model model)
Model model
model.addAttribute(eventsService.findEventsAfter(new Date()));
		return "events/list";
	@RequestMapping(value="/{eventId
String
String listEvents(Model model)