Skip to content
Michael Le edited this page Nov 25, 2017 · 10 revisions

User Service

  • Methods encapsulating DAO logic: createUser, updateUser, removeUser, getAllUsers, getUserById, getUserByUsername
  • Business logic methods:
    • authenticate - checks if given username and password hash is valid
    • isAdmin - checks if given user is an administrator

Channel Service

  • Methods encapsulating DAO logic: createChannel, updateChannel, removeChannel, getAllChannels, getChannelById, getChannelByName, getChannelsByType

Transmission Service

This service covers both Transmission and Transmission Occurrences. The reason is Transmission Occurrence is an integral part of Transmission and cannot, in business logic, exist separately.

  • Methods encapsulating DAO logic: createTransmission, updateTransmission, removeTransmission, getTransmissionById, getTransmissionByName, getTransmissionsByType
  • Methods encapsulating DAO logic for Transmission Occurrences: addOccurrence, updateOccurrence, removeOccurrence
  • Business logic methods:
    • getOccurrences - gets all occurrences of the transmission, incl. occurrences in history
    • getUpcomingOccurrences - gets all upcoming occurrences of the transmission
    • getVotings - gets all votings for the transmission
    • getAverageVoting - gets average numeric voting for the transmission

Voting Service

  • Methods encapsulating DAO logic: createVoting, updateVoting, removeVoting, getVotingsByTransmission, getVotingsByUser

Favorite Channels Service

  • Business logic methods:
    • followChannel - add channel to user favorites
    • unfollowChannel - remove channel from user favorites
    • getFavoriteChannels - get all users favorite channels

Favorite Transmissions Service

  • Business logic methods:
    • followTransmission
    • unfollowTransmission
    • getFavoriteTransmissionsByUser
    • getUpcomingFavoriteTransmissionsByUser - get upcoming favorite transmissions (maximum time span shall be specified)

Schedule Service

  • Business logic methods:
    • getSchedule - get schedule for specified list of channel and specified date time range

Helper Services

  • ObjectMapperService - maps one object to another (for DAO <-> DTO)
  • DateTimeService - for getting date time rather than by direct usage of LocalDateTime, for better testability
  • StatisticsService - calculates simple statistics, for more complex business functionality demonstration