@ProviderType
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.
|
@CheckForNull Device getDevice(@Nonnull java.lang.String deviceId)
nulldeviceId - the device idnull@CheckForNull DeviceStatus getDeviceStatus(@Nonnull java.lang.String deviceId)
deviceId - the device idnull if the device does not exist.@Nonnull java.util.Iterator<Device> getDevices()
@Nonnull java.util.Iterator<Device> getDevices(@Nullable Predicate predicate)
predicate - the filter predicate or null@Nonnull java.util.Iterator<Device> getRelatedDevices(@Nonnull Resource resource)
resource - the resource that the devices are related to@Nonnull Device createDevice(@Nonnull java.lang.String tenant) throws RepositoryException
tenant - the name of the tenant. eg "we-retail".RepositoryException - if an error occurrs.void deleteDevice(@Nonnull
java.lang.String deviceId)
throws RepositoryException
deviceId - the device idRepositoryException - if an error occurrs.@Nonnull
java.lang.String updatePassword(@Nonnull
Device device)
throws RepositoryException
device - the deviceRepositoryException - if an error occurrs.@Nonnull Device setMetadata(@Nonnull Device device, @Nonnull JSONObject metadata) throws JSONException, RepositoryException
device - the devicemetadata - the metadata.JSONException - if a JSON error occurrsRepositoryException - if an error occurrs@Nonnull Device assignDisplay(@Nonnull Device device, @Nonnull java.lang.String displayPath) throws RepositoryException
device - the devicedisplayPath - the display pathRepositoryException - if an error occurrs.@Nonnull Device assignDeviceConfig(@Nonnull Device device, @Nonnull DeviceConfig config) throws RepositoryException
device - the deviceconfig - the device configRepositoryException - if an error occurrs.@Nonnull Device removeDisplay(@Nonnull Device device, boolean removeConfig) throws RepositoryException
device - the deviceremoveConfig - true to also remove the device config from the display.RepositoryException - if an error occurrs.@Nonnull Device saveLogs(@Nonnull Device device, @Nonnull java.lang.String type, @Nonnull java.io.InputStream data) throws RepositoryException
device - the devicetype - the type of logs to savedata - the log dataRepositoryException - if an error occurrs.@Nonnull Device deleteLogs(@Nonnull Device device, @Nullable 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.@Nonnull Device saveScreenshot(@Nonnull Device device, @Nonnull java.io.InputStream data) throws RepositoryException
device - the deviceRepositoryException - if an error occurrs.void acknowledgeCommand(@Nonnull
Device device,
@Nonnull
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(@Nonnull
Device device,
@Nonnull
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(@Nonnull
Device device,
@Nonnull
java.lang.String command,
@Nullable
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(@Nonnull
Device device,
@Nonnull
java.lang.String command,
@Nullable
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 - 2023 Adobe. All Rights Reserved