C# Class BB.BL.PlaylistManager

Inheritance: IPlaylistManager
Show file Open project: BeatBuddy/beatbuddy_webapp Class Usage Examples

Public Methods

Method Description
AddTrackToPlaylist ( long playlistId, Track track ) : Track
CheckIfReachedMaximumVotes ( long userId, long trackId ) : bool
CheckIfUserCreatedPlaylist ( long playlistId, long userId ) : bool
CreateComment ( long playlistId, string text, string userEmail ) : Comment
CreatePlaylistForOrganisation ( string name, string description, string key, int maxVotesPerUser, bool active, string imageUrl, User createdBy, long organisationId ) : Playlist
CreatePlaylistForUser ( string name, string description, string key, int maxVotesPerUser, bool active, string imageUrl, User createdBy ) : Playlist
CreateVote ( int score, long userId, long trackId ) : Vote
DeletePlaylist ( long playlistId ) : Playlist
DeletePlaylistTrack ( long playlistTrackId ) : void
DeleteVote ( Vote vote ) : void
DeleteVote ( long voteId ) : void
DeleteVote ( long playlistTrackId, long userId ) : void
MarkTrackAsPlayed ( long playlistTrackId, long playlistId ) : bool
PlaylistManager ( IPlaylistRepository playlistRepository, IUserRepository userRepo ) : System
ReadComments ( Playlist playlist ) : IEnumerable
ReadPlaylist ( long playlistId ) : Playlist
ReadPlaylist ( string name ) : Playlist
ReadPlaylistByKey ( string key ) : Playlist
ReadPlaylistTrack ( long playlistTrackId ) : PlaylistTrack
ReadPlaylists ( ) : IEnumerable
ReadPlaylists ( long userId ) : IEnumerable
ReadPlaylistsForUser ( long userId ) : IEnumerable
ReadTrack ( long trackId ) : Track
ReadTracks ( ) : IEnumerable
ReadVotesForUser ( User user ) : IEnumerable
UpdatePlayListTrack ( PlaylistTrack playlistTrack ) : PlaylistTrack
UpdatePlaylist ( Playlist playlist ) : Playlist
UpdatePlaylist ( Playlist playlist, string email ) : Playlist
UpdateVote ( Vote vote ) : Vote

Method Details

AddTrackToPlaylist() public method

public AddTrackToPlaylist ( long playlistId, Track track ) : Track
playlistId long
track BB.BL.Domain.Playlists.Track
return BB.BL.Domain.Playlists.Track

CheckIfReachedMaximumVotes() public method

public CheckIfReachedMaximumVotes ( long userId, long trackId ) : bool
userId long
trackId long
return bool

CheckIfUserCreatedPlaylist() public method

public CheckIfUserCreatedPlaylist ( long playlistId, long userId ) : bool
playlistId long
userId long
return bool

CreateComment() public method

public CreateComment ( long playlistId, string text, string userEmail ) : Comment
playlistId long
text string
userEmail string
return BB.BL.Domain.Playlists.Comment

CreatePlaylistForOrganisation() public method

public CreatePlaylistForOrganisation ( string name, string description, string key, int maxVotesPerUser, bool active, string imageUrl, User createdBy, long organisationId ) : Playlist
name string
description string
key string
maxVotesPerUser int
active bool
imageUrl string
createdBy BB.BL.Domain.Users.User
organisationId long
return BB.BL.Domain.Playlists.Playlist

CreatePlaylistForUser() public method

public CreatePlaylistForUser ( string name, string description, string key, int maxVotesPerUser, bool active, string imageUrl, User createdBy ) : Playlist
name string
description string
key string
maxVotesPerUser int
active bool
imageUrl string
createdBy BB.BL.Domain.Users.User
return BB.BL.Domain.Playlists.Playlist

CreateVote() public method

public CreateVote ( int score, long userId, long trackId ) : Vote
score int
userId long
trackId long
return BB.BL.Domain.Playlists.Vote

DeletePlaylist() public method

public DeletePlaylist ( long playlistId ) : Playlist
playlistId long
return BB.BL.Domain.Playlists.Playlist

DeletePlaylistTrack() public method

public DeletePlaylistTrack ( long playlistTrackId ) : void
playlistTrackId long
return void

DeleteVote() public method

public DeleteVote ( Vote vote ) : void
vote BB.BL.Domain.Playlists.Vote
return void

DeleteVote() public method

public DeleteVote ( long voteId ) : void
voteId long
return void

DeleteVote() public method

public DeleteVote ( long playlistTrackId, long userId ) : void
playlistTrackId long
userId long
return void

MarkTrackAsPlayed() public method

public MarkTrackAsPlayed ( long playlistTrackId, long playlistId ) : bool
playlistTrackId long
playlistId long
return bool

PlaylistManager() public method

public PlaylistManager ( IPlaylistRepository playlistRepository, IUserRepository userRepo ) : System
playlistRepository IPlaylistRepository
userRepo IUserRepository
return System

ReadComments() public method

public ReadComments ( Playlist playlist ) : IEnumerable
playlist BB.BL.Domain.Playlists.Playlist
return IEnumerable

ReadPlaylist() public method

public ReadPlaylist ( long playlistId ) : Playlist
playlistId long
return BB.BL.Domain.Playlists.Playlist

ReadPlaylist() public method

public ReadPlaylist ( string name ) : Playlist
name string
return BB.BL.Domain.Playlists.Playlist

ReadPlaylistByKey() public method

public ReadPlaylistByKey ( string key ) : Playlist
key string
return BB.BL.Domain.Playlists.Playlist

ReadPlaylistTrack() public method

public ReadPlaylistTrack ( long playlistTrackId ) : PlaylistTrack
playlistTrackId long
return BB.BL.Domain.Playlists.PlaylistTrack

ReadPlaylists() public method

public ReadPlaylists ( ) : IEnumerable
return IEnumerable

ReadPlaylists() public method

public ReadPlaylists ( long userId ) : IEnumerable
userId long
return IEnumerable

ReadPlaylistsForUser() public method

public ReadPlaylistsForUser ( long userId ) : IEnumerable
userId long
return IEnumerable

ReadTrack() public method

public ReadTrack ( long trackId ) : Track
trackId long
return BB.BL.Domain.Playlists.Track

ReadTracks() public method

public ReadTracks ( ) : IEnumerable
return IEnumerable

ReadVotesForUser() public method

public ReadVotesForUser ( User user ) : IEnumerable
user BB.BL.Domain.Users.User
return IEnumerable

UpdatePlayListTrack() public method

public UpdatePlayListTrack ( PlaylistTrack playlistTrack ) : PlaylistTrack
playlistTrack BB.BL.Domain.Playlists.PlaylistTrack
return BB.BL.Domain.Playlists.PlaylistTrack

UpdatePlaylist() public method

public UpdatePlaylist ( Playlist playlist ) : Playlist
playlist BB.BL.Domain.Playlists.Playlist
return BB.BL.Domain.Playlists.Playlist

UpdatePlaylist() public method

public UpdatePlaylist ( Playlist playlist, string email ) : Playlist
playlist BB.BL.Domain.Playlists.Playlist
email string
return BB.BL.Domain.Playlists.Playlist

UpdateVote() public method

public UpdateVote ( Vote vote ) : Vote
vote BB.BL.Domain.Playlists.Vote
return BB.BL.Domain.Playlists.Vote