@Component @Path(value="/device") @Produces(value="application/json") public class DeviceResource extends Object
Constructor and Description |
---|
DeviceResource(org.ezand.telldus.core.repository.TelldusRepository repository,
org.springframework.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
Result<org.ezand.telldus.core.domain.Device> |
device(int id) |
Result<List<org.ezand.telldus.core.domain.Device>> |
devices() |
Result<org.ezand.telldus.core.domain.State<String>> |
dim(int id,
int level) |
Result<org.ezand.telldus.core.domain.State<?>> |
state(int id) |
Result<org.ezand.telldus.core.domain.State<org.ezand.telldus.core.util.RichBoolean>> |
turnOff(int id) |
Result<org.ezand.telldus.core.domain.State<org.ezand.telldus.core.util.RichBoolean>> |
turnOn(int id) |
@Inject public DeviceResource(org.ezand.telldus.core.repository.TelldusRepository repository, org.springframework.cache.CacheManager cacheManager)
@GET @Path(value="/{id:\\d*}") public Result<org.ezand.telldus.core.domain.Device> device(@PathParam(value="id") int id)
@Cacheable(value="stateCache") @GET @Path(value="/{id:\\d*}/state") public Result<org.ezand.telldus.core.domain.State<?>> state(@PathParam(value="id") int id)
@POST @Path(value="/{id:\\d*}/on") public Result<org.ezand.telldus.core.domain.State<org.ezand.telldus.core.util.RichBoolean>> turnOn(@PathParam(value="id") int id)
@POST @Path(value="/{id:\\d*}/off") public Result<org.ezand.telldus.core.domain.State<org.ezand.telldus.core.util.RichBoolean>> turnOff(@PathParam(value="id") int id)
Copyright © 2015. All rights reserved.