Examples of PicasawebService


Examples of com.google.gdata.client.photos.PicasawebService

  private PicasawebService picasawebService;

  @Override
  public PicasawebService getPicasawebService() {
    if (picasawebService == null) {
      picasawebService = new PicasawebService("vosao-cms");
      ConfigEntity config = VosaoContext.getInstance().getConfig();
      if (config.isEnablePicasa()) {
        try {
          picasawebService.setUserCredentials(config.getPicasaUser(),
            config.getPicasaPassword());
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

  private List<PhotoEntry> photos = null;

  private Date lastUpdate = new Date();

  public PicasaWebImpl() throws AuthenticationException{
    this.picasawebService = new PicasawebService("faycal-inajjarane.appspot.com");
    this.picasawebService.setUserCredentials(ApplicationConstants.PICASA_WEB_USERNAME, ApplicationConstants.PICASA_WEB_PASSWORD);
  }
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

    }

    private void initialize() {
        logger.log(Level.FINE, "Initializing Google services to retrieve Picasa photo stream");
        picasaService = new PicasawebService(APPLICATION_NAME);
        if(this.username != null & this.password != null) {
            logger.log(Level.FINE, "Authenticating user");
            try {
                picasaService.setUserCredentials(username, password);
            } catch (AuthenticationException e) {
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

  private DataChunkDao dataChunkDao = null;

  @Inject
  public PicasaApiHelper(AdminConfigDao adminConfigDao, AssignmentDao assignmentDao,
      DataChunkDao dataChunkDao) {
    this.service = new PicasawebService(Util.CLIENT_ID_PREFIX + SystemProperty.applicationId.get());
    this.util = Util.get();
    this.adminConfigDao = adminConfigDao;
    this.dataChunkDao = dataChunkDao;

    setAuthSubTokenFromConfig();
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

  private SpreadsheetService spreadsheetService;
  private PicasawebService photoService;

  public GDataDocumentsProxy() {
    this.documentsService = new DocsService("Avicena-v1");
    this.photoService = new PicasawebService("Avicena-v1");
    this.spreadsheetService = new SpreadsheetService("Avicena-v1");
  }
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

   * asks the user for their username and password.
   */
  public static void main(String[] args) throws Exception {

    try {
      PicasawebService service = new PicasawebService("exampleClient");

      String uname, passwd;
      if (args.length == 2) {
        uname = args[0];
        passwd = args[1];
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

    } else {
      uname = getString("Username");
      passwd = getString("Password");
    }

    PicasawebService service = new PicasawebService("gdata-PhotosPartialDemo");
    service.setUserCredentials(uname, passwd);

    PicasawebPartialDemo demo = new PicasawebPartialDemo(service);
    while (true) {
      try {
        demo.printMenu();
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

  public List<AlbumModel> loadAlbum(String userId) {

    List<AlbumModel> result = new ArrayList<AlbumModel>();

    try {
      PicasawebService service = new PicasawebService("Kirin-App");
      service.setAuthSubToken(this.getThreadLocalRequest().getSession().getAttribute("sessionToken").toString());

      URL feedUrl = new URL("https://picasaweb.google.com/data/feed/api/user/" + userId + "?kind=album");

      UserFeed userFeed = service.getFeed(feedUrl, UserFeed.class);
      AlbumModel albumModel = null;

      for (AlbumEntry albumEntry : userFeed.getAlbumEntries()) {
        albumModel = new AlbumModel();
        albumModel.setAlbumid(albumEntry.getGphotoId());
View Full Code Here

Examples of com.google.gdata.client.photos.PicasawebService

  @Override
  public List<PhotoModel> loadPhoto(String userId, String albumid) {
    List<PhotoModel> result = new ArrayList<PhotoModel>();
    try {
      PicasawebService service = new PicasawebService("Kirin-App");
      service.setAuthSubToken(this.getThreadLocalRequest().getSession().getAttribute("sessionToken").toString());
      URL feedUrl = new URL("https://picasaweb.google.com/data/feed/api/user/" + userId + "/albumid/" + albumid);
      AlbumFeed albumFeed = service.getFeed(feedUrl, AlbumFeed.class);
      PhotoModel photoModel = null;
      for (PhotoEntry photoEntry : albumFeed.getPhotoEntries()) {
        photoModel = new PhotoModel();
        photoModel.setTitle(photoEntry.getTitle().getPlainText());
        photoModel.setThumbURL((photoEntry.getMediaThumbnails().get(2).getUrl()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.