View Javadoc

1   package org.springframework.security.oauth.examples.tonr.mvc;
2   
3   import org.springframework.security.oauth.examples.tonr.GoogleService;
4   import org.springframework.stereotype.Controller;
5   import org.springframework.ui.Model;
6   import org.springframework.web.bind.annotation.RequestMapping;
7   
8   /**
9    * @author Ryan Heaton
10   * @author Dave Syer
11   */
12  @Controller
13  public class PicasaController {
14  
15  	private GoogleService googleService;
16  
17  	@RequestMapping("/google/picasa")
18  	public String photos(Model model) throws Exception {
19  		model.addAttribute("photoUrls", googleService.getLastTenPicasaPictureURLs());
20  		return "picasa";
21  	}
22  
23  	public void setGoogleService(GoogleService googleService) {
24  		this.googleService = googleService;
25  	}
26  }