@Path(value="regions")
public class RegionsWebResource
extends org.onosproject.rest.AbstractWebResource
| Constructor and Description |
|---|
RegionsWebResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addDevices(String regionId,
InputStream stream)
Adds the specified collection of devices to the region.
|
javax.ws.rs.core.Response |
createRegion(InputStream stream)
Creates a new region using the supplied JSON input stream.
|
javax.ws.rs.core.Response |
getRegionById(String regionId)
Returns the region with the specified identifier.
|
javax.ws.rs.core.Response |
getRegionDevices(String regionId)
Returns the set of devices that belong to the specified region.
|
javax.ws.rs.core.Response |
getRegions()
Returns set of all regions.
|
javax.ws.rs.core.Response |
removeDevices(String regionId,
InputStream stream)
Removes the specified collection of devices from the region.
|
javax.ws.rs.core.Response |
removeRegion(String regionId)
Removes the specified region using the given region identifier.
|
javax.ws.rs.core.Response |
updateRegion(String regionId,
InputStream stream)
Updates the specified region using the supplied JSON input stream.
|
codec, encodeArray, getService, mapper, newArray, newObject@GET @Produces(value="application/json") public javax.ws.rs.core.Response getRegions()
@GET
@Produces(value="application/json")
@Path(value="{regionId}")
public javax.ws.rs.core.Response getRegionById(@PathParam(value="regionId")
String regionId)
regionId - region identifier@GET
@Produces(value="application/json")
@Path(value="{regionId}/devices")
public javax.ws.rs.core.Response getRegionDevices(@PathParam(value="regionId")
String regionId)
regionId - region identifier@POST @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response createRegion(InputStream stream)
stream - region JSON stream@PUT
@Path(value="{regionId}")
@Consumes(value="application/json")
public javax.ws.rs.core.Response updateRegion(@PathParam(value="regionId")
String regionId,
InputStream stream)
regionId - region identifierstream - region JSON stream@DELETE
@Path(value="{regionId}")
public javax.ws.rs.core.Response removeRegion(@PathParam(value="regionId")
String regionId)
regionId - region identifier@POST
@Path(value="{regionId}/devices")
@Consumes(value="application/json")
@Produces(value="application/json")
public javax.ws.rs.core.Response addDevices(@PathParam(value="regionId")
String regionId,
InputStream stream)
regionId - region identifierstream - deviceIds JSON stream@DELETE
@Path(value="{regionId}/devices")
@Consumes(value="application/json")
public javax.ws.rs.core.Response removeDevices(@PathParam(value="regionId")
String regionId,
InputStream stream)
regionId - region identifierstream - deviceIds JSON stream