Interface ExternalIdentityMappingService

All Known Implementing Classes:
ExternalIdentityMappingServiceImpl

public interface ExternalIdentityMappingService
Since:
6.0
Author:
Emmanuel Duchastenier, Celine Souchet
  • Method Details

    • createExternalIdentityMapping

      Create externalIdentityMapping in DB for given externalIdentityMapping
      Parameters:
      externalIdentityMapping - an SExternalIdentityMapping object will be stored in DB
      Returns:
      the new created SExternalIdentityMapping object
      Throws:
      SExternalIdentityMappingAlreadyExistsException - error thrown if externalIdentityMapping already exists in DB
      SExternalIdentityMappingCreationException
    • getExternalIdentityMappingById

      SExternalIdentityMapping getExternalIdentityMappingById(long mappingId) throws SExternalIdentityMappingNotFoundException
      Get externalIdentityMapping by its id
      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

      SExternalIdentityMapping getExternalIdentityMappingForUser(long mappingId) throws SExternalIdentityMappingNotFoundException
      Get externalIdentityMapping by its id with displayNamePart having user related informations
      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.
    • getExternalIdentityMappingForGroup

      SExternalIdentityMapping getExternalIdentityMappingForGroup(long mappingId) throws SExternalIdentityMappingNotFoundException
      Get externalIdentityMapping by its id with displayNamePart having group related informations
      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

      SExternalIdentityMapping getExternalIdentityMappingForRole(long mappingId) throws SExternalIdentityMappingNotFoundException
      Get externalIdentityMapping by its id with displayNamePart having role related informations
      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

      SExternalIdentityMapping getExternalIdentityMappingForRoleAndGroup(long mappingId) throws SExternalIdentityMappingNotFoundException
      Get externalIdentityMapping by its id with displayNamePart having role and group related informations
      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

      void deleteExternalIdentityMapping(long mappingId) throws SExternalIdentityMappingNotFoundException, SExternalIdentityMappingDeletionException
      Delete the id specified externalIdentityMapping
      Parameters:
      mappingId - the identifier of externalIdentityMapping
      Throws:
      SExternalIdentityMappingNotFoundException - error thrown if no externalIdentityMapping have an id corresponding to the parameter.
      SExternalIdentityMappingDeletionException
    • deleteExternalIdentityMapping

      void deleteExternalIdentityMapping(SExternalIdentityMapping externalIdentityMapping) throws SExternalIdentityMappingDeletionException
      Delete the specific externalIdentityMapping
      Parameters:
      externalIdentityMapping - the externalIdentityMapping will be deleted
      Throws:
      SExternalIdentityMappingDeletionException
    • deleteAllExternalIdentityMappings

      void deleteAllExternalIdentityMappings() throws SExternalIdentityMappingDeletionException
      Delete all external identity mapping for the connected tenant
      Throws:
      SExternalIdentityMappingDeletionException
      Since:
      6.1
    • searchExternalIdentityMappings

      List<SExternalIdentityMapping> searchExternalIdentityMappings(String kind, QueryOptions queryOptions, String querySuffix) throws SBonitaReadException
      Get all externalIdentityMappings for specific kind according to the queryOptions. use querySuffix to indicate what the displayNamePart is related to
      Parameters:
      kind - the discriminator of the SExternalIdentityMapping to search for.
      queryOptions - a QueryOptions object containing some query conditions
      querySuffix - The query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";
      Returns:
      a list of SExternalIdentityMapping objects matching the criteria.
      Throws:
      SBonitaReadException
    • getNumberOfExternalIdentityMappings

      long getNumberOfExternalIdentityMappings(String kind, QueryOptions searchOptions, String querySuffix) throws SBonitaReadException
      Get total number of externalIdentityMappings for specific kind according to the queryOptions.
      Parameters:
      kind - the discriminator of the SExternalIdentityMapping to search for.
      searchOptions - a QueryOptions object containing some query conditions
      querySuffix - the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";
      Returns:
      number of externalIdentityMappings matching the criteria.
      Throws:
      SBonitaReadException
    • searchExternalIdentityMappingsForUser

      List<SExternalIdentityMapping> searchExternalIdentityMappingsForUser(String kind, long userId, String externalId, QueryOptions queryOptions, String querySuffix) throws SBonitaReadException
      Search all SExternalIdentityMapping objects associated with the specified externalId and kind for the specific user. Use querySuffix to indicate what the displayNamePart is related to
      Parameters:
      kind - the discriminator of the SExternalIdentityMapping to search for.
      userId - The identifier of user
      externalId - the external Id identifying the SExternalIdentityMappings to search.
      queryOptions - a QueryOptions object containing some query conditions
      querySuffix - the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";
      Returns:
      the list of results matching the criteria.
      Throws:
      SBonitaReadException
    • getNumberOfExternalIdentityMappingsForUser

      long getNumberOfExternalIdentityMappingsForUser(String kind, long userId, String externalId, QueryOptions searchOptions, String querySuffix) throws SBonitaReadException
      Get total number of SExternalIdentityMapping objects associated with the specified externalId and kind for the specific user. Use querySuffix to indicate what the displayNamePart is related to
      Parameters:
      kind - the discriminator of the SExternalIdentityMapping to search for.
      userId - The identifier of user
      externalId - the external Id identifying the SExternalIdentityMappings to search.
      searchOptions - a QueryOptions object containing some query conditions
      querySuffix - the query suffix, it can be "USER", "GROUP", "ROLE", "MEMBERSHIP";
      Returns:
      the number of externalIdentityMappings matching the criteria.
      Throws:
      SBonitaReadException
    • searchExternalIdentityMappings

      List<SExternalIdentityMapping> searchExternalIdentityMappings(String kind, String externalId, QueryOptions queryOptions) throws SBonitaReadException
      Search all SExternalIdentityMapping objects associated with the specified externalId and kind.
      Parameters:
      kind - the discriminator of the SExternalIdentityMapping to search for.
      externalId - the external Id identifying the SExternalIdentityMappings 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.
    • getExternalIdentityMappingById

      SExternalIdentityMapping getExternalIdentityMappingById(long mappingId, String suffix, String messageSuffix) throws SExternalIdentityMappingNotFoundException
      Parameters:
      mappingId -
      suffix - the query suffix to specify (ForUser, ForGroup, ...)
      messageSuffix -
      Returns:
      Throws:
      SExternalIdentityMappingNotFoundException