Package de.xima.fc.dao.impl
Class IndirectClientAuthorizationDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<IndirectClientAuthorization>
-
- de.xima.fc.dao.impl.IndirectClientAuthorizationDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<IndirectClientAuthorization,Long,IEntityContext>,IClientAuthorizationDao<IndirectClientAuthorization>,IGenericDao<IndirectClientAuthorization>,IIndirectClientAuthorizationDao
public class IndirectClientAuthorizationDao extends GenericDao<IndirectClientAuthorization> implements IIndirectClientAuthorizationDao
Implementation of theIIndirectClientAuthorizationDaofor reading and writingIndirectClientAuthorizationentities.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
-
Constructor Summary
Constructors Constructor Description IndirectClientAuthorizationDao()Creates a new instance of this DAO.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringfindUniqueName(IEntityContext ec, Mandant client, String candidate, IndirectClientAuthorization exclude)Returns a name that is not taken by anotherIndirectClientAuthorizationin the given client other than the excluded authorization.List<IndirectClientAuthorization>getAllByClient(IEntityContext ec, Mandant client)Finds all authorizations for a given client scope.List<IndirectClientAuthorization>getByUserProfile(IEntityContext ec, org.pac4j.core.profile.UserProfile pac4jProfile)Returns all indirect client authorizations which match the profile based on the configured filter.protected IFCDaoActionHook<IndirectClientAuthorization>getPostActionHook()booleanisNameExisting(IEntityContext ec, Mandant client, String name)Returns whether or not the given indirect client authorization name exists within the given client-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, getPreActionHook, 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.IClientAuthorizationDao
getByUuid, getByUuid
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
count, findAll, findSingle, getEntityRefs, read
-
-
-
-
Constructor Detail
-
IndirectClientAuthorizationDao
public IndirectClientAuthorizationDao()
Creates a new instance of this DAO. Normally you should use the singleton instance provided byDaoProvider.INDIRECTCLIENTAUTHORIZATION_DAO.
-
-
Method Detail
-
getAllByClient
public List<IndirectClientAuthorization> getAllByClient(IEntityContext ec, Mandant client)
Description copied from interface:IClientAuthorizationDaoFinds all authorizations for a given client scope.- Specified by:
getAllByClientin interfaceIClientAuthorizationDao<IndirectClientAuthorization>- Parameters:
ec- Entity context for accessing the databaseclient- Client scope where to look for users.- Returns:
- A list with all authorizations from the given client scope.
-
findUniqueName
public String findUniqueName(IEntityContext ec, Mandant client, String candidate, IndirectClientAuthorization exclude)
Description copied from interface:IIndirectClientAuthorizationDaoReturns a name that is not taken by anotherIndirectClientAuthorizationin the given client other than the excluded authorization. An index will be added to the candidate if necessary.- Specified by:
findUniqueNamein interfaceIIndirectClientAuthorizationDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which a unique indirect client authorization name should be generatedcandidate-Stringindirect client authorization name candiate to be made uniqueexclude-IndirectClientAuthorizationindirect client authorization to be excluded from search- Returns:
- unique indirect client authorization name in the context of the given client
-
getByUserProfile
public List<IndirectClientAuthorization> getByUserProfile(IEntityContext ec, org.pac4j.core.profile.UserProfile pac4jProfile)
Description copied from interface:IIndirectClientAuthorizationDaoReturns all indirect client authorizations which match the profile based on the configured filter.- Specified by:
getByUserProfilein interfaceIIndirectClientAuthorizationDao- Parameters:
ec- entity context for database transactionspac4jProfile- to check for- Returns:
- a list of indirect client authorizations which match the profile based on the configured filter.
-
isNameExisting
public boolean isNameExisting(IEntityContext ec, Mandant client, String name)
Description copied from interface:IIndirectClientAuthorizationDaoReturns whether or not the given indirect client authorization name exists within the given client- Specified by:
isNameExistingin interfaceIIndirectClientAuthorizationDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which to check uniquenessname-Stringindirect client authorization name to check- Returns:
- whether or not the given name is unique
-
getPostActionHook
protected IFCDaoActionHook<IndirectClientAuthorization> getPostActionHook()
- Overrides:
getPostActionHookin classGenericDao<IndirectClientAuthorization>
-
-