Class JpaCustomizedAdminUserRepository<D extends JpaAdminUser>

java.lang.Object
com.broadleafcommerce.adminuser.user.provider.jpa.repository.JpaCustomizedAdminUserRepository<D>
All Implemented Interfaces:
CustomizedAdminUserRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware, com.broadleafcommerce.common.messaging.notification.NotificationStateRepository, com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment

public class JpaCustomizedAdminUserRepository<D extends JpaAdminUser> extends Object implements CustomizedAdminUserRepository<D>, com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment
Author:
Samarth Dhruva (samarthd)
  • Constructor Details

    • JpaCustomizedAdminUserRepository

      public JpaCustomizedAdminUserRepository(com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment notificationStateRepository)
  • Method Details

    • save

      @Transactional("adminUserTransactionManager") public Object save(Object entity)
    • saveAll

      @Transactional("adminUserTransactionManager") public List<Object> saveAll(Iterable<?> entities)
    • setNotificationAcknowledged

      public boolean setNotificationAcknowledged(Object nativeId, String messageType, int attemptCount, Class<?> entityType)
      Specified by:
      setNotificationAcknowledged in interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
    • setFailedNotificationAttempt

      public boolean setFailedNotificationAttempt(Object nativeId, String messageType, int attemptCount, Instant nextAttempt, Class<?> entityType, boolean stopped)
      Specified by:
      setFailedNotificationAttempt in interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
    • findNotificationReadyMembers

      public Stream<com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware> findNotificationReadyMembers(@Nullable Object lastProcessedNativeId, int pageSize, String messageType, Duration faultThreshold, Class<?> entityType)
      Specified by:
      findNotificationReadyMembers in interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
    • getDomainType

      public Class<D> getDomainType()
      Specified by:
      getDomainType in interface com.broadleafcommerce.common.extension.DomainTypeAware
    • findUserWithApplicationAccess

      public Optional<D> findUserWithApplicationAccess(String id, String applicationId)
      Description copied from interface: CustomizedAdminUserRepository
      Reads the admin user in the data store that matches the user ID and the application ID to their assigned applications.

      Special handling is added to return a user that may have application access but no assigned applications (meaning they should have access to all applications).

      Specified by:
      findUserWithApplicationAccess in interface CustomizedAdminUserRepository<D extends JpaAdminUser>
      Parameters:
      id - the user ID of the admin user
      applicationId - the application ID to match to the user if the user has assigned applications
      Returns:
      an Optional containing the admin user if found, or Optional.empty()
    • getNotificationStateRepository

      protected com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment getNotificationStateRepository()