Package usecase.vote
Class VoteService
- java.lang.Object
-
- usecase.vote.VoteService
-
@ApplicationScoped public class VoteService extends Object
Classe che fornisce i servizi relativi ai voti.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVoteService()protectedVoteService(GenericRepository genericRepository, CurrentUser currentUser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddownvoteComment(int id)Aggiunge un voto negativo ad un commentovoiddownvotePost(int id)Aggiunge un voto negativo ad un postvoidunvoteComment(int id)Rimuove il voto ad un commentovoidunvotePost(int id)Rimuove il voto ad un postvoidupvoteComment(int id)Aggiunge un voto positivo ad un commentovoidupvotePost(int id)Aggiunge un voto positivo ad un post
-
-
-
Constructor Detail
-
VoteService
protected VoteService()
-
VoteService
@Inject protected VoteService(GenericRepository genericRepository, CurrentUser currentUser)
-
-
Method Detail
-
upvoteComment
@AuthenticationRequired public void upvoteComment(@CommentExists int id)
Aggiunge un voto positivo ad un commento- Parameters:
id- di un commento esistente
-
downvoteComment
@AuthenticationRequired public void downvoteComment(@CommentExists int id)
Aggiunge un voto negativo ad un commento- Parameters:
id- di un commento esistente
-
upvotePost
@AuthenticationRequired public void upvotePost(@PostExists int id)
Aggiunge un voto positivo ad un post- Parameters:
id- di un post esistente
-
downvotePost
@AuthenticationRequired public void downvotePost(@PostExists int id)
Aggiunge un voto negativo ad un post- Parameters:
id- di un post esistente
-
unvoteComment
@AuthenticationRequired public void unvoteComment(@CommentExists int id)
Rimuove il voto ad un commento- Parameters:
id- di un commento esistente
-
unvotePost
@AuthenticationRequired public void unvotePost(@PostExists int id)
Rimuove il voto ad un post- Parameters:
id- di un post esistente
-
-