@Path(value="teams") @Consumes(value="application/json") @Produces(value="application/json") public class TeamResource extends Object
| Constructor and Description |
|---|
TeamResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
create(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
Creates a new team.
|
javax.ws.rs.core.Response |
delete(String name)
Deletes a team.
|
javax.ws.rs.core.Response |
get()
Returns all teams.
|
javax.ws.rs.core.Response |
getByLocation(String location)
Return the teams that belong to the provided location.
|
javax.ws.rs.core.Response |
getByName(String name)
Returns the team identified by the name.
|
javax.ws.rs.core.Response |
getBySport(String sport)
Return the teams that belong to the provided sport.
|
javax.ws.rs.core.Response |
update(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
Updates the information of a team.
|
@GET public javax.ws.rs.core.Response get()
OK response containing all teams.@Path(value="{name}")
@GET
public javax.ws.rs.core.Response getByName(@PathParam(value="name")
String name)
name - the identified of a team.OK response containing the Team with the
provided identifier.@Path(value="{sport}")
@GET
public javax.ws.rs.core.Response getBySport(@PathParam(value="sport")
String sport)
sport - the sport name to realize the searchingOK response containing the list of teams belong to the
provided sport.@Path(value="{location}")
@GET
public javax.ws.rs.core.Response getByLocation(@PathParam(value="location")
String location)
location - the location name to realize the searchingOK response containing the list of teams belong to the
provided location.@POST
public javax.ws.rs.core.Response create(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
throws SecurityException
team - a new team to be stored.CREATED response with the URI of the new team in the
Location header.IllegalArgumentException - if team is null.SecurityException@PUT
public javax.ws.rs.core.Response update(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
throws SecurityException
team - a team to be updated.OK response.IllegalArgumentException - if team is null.SecurityException@Path(value="{name}")
@DELETE
public javax.ws.rs.core.Response delete(@PathParam(value="name")
String name)
throws SecurityException
name - of the team to be deleted.SecurityExceptionCopyright © 2018. All rights reserved.