Android Open Source - YesNoGame I Poll Service






From Project

Back to project page YesNoGame.

License

The source code is released under:

GNU General Public License

If you think the Android project YesNoGame listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package example.swa.yesnogame.service;
// www .j ava 2  s .c  o  m
import java.util.Collection;
import java.util.List;

import example.swa.yesnogame.domain.Poll;
import example.swa.yesnogame.domain.User;
import example.swa.yesnogame.domain.Vote;

/**
 * Definition for an asynchronous data service to retrieve users, polls and
 * votes.
 * 
 * @author Hendrik.Stilke@siemens.com
 * 
 */
public interface IPollService {

  /**
   * Callback listener for the "closePoll" method.
   */
  public interface IClosePollListener {
    void onPollClosed(Poll poll);
  }

  /**
   * Callback listener for the "createPoll" method.
   */
  public interface ICreatePollListener {
    void onPollCreated(Poll poll);
  }

  /**
   * Callback listener for the "createUser" method.
   */
  public interface ICreateUserListener {
    void onUserCreated(User user);
  }

  /**
   * Callback listener for the "createVote" method.
   */
  public interface ICreateVoteListener {
    void onVoteCreated(Vote vote);
  }

  /**
   * Callback listener for the "findPoll" method.
   */
  public interface IFindPollListener {
    void onPollFound(Poll poll);
  }

  /**
   * Callback listener for the "findPolls" method.
   */
  public interface IFindPollsListener {
    void onPollsFound(Collection<Poll> polls);
  }

  /**
   * Callback listener for the "findUser" method.
   */
  public interface IFindUserListener {
    void onUserFound(User user);
  }

  /**
   * Callback listener for the "findUsers" method.
   */
  public interface IFindUsersListener {
    void onUsersFound(Collection<User> users);
  }

  /**
   * Callback listener for the "findVote" method.
   */
  public interface IFindVoteListener {
    void onVoteFound(Vote vote);
  }

  /**
   * Callback listener for the "findVotesByPoll" method.
   */
  public interface IFindVotesByPollListener {
    void onVotesFound(List<Vote> votes);
  }

  /**
   * Async call. Close the poll.
   */
  void closePoll(Poll poll, IClosePollListener listener);

  /**
   * Async call. Create a poll.
   */
  void createPoll(Poll poll, ICreatePollListener listener);

  /**
   * Async call. Create a new user.
   */
  void createUser(User user, ICreateUserListener listener);

  /**
   * Async call. Create a vote.
   */
  void createVote(Vote vote, ICreateVoteListener listener);

  /**
   * Async call. Find a poll.
   */
  void findPoll(Long pollId, IFindPollListener listener);

  /**
   * Async call. Find all polls.
   */
  void findPolls(IFindPollsListener listener);

  /**
   * Async call. Find a user.
   */
  void findUser(Long userId, IFindUserListener listener);

  /**
   * Async call. Find a user by name.
   */
  void findUser(String name, IFindUserListener listener);

  /**
   * Async call. Find all users.
   */
  void findUsers(IFindUsersListener listener);

  /**
   * Async call. Find a vote.
   */
  void findVote(Long userId, Long pollId, IFindVoteListener listener);

  /**
   * Async call. Find votes by poll id.
   */
  void findVotesByPoll(Long pollId, IFindVotesByPollListener listener);

}




Java Source Code List

example.swa.yesnogame.BaseActivity.java
example.swa.yesnogame.InitPollActivity.java
example.swa.yesnogame.MainActivity.java
example.swa.yesnogame.PollResultActivity.java
example.swa.yesnogame.VoteActivity.java
example.swa.yesnogame.domain.Poll.java
example.swa.yesnogame.domain.User.java
example.swa.yesnogame.domain.Vote.java
example.swa.yesnogame.domain.dto.PollSimpleDto.java
example.swa.yesnogame.domain.dto.UserSimpleDto.java
example.swa.yesnogame.domain.dto.VoteSimpleDto.java
example.swa.yesnogame.domain.simple.BaseObject.java
example.swa.yesnogame.domain.simple.PollSimple.java
example.swa.yesnogame.domain.simple.UserSimple.java
example.swa.yesnogame.domain.simple.VoteSimple.java
example.swa.yesnogame.domain.util.PollComparator.java
example.swa.yesnogame.domain.util.VoteComparator.java
example.swa.yesnogame.service.IPollService.java
example.swa.yesnogame.service.PollServiceBase.java
example.swa.yesnogame.service.PollServiceCloud.java
example.swa.yesnogame.service.PollServiceMock.java
example.swa.yesnogame.service.PollServiceProvider.java
example.swa.yesnogame.service.PollService.java
example.swa.yesnogame.service.util.EntityFormatEnum.java
example.swa.yesnogame.service.util.RequestMethodEnum.java
example.swa.yesnogame.service.util.RequestUrlParams.java
example.swa.yesnogame.service.util.RequestUrlTask.java
example.swa.yesnogame.ui.YesNoArrayAdapter.java