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 the
IIndirectClientAuthorizationDao
for reading and writing
IndirectClientAuthorization
entities.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
Field Summary
Fields inherited from class de.xima.cmn.dao.AbstractDao
entityClass, LOG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindUniqueName
(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.getAllByClient
(IEntityContext ec, Mandant client) Finds all authorizations for a given client scope.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>
boolean
isNameExisting
(IEntityContext ec, Mandant client, String name) Returns whether or not the given indirect client authorization name exists within the given clientMethods 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 Details
-
IndirectClientAuthorizationDao
public IndirectClientAuthorizationDao()Creates a new instance of this DAO. Normally you should use the singleton instance provided byDaoProvider.INDIRECTCLIENTAUTHORIZATION_DAO
.
-
-
Method Details
-
getAllByClient
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
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
- Overrides:
getPostActionHook
in classGenericDao<IndirectClientAuthorization>
-