public interface DeviceManager
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeCommand(Device device,
java.lang.String command)
Acknowledge the command for the specified device.
|
Device |
assignDeviceConfig(Device device,
DeviceConfig config)
Assigns a device to an existing device config.
|
Device |
assignDisplay(Device device,
java.lang.String displayPath)
Assigns a display to a device and creates a new DeviceConfig.
|
Device |
createDevice(java.lang.String tenant)
Creates a new device for the given tenant.
|
void |
deleteDevice(java.lang.String deviceId)
Deletes an existing device, and removes any existing assignment to a display.
|
Device |
deleteLogs(Device device,
java.lang.String type)
Deletes the existing device logs from the repository.
|
void |
executeCommand(Device device,
java.lang.String command)
Execute the desired command on the specified device.
|
void |
executeCommand(Device device,
java.lang.String command,
JSONObject payload)
Execute the desired command on the specified device.
|
void |
executeCommand(Device device,
java.lang.String command,
JSONObject payload,
boolean requiresAck)
Execute the desired command on the specified device.
|
Device |
getDevice(java.lang.String deviceId)
Returns the device with the given id or
null |
java.util.Iterator<Device> |
getDevices()
Returns an iterator over all devices.
|
java.util.Iterator<Device> |
getDevices(Predicate predicate)
Returns an iterator over all devices that fulfill the given predicate.
|
DeviceStatus |
getDeviceStatus(java.lang.String deviceId)
Returns the status of the device with the given id.
|
java.util.Iterator<Device> |
getRelatedDevices(Resource resource)
Returns an iterator over all devices that are related to the specified Resource.
|
Device |
removeDisplay(Device device,
boolean removeConfig)
Removes the display assignment from the device.
|
Device |
saveLogs(Device device,
java.lang.String type,
java.io.InputStream data)
Saves the provided device logs to the repository.
|
Device |
saveScreenshot(Device device,
java.io.InputStream data)
Adds new screenshot content as a nt:file under device's profile_screens node
|
Device |
setMetadata(Device device,
JSONObject metadata)
Updates the device metadata.
|
java.lang.String |
updatePassword(Device device)
Generates and sets a new password for the device user.
|
Device getDevice(java.lang.String deviceId)
null
deviceId
- the device idnull
DeviceStatus getDeviceStatus(java.lang.String deviceId)
deviceId
- the device idnull
if the device does not exist.java.util.Iterator<Device> getDevices()
java.util.Iterator<Device> getDevices(Predicate predicate)
predicate
- the filter predicate or null
java.util.Iterator<Device> getRelatedDevices(Resource resource)
resource
- the resource that the devices are related toDevice createDevice(java.lang.String tenant) throws RepositoryException
tenant
- the name of the tenant. eg "we-retail".RepositoryException
- if an error occurrs.void deleteDevice(java.lang.String deviceId) throws RepositoryException
deviceId
- the device idRepositoryException
- if an error occurrs.java.lang.String updatePassword(Device device) throws RepositoryException
device
- the deviceRepositoryException
- if an error occurrs.Device setMetadata(Device device, JSONObject metadata) throws JSONException, RepositoryException
device
- the devicemetadata
- the metadata.JSONException
- if a JSON error occurrsRepositoryException
- if an error occurrsDevice assignDisplay(Device device, java.lang.String displayPath) throws RepositoryException
device
- the devicedisplayPath
- the display pathRepositoryException
- if an error occurrs.Device assignDeviceConfig(Device device, DeviceConfig config) throws RepositoryException
device
- the deviceconfig
- the device configRepositoryException
- if an error occurrs.Device removeDisplay(Device device, boolean removeConfig) throws RepositoryException
device
- the deviceremoveConfig
- true
to also remove the device config from the display.RepositoryException
- if an error occurrs.Device saveLogs(Device device, java.lang.String type, java.io.InputStream data) throws RepositoryException
device
- the devicetype
- the type of logs to savedata
- the log dataRepositoryException
- if an error occurrs.Device deleteLogs(Device device, java.lang.String type) throws RepositoryException
device
- the devicetype
- the type of logs to delete, if not specified all logs will be deletedRepositoryException
- if an error occurrs.Device saveScreenshot(Device device, java.io.InputStream data) throws RepositoryException
device
- the deviceRepositoryException
- if an error occurrs.void acknowledgeCommand(Device device, java.lang.String command) throws RepositoryException
device
- the device for which the command is acknowledgedcommand
- the command to acknowledgeRepositoryException
- if an error accessing the repository occurs.void executeCommand(Device device, java.lang.String command) throws RepositoryException
device
- the device to execute the command oncommand
- the command to executeRepositoryException
- if an error accessing the repository occurs.void executeCommand(Device device, java.lang.String command, JSONObject payload) throws RepositoryException
device
- the device to execute the command oncommand
- the command to executepayload
- the payload to add to the command. If null
then the command doesn't have a payload.RepositoryException
- if an error accessing the repository occurs.void executeCommand(Device device, java.lang.String command, JSONObject payload, boolean requiresAck) throws RepositoryException
device
- the device to execute the command oncommand
- the command to executepayload
- the payload to add to the command. If null
then the command doesn't have a payload.requiresAck
- whether the command requires acknowledgement that the device has processed it.RepositoryException
- if an error accessing the repository occurs."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"