@RolesAllowed(value={"ADMIN","USER"}) public class PlayerService extends Object
| Constructor and Description |
|---|
PlayerService() |
| Modifier and Type | Method and Description |
|---|---|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player |
create(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
Creates a new player
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player |
createProfile(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
Creates a new player profile
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player |
findProfile(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
Find a user's profile
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player |
get(int id)
Returns the player identified by
id. |
List<es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player> |
getByAdmin(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User admin)
Gets the players managed by a given user.
|
List<es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player> |
list()
Returns the complete list of players
|
void |
remove(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
Deletes an player.
|
void |
removeProfile(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
Delete a user's profile of a user
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player |
update(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
Updates the information of this player.
|
public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player create(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
player - a new player to be storedIllegalArgumentException - if player is nullpublic es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player createProfile(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
player - a new player profile to be storedIllegalArgumentException - if player is null or this user already has
profilepublic es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player get(int id)
id. If there is no player with the
specified id, null will be returned.id - the id of an player.null if there is no player
with the specified id.IllegalArgumentException - if id is null or it does not identifies a valid
player.public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player update(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
player - a player to be updated.IllegalArgumentException - if player is null.public void remove(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
player - the player to be deleted.IllegalArgumentException - if player if null.public void removeProfile(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player player)
player - the profile of the player to be eliminatedpublic List<es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player> list()
public List<es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player> getByAdmin(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User admin)
admin - the user that manages the playersjavax.ejb.EJBAccessException - if the players admin is not the current user.IllegalArgumentException - if admin is null.public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.Player findProfile(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
user - the user to search the profilenull if there is no such
profileCopyright © 2018. All rights reserved.