public class DeviceHelper extends Object
Constructor and Description |
---|
DeviceHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addEndpointsToDevice(co.ecg.alpaca.toolkit.generated.AccessDevice device,
List<AccessDeviceUser> accessDeviceUsers)
Method to add a list of endpoints to a device.
|
static co.ecg.alpaca.toolkit.generated.AccessDevice |
getAccessDeviceFromUser(co.ecg.alpaca.toolkit.generated.User user)
Utility Method to retrieve the specific subclass AccessDevice from a User
|
static AccessDeviceUser |
getPrimaryAccessDeviceUser(co.ecg.alpaca.toolkit.generated.GroupAccessDevice gad)
Helper Method to find the Primary Access Device User from a Group Access Device.
|
static String |
getRepositoryURL(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice,
String deviceType,
String macAddress,
String fileFormat,
String method)
Retrieves Repository URL for an access device file
|
static boolean |
isCompatibleDeviceType(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice,
AccessDeviceInformation<?> information,
String deviceType)
Checks if the given AccessDevice and AccessDeviceInformation are
compatible with the given device type.
|
static void |
rebuildAccessDeviceConfigurationFiles(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice)
Utility Method to rebuild an AccessDevice configuration files.
|
static void |
removeEndpointsFromDevice(co.ecg.alpaca.toolkit.generated.AccessDevice device,
List<AccessDeviceUser> accessDeviceUsers)
Method to remove endpoints from an AccessDevice.
|
static void |
replaceUserDevice(co.ecg.alpaca.toolkit.generated.User user,
co.ecg.alpaca.toolkit.generated.AccessDevice newDevice)
Method to replace an AccessDevice on a User with another.
|
static void |
resetAccessDevice(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice)
Method to reset an AccessDevice on a User.
|
static co.ecg.alpaca.toolkit.generated.AccessDevice |
retrieveUserAccessDeviceSubtype(co.ecg.alpaca.toolkit.generated.AccessDevice device,
co.ecg.alpaca.toolkit.generated.User user)
Helper Method to convert an AccessDevice to its more specific subtype.
|
public static void addEndpointsToDevice(co.ecg.alpaca.toolkit.generated.AccessDevice device, List<AccessDeviceUser> accessDeviceUsers) throws HelperException
device
- The device to add the endpointsaccessDeviceUsers
- The list of access device users to addHelperException
public static co.ecg.alpaca.toolkit.generated.AccessDevice getAccessDeviceFromUser(co.ecg.alpaca.toolkit.generated.User user) throws HelperException
user
- The User of the AccessDeviceHelperException
public static String getRepositoryURL(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice, String deviceType, String macAddress, String fileFormat, String method) throws HelperException
accessDevice
- The access devicedeviceType
- macAddress
- fileFormat
- method
- GET or PUTHelperException
public static boolean isCompatibleDeviceType(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice, AccessDeviceInformation<?> information, String deviceType) throws HelperException
accessDevice
- The AccessDeviceinformation
- The AccessDeviceInformation for the AccessDevicedeviceType
- The device type to check for compatibilityHelperException
public static void rebuildAccessDeviceConfigurationFiles(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice) throws HelperException
accessDevice
- The access device to rebuildHelperException
public static void removeEndpointsFromDevice(co.ecg.alpaca.toolkit.generated.AccessDevice device, List<AccessDeviceUser> accessDeviceUsers) throws HelperException
device
- The device to remove endpointsaccessDeviceUsers
- The list of AccessDeviceUsers to removeHelperException
public static void replaceUserDevice(co.ecg.alpaca.toolkit.generated.User user, co.ecg.alpaca.toolkit.generated.AccessDevice newDevice) throws HelperException
user
- The User to modifynewDevice
- The device to assignco.ecg.alpaca.toolkit.exception.RequestException
- Thrown if an issue is encountered during migrationHelperException
public static void resetAccessDevice(co.ecg.alpaca.toolkit.generated.AccessDevice accessDevice) throws HelperException
accessDevice
- The device to resetHelperException
- Thrown if an issue is encountered during migrationpublic static co.ecg.alpaca.toolkit.generated.AccessDevice retrieveUserAccessDeviceSubtype(co.ecg.alpaca.toolkit.generated.AccessDevice device, co.ecg.alpaca.toolkit.generated.User user) throws HelperException
device
- The AccessDevice to determineuser
- A User that is assigned to the AccessDeviceHelperException
public static AccessDeviceUser getPrimaryAccessDeviceUser(co.ecg.alpaca.toolkit.generated.GroupAccessDevice gad) throws HelperException
gad
- The GroupAccessDevice to determineHelperException
Copyright © 2016. All rights reserved.