created FavouriteRecipeMessage class
This commit is contained in:
parent
397bbedd9f
commit
a5ec17e486
2 changed files with 37 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
||||||
|
package commons.ws.messages;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Message sent when a recipe becomes a favourite.
|
||||||
|
* @see commons.ws.messages.Message.Type#RECIPE_FAVOURITE
|
||||||
|
*/
|
||||||
|
public class FavouriteRecipeMessage implements Message{
|
||||||
|
|
||||||
|
private long recipeId;
|
||||||
|
|
||||||
|
public FavouriteRecipeMessage(long recipeId) {
|
||||||
|
this.recipeId = recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type getType() {
|
||||||
|
return Type.RECIPE_FAVOURITE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the ID of the recipe that got favourite.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getRecipeId() {
|
||||||
|
return recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -23,6 +23,15 @@ public interface Message {
|
||||||
*/
|
*/
|
||||||
RECIPE_DELETE,
|
RECIPE_DELETE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Message sent when a recipe became a favourite.
|
||||||
|
*
|
||||||
|
* @see commons.ws.messages.FavouriteRecipeMessage
|
||||||
|
*/
|
||||||
|
|
||||||
|
RECIPE_FAVOURITE,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Message sent when a new ingredient is created.
|
* Message sent when a new ingredient is created.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue