public class ExternalIdentityMappingServiceImpl extends java.lang.Object implements ExternalIdentityMappingService
| Constructor and Description |
|---|
ExternalIdentityMappingServiceImpl(ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService) |
| Modifier and Type | Method and Description |
|---|---|
SExternalIdentityMapping |
createExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping)
Create externalIdentityMapping in DB for given externalIdentityMapping
|
void |
deleteAllExternalIdentityMappings()
Delete all external identity mapping for the connected tenant
|
void |
deleteExternalIdentityMapping(long mappingId)
Delete the id specified externalIdentityMapping
|
void |
deleteExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping)
Delete the specific externalIdentityMapping
|
SExternalIdentityMapping |
getExternalIdentityMappingById(long mappingId)
Get externalIdentityMapping by its id
|
SExternalIdentityMapping |
getExternalIdentityMappingById(long mappingId,
java.lang.String suffix,
java.lang.String messageSuffix) |
SExternalIdentityMapping |
getExternalIdentityMappingForGroup(long mappingId)
Get externalIdentityMapping by its id with displayNamePart having group related informations
|
SExternalIdentityMapping |
getExternalIdentityMappingForRole(long mappingId)
Get externalIdentityMapping by its id with displayNamePart having role related informations
|
SExternalIdentityMapping |
getExternalIdentityMappingForRoleAndGroup(long mappingId)
Get externalIdentityMapping by its id with displayNamePart having role and group related informations
|
SExternalIdentityMapping |
getExternalIdentityMappingForUser(long mappingId)
Get externalIdentityMapping by its id with displayNamePart having user related informations
|
long |
getNumberOfExternalIdentityMappings(java.lang.String kind,
QueryOptions searchOptions,
java.lang.String querySuffix)
Get total number of externalIdentityMappings for specific kind according to the queryOptions.
|
long |
getNumberOfExternalIdentityMappingsForUser(java.lang.String kind,
long userId,
java.lang.String externalId,
QueryOptions searchOptions,
java.lang.String querySuffix)
Get total number of
SExternalIdentityMapping objects associated with the specified externalId and kind for the specific user. |
java.util.List<SExternalIdentityMapping> |
searchExternalIdentityMappings(java.lang.String kind,
QueryOptions queryOptions,
java.lang.String querySuffix)
Get all externalIdentityMappings for specific kind according to the queryOptions.
|
java.util.List<SExternalIdentityMapping> |
searchExternalIdentityMappings(java.lang.String kind,
java.lang.String externalId,
QueryOptions queryOptions)
Search all
SExternalIdentityMapping objects associated with the specified externalId and kind. |
java.util.List<SExternalIdentityMapping> |
searchExternalIdentityMappingsForUser(java.lang.String kind,
long userId,
java.lang.String externalId,
QueryOptions queryOptions,
java.lang.String querySuffix)
Search all
SExternalIdentityMapping objects associated with the specified externalId and kind for the specific user. |
public ExternalIdentityMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, TechnicalLoggerService logger, QueriableLoggerService queriableLoggerService)
public SExternalIdentityMapping createExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping) throws SExternalIdentityMappingCreationException
ExternalIdentityMappingServicecreateExternalIdentityMapping in interface ExternalIdentityMappingServiceexternalIdentityMapping - an SExternalIdentityMapping object will be stored in DBSExternalIdentityMappingCreationExceptionpublic SExternalIdentityMapping getExternalIdentityMappingById(long mappingId) throws SExternalIdentityMappingNotFoundException
ExternalIdentityMappingServicegetExternalIdentityMappingById in interface ExternalIdentityMappingServicemappingId - the identifier of externalIdentityMappingSExternalIdentityMappingNotFoundException - error thrown if no externalIdentityMapping have an id corresponding to the parameter.public SExternalIdentityMapping getExternalIdentityMappingForUser(long mappingId) throws SExternalIdentityMappingNotFoundException
ExternalIdentityMappingServicegetExternalIdentityMappingForUser in interface ExternalIdentityMappingServicemappingId - the identifier of externalIdentityMappingSExternalIdentityMappingNotFoundException - error thrown if no externalIdentityMapping have an id corresponding to the parameter.public SExternalIdentityMapping getExternalIdentityMappingById(long mappingId, java.lang.String suffix, java.lang.String messageSuffix) throws SExternalIdentityMappingNotFoundException
getExternalIdentityMappingById in interface ExternalIdentityMappingServicesuffix - the query suffix to specify (ForUser, ForGroup, ...)SExternalIdentityMappingNotFoundExceptionpublic SExternalIdentityMapping getExternalIdentityMappingForGroup(long mappingId) throws SExternalIdentityMappingNotFoundException
ExternalIdentityMappingServicegetExternalIdentityMappingForGroup in interface ExternalIdentityMappingServicemappingId - the identifier of externalIdentityMappingSExternalIdentityMappingNotFoundException - error thrown if no externalIdentityMapping have an id corresponding to the parameter.public SExternalIdentityMapping getExternalIdentityMappingForRole(long mappingId) throws SExternalIdentityMappingNotFoundException
ExternalIdentityMappingServicegetExternalIdentityMappingForRole in interface ExternalIdentityMappingServicemappingId - the identifier of externalIdentityMappingSExternalIdentityMappingNotFoundException - error thrown if no externalIdentityMapping have an id corresponding to the parameter.public SExternalIdentityMapping getExternalIdentityMappingForRoleAndGroup(long mappingId) throws SExternalIdentityMappingNotFoundException
ExternalIdentityMappingServicegetExternalIdentityMappingForRoleAndGroup in interface ExternalIdentityMappingServicemappingId - the identifier of externalIdentityMappingSExternalIdentityMappingNotFoundException - error thrown if no externalIdentityMapping have an id corresponding to the parameter.public void deleteExternalIdentityMapping(long mappingId)
throws SExternalIdentityMappingNotFoundException,
SExternalIdentityMappingDeletionException
ExternalIdentityMappingServicedeleteExternalIdentityMapping in interface ExternalIdentityMappingServicemappingId - the identifier of externalIdentityMappingSExternalIdentityMappingNotFoundException - error thrown if no externalIdentityMapping have an id corresponding to the parameter.SExternalIdentityMappingDeletionExceptionpublic void deleteExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping) throws SExternalIdentityMappingDeletionException
ExternalIdentityMappingServicedeleteExternalIdentityMapping in interface ExternalIdentityMappingServiceexternalIdentityMapping - the externalIdentityMapping will be deletedSExternalIdentityMappingDeletionExceptionpublic void deleteAllExternalIdentityMappings()
throws SExternalIdentityMappingDeletionException
ExternalIdentityMappingServicedeleteAllExternalIdentityMappings in interface ExternalIdentityMappingServiceSExternalIdentityMappingDeletionExceptionpublic long getNumberOfExternalIdentityMappingsForUser(java.lang.String kind,
long userId,
java.lang.String externalId,
QueryOptions searchOptions,
java.lang.String querySuffix)
throws SBonitaReadException
ExternalIdentityMappingServiceSExternalIdentityMapping objects associated with the specified externalId and kind for the specific user. Use
querySuffix to
indicate what the displayNamePart is related togetNumberOfExternalIdentityMappingsForUser in interface ExternalIdentityMappingServicekind - the discriminator of the SExternalIdentityMapping to search for.userId - The identifier of userexternalId - the external Id identifying the SExternalIdentityMappings to search.searchOptions - a QueryOptions object containing some query conditionsquerySuffix - the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";SBonitaReadExceptionpublic java.util.List<SExternalIdentityMapping> searchExternalIdentityMappingsForUser(java.lang.String kind, long userId, java.lang.String externalId, QueryOptions queryOptions, java.lang.String querySuffix) throws SBonitaReadException
ExternalIdentityMappingServiceSExternalIdentityMapping objects associated with the specified externalId and kind for the specific user. Use querySuffix to
indicate what the displayNamePart is related tosearchExternalIdentityMappingsForUser in interface ExternalIdentityMappingServicekind - the discriminator of the SExternalIdentityMapping to search for.userId - The identifier of userexternalId - the external Id identifying the SExternalIdentityMappings to search.queryOptions - a QueryOptions object containing some query conditionsquerySuffix - the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";SBonitaReadExceptionpublic long getNumberOfExternalIdentityMappings(java.lang.String kind,
QueryOptions searchOptions,
java.lang.String querySuffix)
throws SBonitaReadException
ExternalIdentityMappingServicegetNumberOfExternalIdentityMappings in interface ExternalIdentityMappingServicekind - the discriminator of the SExternalIdentityMapping to search for.searchOptions - a QueryOptions object containing some query conditionsquerySuffix - the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";SBonitaReadExceptionpublic java.util.List<SExternalIdentityMapping> searchExternalIdentityMappings(java.lang.String kind, QueryOptions queryOptions, java.lang.String querySuffix) throws SBonitaReadException
ExternalIdentityMappingServicesearchExternalIdentityMappings in interface ExternalIdentityMappingServicekind - the discriminator of the SExternalIdentityMapping to search for.queryOptions - a QueryOptions object containing some query conditionsquerySuffix - The query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";SBonitaReadExceptionpublic java.util.List<SExternalIdentityMapping> searchExternalIdentityMappings(java.lang.String kind, java.lang.String externalId, QueryOptions queryOptions) throws SBonitaReadException
ExternalIdentityMappingServiceSExternalIdentityMapping objects associated with the specified externalId and kind.searchExternalIdentityMappings in interface ExternalIdentityMappingServicekind - the discriminator of the SExternalIdentityMapping to search for.externalId - the external Id identifying the SExternalIdentityMappings to search.queryOptions - a QueryOptions object containing some query conditionsSBonitaReadException - in case of search error.