public interface DevicesService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TOPIC_DEVICE_STATUS |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Device> |
getActiveDevices() |
java.util.List<Device> |
getAllDevices() |
java.util.List<DeviceConfiguration> |
getConfigurations(java.lang.String deviceId)
Delegates to the
DeviceService::getConfigurations |
DeviceConfiguration |
getCurrentConfiguration(java.lang.String deviceId)
Delegates to the
DeviceService::getCurrentConfiguration |
DataEntry |
getCurrentDataEntry(java.lang.String deviceId,
java.util.Date timestamp) |
java.util.List<DataEntry> |
getDataEntries(java.lang.String deviceId,
java.util.Date startDate,
java.util.Date endDate)
Delegates to the
DeviceService::getDataEntries |
Device |
getDeviceById(java.lang.String deviceId)
Retrieves from the DB the Device with the given ID.
|
LifeCycleDeviceType |
getStatus(java.lang.String deviceId)
Returns the LifeCycleDeviceType associated with the Device of provided ID
|
void |
initializeDevice(java.lang.String deviceId,
boolean forceReload,
boolean forceRestart)
Delegates to the
DeviceService::initialize |
boolean |
isRunning(java.lang.String deviceId)
Delegates to the
DeviceService::isRunning |
void |
removeDevice(java.lang.String deviceId)
Removes the Device with the given ID, if it exists and notifies the EventAdmin, so it can trigger
the removal of the corresponding DeviceService instance.
|
boolean |
startDevice(java.lang.String deviceId)
Delegates to the
DeviceService::startDevice |
boolean |
stopDevice(java.lang.String deviceId)
Delegates to the
DeviceService::stopDevice |
Device |
updateDevice(Device device)
Updates the given Device.
|
DeviceConfiguration |
updateDeviceConfiguration(java.lang.String deviceId,
DeviceConfiguration configuration)
Delegates to the
DeviceService::updateDeviceConfiguration |
DeviceInfo |
updateDeviceInformation(java.lang.String deviceId,
DeviceInfo info)
Delegates to the
DeviceService::updateDeviceInformation |
static final java.lang.String TOPIC_DEVICE_STATUS
java.util.List<Device> getActiveDevices()
java.util.List<Device> getAllDevices()
LifeCycleDeviceType getStatus(java.lang.String deviceId)
deviceId - the ID of the Device whose Status we want to retrieveDevice getDeviceById(java.lang.String deviceId)
deviceId - the ID of the device we want to retrieveDevice updateDevice(Device device)
device - the updated Device to be savedvoid removeDevice(java.lang.String deviceId)
deviceId - the ID of the Device to be removedDeviceConfiguration updateDeviceConfiguration(java.lang.String deviceId,
DeviceConfiguration configuration)
DeviceService::updateDeviceConfiguration associated with the Device of provided iddeviceId - the id of the Device whose Configuration has to be updatedconfiguration - the new DeviceConfigurationDeviceInfo updateDeviceInformation(java.lang.String deviceId,
DeviceInfo info)
DeviceService::updateDeviceInformation associated with the Device of provided iddeviceId - the id of the Device whose DeviceInfo has to be updatedconfiguration - the new DeviceInfoDeviceConfiguration getCurrentConfiguration(java.lang.String deviceId)
DeviceService::getCurrentConfiguration associated with the Device of provided iddeviceId - the id of the Device whose Configuration we want to knowjava.util.List<DeviceConfiguration> getConfigurations(java.lang.String deviceId)
DeviceService::getConfigurations associated with the Device of provided iddeviceId - the id of the Device whose Configurations we want to knowboolean isRunning(java.lang.String deviceId)
DeviceService::isRunning associated with the Device of provided iddeviceId - the id of the Devicetrue if the Device is running, false if the associated DeviceService is not
registered, or if the Device is not runningboolean startDevice(java.lang.String deviceId)
throws DeviceException
DeviceService::startDevice associated with the Device of provided iddeviceId - the id of the DeviceDeviceExceptionboolean stopDevice(java.lang.String deviceId)
throws DeviceException
DeviceService::stopDevice associated with the Device of provided iddeviceId - the id of the DeviceDeviceExceptionvoid initializeDevice(java.lang.String deviceId,
boolean forceReload,
boolean forceRestart)
throws DeviceException
DeviceService::initializedeviceId - the Device idforceReload - a boolean indicating whether a reload is requiredforceRestart - a boolean indicating whether a restart is requiredDeviceExceptionjava.util.List<DataEntry> getDataEntries(java.lang.String deviceId,
java.util.Date startDate,
java.util.Date endDate)
DeviceService::getDataEntries associated with the Device of provided iddeviceId - the id of the DevicestartDate - the start dateendDate - the end dateDataEntry getCurrentDataEntry(java.lang.String deviceId,
java.util.Date timestamp)
deviceId - the Device idtimestamp - the current DateData In Motion GmbH all rights reserved