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 theIIndirectClientAuthorizationDao
for reading and writingIndirectClientAuthorization
entities.- 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 String
findUniqueName(IEntityContext ec, Mandant client, String candidate, IndirectClientAuthorization exclude)
Returns a name that is not taken by anotherIndirectClientAuthorization
in 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()
boolean
isNameExisting(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:IClientAuthorizationDao
Finds all authorizations for a given client scope.- Specified by:
getAllByClient
in 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:IIndirectClientAuthorizationDao
Returns a name that is not taken by anotherIndirectClientAuthorization
in the given client other than the excluded authorization. An index will be added to the candidate if necessary.- Specified by:
findUniqueName
in interfaceIIndirectClientAuthorizationDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which a unique indirect client authorization name should be generatedcandidate
-String
indirect client authorization name candiate to be made uniqueexclude
-IndirectClientAuthorization
indirect 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:IIndirectClientAuthorizationDao
Returns all indirect client authorizations which match the profile based on the configured filter.- Specified by:
getByUserProfile
in 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:IIndirectClientAuthorizationDao
Returns whether or not the given indirect client authorization name exists within the given client- Specified by:
isNameExisting
in interfaceIIndirectClientAuthorizationDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which to check uniquenessname
-String
indirect client authorization name to check- Returns:
- whether or not the given name is unique
-
getPostActionHook
protected IFCDaoActionHook<IndirectClientAuthorization> getPostActionHook()
- Overrides:
getPostActionHook
in classGenericDao<IndirectClientAuthorization>
-
-