Examples of MovieRentalService


Examples of com.almilli.movierentals.MovieRentalService

            queueList.clear();
        }
    }
   
    protected void loadData() {
        MovieRentalService service = getService();
       
        try {
            queueList.addAll(service.getMovieQueue());
            queueList.setFocus(0, false);
            queueList.flush();
           
        } catch (IOException e) {
            log.error("An error occurred when retrieving the queue.");
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

        queueList.setMoveMode(false);
        return super.handleEnter(arg, isReturn);
    }
   
    public void saveOrder() {
        MovieRentalService service = getService();
       
        List<MovieItem> queue = new ArrayList<MovieItem>();
       
        int size = queueList.size();
        for (int i=0; i < size; i++) {
            MovieItem item = (MovieItem)queueList.get(i);
            queue.add(item);
        }
        try {
            service.updateQueueOrder(queue);
            queueList.clearModified();
        } catch (IOException e) {
            log.error("An error occurred when saving the queue order.");
        }
    }
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

        loadData(true);
    }
   
    protected void loadData(boolean fullDetails) {
        if (fullDetails) {// && !movieItem.containsDetail(MovieItem.DETAIL_MEDIUM)) {
            MovieRentalService service = getService();
            try {
                service.getMoreMovieDetails(movieItem);
            } catch (IOException e) {
                if (log.isEnabledFor(Level.WARN)) {
                    log.warn("Cannot find details for movieId=" + movieItem.getMovieId(), e);
                }
            }
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

  }
   
    protected void saveRating() {
        if (ratingUp != null) {
            //the rating was modified, save it
            MovieRentalService service = getService();
            if (service.supportsFeature(ServiceFeature.movieRating)) {

                try {
                    service.updateMovieRating(this.movieItem);

                    //post a modification event
                    owner.postEvent(new BEvent.Action(this, "modifiedData"));
                   
                } catch (IOException e) {
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

            ratings.setRating(movieItem.getRating(), false);
        }
    }
 
  protected void addMovieItem(MovieItem item) {
        MovieRentalService service = getService();
        try {
      service.addToMovieQueue(item);
    } catch (IOException e) {
      log.error("Cannot add movie item to queue: " + item, e);
     
      //show an error screen
      MessageScreen screen = new MessageScreen((MovieRentalApplication)getBApp());
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

      getBApp().push(screen, TRANSITION_NONE);
    }
  }
 
  protected void removeMovieItem(MovieItem item) {
        MovieRentalService service = getService();
        try {
      service.deleteFromMovieQueue(this.movieItem);
           
            //post a modification event
            owner.postEvent(new BEvent.Action(this, "modifiedQueue"));
           
    } catch (IOException e) {
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

      return list;
    }

    @SuppressWarnings("unchecked")
    public List<MovieItem> getMovieItemList() {
        MovieRentalService service = getService();
        try {
            return service.getShippedList();
        } catch (IOException e) {
            log.warn("Cannot retrieve shipped titles list.", e);
            return Collections.EMPTY_LIST;
        }
    }
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

        super(app, RESOURCES.getString("topRentals.title"), false);
    }

    @SuppressWarnings("unchecked")
    public List<MovieItem> getMovieItemList() {
        MovieRentalService service = getService();
        try {
            return service.getTopRentals();
        } catch (IOException e) {
            log.warn("Cannot retrieve top rentals list.", e);
            return Collections.EMPTY_LIST;
        }
    }
View Full Code Here

Examples of com.almilli.movierentals.MovieRentalService

        super(app, RESOURCES.getString("newReleases.title"), false);
    }

    @SuppressWarnings("unchecked")
    public List<MovieItem> getMovieItemList() {
        MovieRentalService service = getService();
        try {
            return service.getNewReleases();
        } catch (IOException e) {
            log.warn("Cannot retrieve new releases list.", e);
            return Collections.EMPTY_LIST;
        }
    }
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.