View Javadoc

1   package org.springframework.security.oauth.examples.sparklr;
2   
3   import java.io.InputStream;
4   import java.util.Collection;
5   
6   /**
7    * Service for retrieving photos.
8    * 
9    * @author Ryan Heaton
10   */
11  public interface PhotoService {
12  
13    /**
14     * Load the photos for the current user.
15     *
16     * @return The photos for the current user.
17     */
18    Collection<PhotoInfo> getPhotosForCurrentUser(String username);
19  
20    /**
21     * Load a photo by id.
22     * 
23     * @param id The id of the photo.
24     * @return The photo that was read.
25     */
26    InputStream loadPhoto(String id);
27  }