Class UserDevicesDao
- java.lang.Object
-
- org.forgerock.openam.core.rest.devices.UserDevicesDao
-
- Direct Known Subclasses:
OathDevicesDao,PushDevicesDao,TrustedDevicesDao
public class UserDevicesDao extends Object
DAO for handling the retrieval and saving of a user's devices.- Since:
- 13.0.0
-
-
Constructor Summary
Constructors Constructor Description UserDevicesDao(AuthenticatorDeviceServiceFactory serviceFactory)Construct a new UserDevicesDao with the provided serviceFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.forgerock.json.JsonValue>getDeviceProfiles(String username, String realm)Gets a user's device profiles.voidsaveDeviceProfiles(String username, String realm, List<org.forgerock.json.JsonValue> profiles)Saves a user's device profiles.
-
-
-
Constructor Detail
-
UserDevicesDao
public UserDevicesDao(AuthenticatorDeviceServiceFactory serviceFactory)
Construct a new UserDevicesDao with the provided serviceFactory.- Parameters:
serviceFactory- The DeviceServiceFactory used to generate specific services for realms.
-
-
Method Detail
-
getDeviceProfiles
public List<org.forgerock.json.JsonValue> getDeviceProfiles(String username, String realm) throws org.forgerock.json.resource.InternalServerErrorException
Gets a user's device profiles. The returned profiles must be stored in JSON format.- Parameters:
username- User whose profiles to return.realm- Realm in which we are operating.- Returns:
- A list of device profiles.
- Throws:
org.forgerock.json.resource.InternalServerErrorException- If there is a problem retrieving the device profiles.
-
saveDeviceProfiles
public void saveDeviceProfiles(String username, String realm, List<org.forgerock.json.JsonValue> profiles) throws org.forgerock.json.resource.InternalServerErrorException
Saves a user's device profiles.- Parameters:
username- User whose profiles to return.realm- Realm in which we are operating.profiles- The user's device profiles to store.- Throws:
org.forgerock.json.resource.InternalServerErrorException- If there is a problem storing the device profiles.
-
-