public final class DeviceProfilePersistorWindows
extends com.ionic.sdk.device.profile.persistor.DeviceProfilePersistorBase
| Constructor and Description |
|---|
DeviceProfilePersistorWindows()
Default constructor for DeviceProfilePersistorDPAPI.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFormatVersionOverride() |
java.util.List<com.ionic.sdk.device.profile.DeviceProfile> |
loadAllProfiles(java.lang.String[] activeProfile)
Deserialize Secure Enrollment Profile data from the filesystem.
|
void |
saveAllProfiles(java.util.List<com.ionic.sdk.device.profile.DeviceProfile> profiles,
java.lang.String activeProfile)
Serialize Secure Enrollment Profile data to the filesystem.
|
void |
setFormatVersionOverride(java.lang.String formatVersionOverride)
Set the persistor format version preference.
|
public DeviceProfilePersistorWindows()
throws com.ionic.sdk.error.IonicException
com.ionic.sdk.error.IonicException - on instantiation in the context of a non-Windows operating systempublic java.lang.String getFormatVersionOverride()
public void setFormatVersionOverride(java.lang.String formatVersionOverride)
formatVersionOverride - the persistor format version preferencepublic java.util.List<com.ionic.sdk.device.profile.DeviceProfile> loadAllProfiles(java.lang.String[] activeProfile)
throws com.ionic.sdk.error.IonicException
Attempt first to load using the v1.1 DPAPI persistor. If this fails, fallback to the v1.0 persistor.
loadAllProfiles in interface com.ionic.sdk.device.profile.persistor.ProfilePersistorloadAllProfiles in class com.ionic.sdk.device.profile.persistor.DeviceProfilePersistorBaseactiveProfile - an out parameter that will provide the persisted active profilecom.ionic.sdk.error.IonicException - if v1.1 json header is not present, expect ISAGENT_ERROR
decrypt or json parsing can throw a sdk exception, expect
ISAGENT_PARSEFAILED, ISAGENT_MISSINGVALUE, ISAGENT_RESOURCE_NOT_FOUND,
or ISCRYPTO_ERRORpublic void saveAllProfiles(java.util.List<com.ionic.sdk.device.profile.DeviceProfile> profiles,
java.lang.String activeProfile)
throws com.ionic.sdk.error.IonicException
Unless otherwise specified (via setFormatVersionOverride(String)), v1.0 of the Windows persistor
is used by default.
To specify v1.1, use setFormatVersionOverride with parameter
DeviceProfilePersistorWindowsV11.HEADER_VALUE_VERSION.
Version 1.1 provides for a json type header that describes the file content. The subsequent byte
stream is handled by the base implementation, DeviceProfilePersistorBase.
saveAllProfiles in interface com.ionic.sdk.device.profile.persistor.ProfilePersistorsaveAllProfiles in class com.ionic.sdk.device.profile.persistor.DeviceProfilePersistorBaseprofiles - change the list of available profiles to this input parameter.activeProfile - change the active device profile to this input parameter.com.ionic.sdk.error.IonicException - write to disk can throw a ISAGENT_OPENFILE exception
saveAllProfilesToJson can throw an ISCRYPTO_ERROR on encrypt.