Package de.xima.fc.dao.impl
Class UserProfileMfaDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<UserProfileMfa>
-
- de.xima.fc.dao.impl.UserProfileMfaDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<UserProfileMfa,Long,IEntityContext>
,IGenericDao<UserProfileMfa>
,IUserProfileMfaDao
public class UserProfileMfaDao extends GenericDao<UserProfileMfa> implements IUserProfileMfaDao
Implementation of theIUserProfileMfaDao
for reading and writingUserProfileMfa
entities.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
-
Constructor Summary
Constructors Constructor Description UserProfileMfaDao()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertUserProfileMfa(IEntityContext ec, UserProfileMfa mfaConfig)
Checks if the user profile MFA config can be persisted (create/update).static void
cleanupUserProfileMfa(IEntityContext ec, UserProfileMfa mfaConfig)
protected IFCDaoActionHook<UserProfileMfa>
getPreActionHook()
Optional<UserProfileMfa>
getUserProfileMfa(IEntityContext ec, Long userProfileId)
Retrieves theUserProfileMfa
for the given user profile ID.-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, getPostActionHook, read
-
Methods inherited from class de.xima.cmn.dao.AbstractDao
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
count, findAll, findSingle, getEntityRefs, read
-
-
-
-
Method Detail
-
cleanupUserProfileMfa
public static void cleanupUserProfileMfa(IEntityContext ec, UserProfileMfa mfaConfig)
-
assertUserProfileMfa
public void assertUserProfileMfa(IEntityContext ec, UserProfileMfa mfaConfig)
Description copied from interface:IUserProfileMfaDao
Checks if the user profile MFA config can be persisted (create/update). If the state of the user profile MFA config does not allow persisting than aDatabaseAccessException
will be thrown.- Specified by:
assertUserProfileMfa
in interfaceIUserProfileMfaDao
- Parameters:
ec
- entity context for accessing the database.mfaConfig
- to check.
-
getUserProfileMfa
public Optional<UserProfileMfa> getUserProfileMfa(IEntityContext ec, Long userProfileId)
Description copied from interface:IUserProfileMfaDao
Retrieves theUserProfileMfa
for the given user profile ID. If there is no MFA configuration for the user profile, an empty Optional is returned.The returned
UserProfileMfa
may not be verfied yet, so it is important to check if the MFA is verified before using it for authentication purposes. The verification state can be checked using theUserProfileMfa.isVerified()
method.- Specified by:
getUserProfileMfa
in interfaceIUserProfileMfaDao
- Parameters:
ec
- entity context for accessing the database.userProfileId
- ID of the user profile to retrieve the MFA config for if it exists for the user profile.- Returns:
- an Optional containing the
UserProfileMfa
if it exists, or an empty Optional if it does not. - See Also:
UserProfileMfa.isVerified()
-
getPreActionHook
protected IFCDaoActionHook<UserProfileMfa> getPreActionHook()
- Overrides:
getPreActionHook
in classGenericDao<UserProfileMfa>
-
-