Class ExternalIdentityMappingServiceImpl
java.lang.Object
org.bonitasoft.engine.external.identity.mapping.impl.ExternalIdentityMappingServiceImpl
- All Implemented Interfaces:
ExternalIdentityMappingService
public class ExternalIdentityMappingServiceImpl
extends Object
implements ExternalIdentityMappingService
- Author:
- Emmanuel Duchastenier, Celine Souchet
-
Constructor Summary
ConstructorsConstructorDescriptionExternalIdentityMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, QueriableLoggerService queriableLoggerService) -
Method Summary
Modifier and TypeMethodDescriptioncreateExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping) Create externalIdentityMapping in DB for given externalIdentityMappingvoidDelete all external identity mapping for the connected tenantvoiddeleteExternalIdentityMapping(long mappingId) Delete the id specified externalIdentityMappingvoiddeleteExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping) Delete the specific externalIdentityMappinggetExternalIdentityMappingById(long mappingId) Get externalIdentityMapping by its idgetExternalIdentityMappingById(long mappingId, String suffix, String messageSuffix) getExternalIdentityMappingForGroup(long mappingId) Get externalIdentityMapping by its id with displayNamePart having group related informationsgetExternalIdentityMappingForRole(long mappingId) Get externalIdentityMapping by its id with displayNamePart having role related informationsgetExternalIdentityMappingForRoleAndGroup(long mappingId) Get externalIdentityMapping by its id with displayNamePart having role and group related informationsgetExternalIdentityMappingForUser(long mappingId) Get externalIdentityMapping by its id with displayNamePart having user related informationslonggetNumberOfExternalIdentityMappings(String kind, QueryOptions searchOptions, String querySuffix) Get total number of externalIdentityMappings for specific kind according to the queryOptions.longgetNumberOfExternalIdentityMappingsForUser(String kind, long userId, String externalId, QueryOptions searchOptions, String querySuffix) Get total number ofSExternalIdentityMappingobjects associated with the specified externalId and kind for the specific user.searchExternalIdentityMappings(String kind, String externalId, QueryOptions queryOptions) Search allSExternalIdentityMappingobjects associated with the specified externalId and kind.searchExternalIdentityMappings(String kind, QueryOptions queryOptions, String querySuffix) Get all externalIdentityMappings for specific kind according to the queryOptions.searchExternalIdentityMappingsForUser(String kind, long userId, String externalId, QueryOptions queryOptions, String querySuffix) Search allSExternalIdentityMappingobjects associated with the specified externalId and kind for the specific user.
-
Constructor Details
-
ExternalIdentityMappingServiceImpl
public ExternalIdentityMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, QueriableLoggerService queriableLoggerService)
-
-
Method Details
-
createExternalIdentityMapping
public SExternalIdentityMapping createExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping) throws SExternalIdentityMappingCreationException Description copied from interface:ExternalIdentityMappingServiceCreate externalIdentityMapping in DB for given externalIdentityMapping- Specified by:
createExternalIdentityMappingin interfaceExternalIdentityMappingService- Parameters:
externalIdentityMapping- an SExternalIdentityMapping object will be stored in DB- Returns:
- the new created SExternalIdentityMapping object
- Throws:
SExternalIdentityMappingCreationException
-
getExternalIdentityMappingById
public SExternalIdentityMapping getExternalIdentityMappingById(long mappingId) throws SExternalIdentityMappingNotFoundException Description copied from interface:ExternalIdentityMappingServiceGet externalIdentityMapping by its id- Specified by:
getExternalIdentityMappingByIdin interfaceExternalIdentityMappingService- Parameters:
mappingId- the identifier of externalIdentityMapping- Returns:
- the externalIdentityMapping have id corresponding to the parameter
- Throws:
SExternalIdentityMappingNotFoundException- error thrown if no externalIdentityMapping have an id corresponding to the parameter.
-
getExternalIdentityMappingForUser
public SExternalIdentityMapping getExternalIdentityMappingForUser(long mappingId) throws SExternalIdentityMappingNotFoundException Description copied from interface:ExternalIdentityMappingServiceGet externalIdentityMapping by its id with displayNamePart having user related informations- Specified by:
getExternalIdentityMappingForUserin interfaceExternalIdentityMappingService- Parameters:
mappingId- the identifier of externalIdentityMapping- Returns:
- the externalIdentityMapping with displayNamePart having userName informations
- Throws:
SExternalIdentityMappingNotFoundException- error thrown if no externalIdentityMapping have an id corresponding to the parameter.
-
getExternalIdentityMappingById
public SExternalIdentityMapping getExternalIdentityMappingById(long mappingId, String suffix, String messageSuffix) throws SExternalIdentityMappingNotFoundException - Specified by:
getExternalIdentityMappingByIdin interfaceExternalIdentityMappingServicesuffix- the query suffix to specify (ForUser, ForGroup, ...)- Returns:
- Throws:
SExternalIdentityMappingNotFoundException
-
getExternalIdentityMappingForGroup
public SExternalIdentityMapping getExternalIdentityMappingForGroup(long mappingId) throws SExternalIdentityMappingNotFoundException Description copied from interface:ExternalIdentityMappingServiceGet externalIdentityMapping by its id with displayNamePart having group related informations- Specified by:
getExternalIdentityMappingForGroupin interfaceExternalIdentityMappingService- Parameters:
mappingId- the identifier of externalIdentityMapping- Returns:
- the externalIdentityMapping with displayNamePart having group related informations
- Throws:
SExternalIdentityMappingNotFoundException- error thrown if no externalIdentityMapping have an id corresponding to the parameter.
-
getExternalIdentityMappingForRole
public SExternalIdentityMapping getExternalIdentityMappingForRole(long mappingId) throws SExternalIdentityMappingNotFoundException Description copied from interface:ExternalIdentityMappingServiceGet externalIdentityMapping by its id with displayNamePart having role related informations- Specified by:
getExternalIdentityMappingForRolein interfaceExternalIdentityMappingService- Parameters:
mappingId- the identifier of externalIdentityMapping- Returns:
- the externalIdentityMapping with displayNamePart having role related informations
- Throws:
SExternalIdentityMappingNotFoundException- error thrown if no externalIdentityMapping have an id corresponding to the parameter.
-
getExternalIdentityMappingForRoleAndGroup
public SExternalIdentityMapping getExternalIdentityMappingForRoleAndGroup(long mappingId) throws SExternalIdentityMappingNotFoundException Description copied from interface:ExternalIdentityMappingServiceGet externalIdentityMapping by its id with displayNamePart having role and group related informations- Specified by:
getExternalIdentityMappingForRoleAndGroupin interfaceExternalIdentityMappingService- Parameters:
mappingId- the identifier of externalIdentityMapping- Returns:
- the externalIdentityMapping with displayNamePart having role and group related informations
- Throws:
SExternalIdentityMappingNotFoundException- error thrown if no externalIdentityMapping have an id corresponding to the parameter.
-
deleteExternalIdentityMapping
public void deleteExternalIdentityMapping(long mappingId) throws SExternalIdentityMappingNotFoundException, SExternalIdentityMappingDeletionException Description copied from interface:ExternalIdentityMappingServiceDelete the id specified externalIdentityMapping- Specified by:
deleteExternalIdentityMappingin interfaceExternalIdentityMappingService- Parameters:
mappingId- the identifier of externalIdentityMapping- Throws:
SExternalIdentityMappingNotFoundException- error thrown if no externalIdentityMapping have an id corresponding to the parameter.SExternalIdentityMappingDeletionException
-
deleteExternalIdentityMapping
public void deleteExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping) throws SExternalIdentityMappingDeletionException Description copied from interface:ExternalIdentityMappingServiceDelete the specific externalIdentityMapping- Specified by:
deleteExternalIdentityMappingin interfaceExternalIdentityMappingService- Parameters:
externalIdentityMapping- the externalIdentityMapping will be deleted- Throws:
SExternalIdentityMappingDeletionException
-
deleteAllExternalIdentityMappings
Description copied from interface:ExternalIdentityMappingServiceDelete all external identity mapping for the connected tenant- Specified by:
deleteAllExternalIdentityMappingsin interfaceExternalIdentityMappingService- Throws:
SExternalIdentityMappingDeletionException
-
getNumberOfExternalIdentityMappingsForUser
public long getNumberOfExternalIdentityMappingsForUser(String kind, long userId, String externalId, QueryOptions searchOptions, String querySuffix) throws SBonitaReadException Description copied from interface:ExternalIdentityMappingServiceGet total number ofSExternalIdentityMappingobjects associated with the specified externalId and kind for the specific user. Use querySuffix to indicate what the displayNamePart is related to- Specified by:
getNumberOfExternalIdentityMappingsForUserin interfaceExternalIdentityMappingService- Parameters:
kind- the discriminator of theSExternalIdentityMappingto search for.userId- The identifier of userexternalId- the external Id identifying theSExternalIdentityMappings to search.searchOptions- a QueryOptions object containing some query conditionsquerySuffix- the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";- Returns:
- the number of externalIdentityMappings matching the criteria.
- Throws:
SBonitaReadException
-
searchExternalIdentityMappingsForUser
public List<SExternalIdentityMapping> searchExternalIdentityMappingsForUser(String kind, long userId, String externalId, QueryOptions queryOptions, String querySuffix) throws SBonitaReadException Description copied from interface:ExternalIdentityMappingServiceSearch allSExternalIdentityMappingobjects associated with the specified externalId and kind for the specific user. Use querySuffix to indicate what the displayNamePart is related to- Specified by:
searchExternalIdentityMappingsForUserin interfaceExternalIdentityMappingService- Parameters:
kind- the discriminator of theSExternalIdentityMappingto search for.userId- The identifier of userexternalId- the external Id identifying theSExternalIdentityMappings to search.queryOptions- a QueryOptions object containing some query conditionsquerySuffix- the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";- Returns:
- the list of results matching the criteria.
- Throws:
SBonitaReadException
-
getNumberOfExternalIdentityMappings
public long getNumberOfExternalIdentityMappings(String kind, QueryOptions searchOptions, String querySuffix) throws SBonitaReadException Description copied from interface:ExternalIdentityMappingServiceGet total number of externalIdentityMappings for specific kind according to the queryOptions.- Specified by:
getNumberOfExternalIdentityMappingsin interfaceExternalIdentityMappingService- Parameters:
kind- the discriminator of theSExternalIdentityMappingto search for.searchOptions- a QueryOptions object containing some query conditionsquerySuffix- the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";- Returns:
- number of externalIdentityMappings matching the criteria.
- Throws:
SBonitaReadException
-
searchExternalIdentityMappings
public List<SExternalIdentityMapping> searchExternalIdentityMappings(String kind, QueryOptions queryOptions, String querySuffix) throws SBonitaReadException Description copied from interface:ExternalIdentityMappingServiceGet all externalIdentityMappings for specific kind according to the queryOptions. use querySuffix to indicate what the displayNamePart is related to- Specified by:
searchExternalIdentityMappingsin interfaceExternalIdentityMappingService- Parameters:
kind- the discriminator of theSExternalIdentityMappingto search for.queryOptions- a QueryOptions object containing some query conditionsquerySuffix- The query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";- Returns:
- a list of SExternalIdentityMapping objects matching the criteria.
- Throws:
SBonitaReadException
-
searchExternalIdentityMappings
public List<SExternalIdentityMapping> searchExternalIdentityMappings(String kind, String externalId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ExternalIdentityMappingServiceSearch allSExternalIdentityMappingobjects associated with the specified externalId and kind.- Specified by:
searchExternalIdentityMappingsin interfaceExternalIdentityMappingService- Parameters:
kind- the discriminator of theSExternalIdentityMappingto search for.externalId- the external Id identifying theSExternalIdentityMappings to search.queryOptions- a QueryOptions object containing some query conditions- Returns:
- the list of results matching the criteria.
- Throws:
SBonitaReadException- in case of search error.
-