Class JpaCustomizedAdminPermissionRepository<D extends JpaAdminPermission>
java.lang.Object
com.broadleafcommerce.adminuser.user.provider.jpa.repository.JpaCustomizedAdminPermissionRepository<D>
- All Implemented Interfaces:
CustomizedAdminPermissionRepository<D>,com.broadleafcommerce.common.extension.DomainTypeAware,com.broadleafcommerce.common.messaging.notification.NotificationStateRepository,com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment
@Deprecated
public class JpaCustomizedAdminPermissionRepository<D extends JpaAdminPermission>
extends Object
implements CustomizedAdminPermissionRepository<D>, com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment
Deprecated.
since 1.7.0. Roles and permissions are managed in auth.
- Author:
- Samarth Dhruva (samarthd)
-
Constructor Summary
ConstructorsConstructorDescriptionJpaCustomizedAdminPermissionRepository(com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment notificationStateRepository, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, cz.jirutka.rsql.parser.ast.RSQLVisitor<jakarta.persistence.criteria.Predicate, Class<?>> rsqlVisitor) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsByNameAndIdNot(@NonNull String name, String id) Deprecated.Reports whether there exists a permission in the data store whoseAdminPermission.nameis equal to the givennameand whoseAdminPermission.idis not equal to the givenid.booleanexistsByNameAndIdNotInTenantOrGlobal(@NonNull String name, String id, String tenantId) Deprecated.Reports whether there exists a permission in the data store whoseAdminPermission.nameis equal to the givennameand whoseAdminPermission.idis not equal to the givenid.protected booleanexistsByNameAndIdNotInternal(@NonNull String name, String id, boolean filterOnTenantId, String tenantId) Deprecated.Implements behavior forexistsByNameAndIdNot(String, String)andexistsByNameAndIdNotInTenantOrGlobal(String, String, String), as they have very similar requirements.findByIdInTenantOrGlobal(String id, String tenantId) Deprecated.Reads the permission in the data store which has the given ID.findByIdsInTenantOrGlobal(Collection<String> ids, String tenantId) Deprecated.Reads the permissions in the data store which have the given IDs.org.springframework.data.domain.Page<D>findByNameContainingIgnoreCase(String name, org.springframework.data.domain.Pageable pageable) Deprecated.Reads permissions in the data store, filtering to those whose name contains the given value.org.springframework.data.domain.Page<D>findByNameContainingIgnoreCaseInTenantOrGlobal(String name, String tenantId, org.springframework.data.domain.Pageable pageable) Deprecated.Reads permissions in the data store, filtering to those whose name contains the given value.Stream<com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware>findNotificationReadyMembers(Object lastProcessedNativeId, int pageSize, String messageType, Duration faultThreshold, Class<?> entityType) Deprecated.Deprecated.protected com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragmentDeprecated.Deprecated.Deprecated.booleansetFailedNotificationAttempt(Object nativeId, String messageType, int attemptCount, Instant nextAttempt, Class<?> entityType, boolean stopped) Deprecated.booleansetNotificationAcknowledged(Object nativeId, String messageType, int attemptCount, Class<?> entityType) Deprecated.
-
Constructor Details
-
JpaCustomizedAdminPermissionRepository
public JpaCustomizedAdminPermissionRepository(com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment notificationStateRepository, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, cz.jirutka.rsql.parser.ast.RSQLVisitor<jakarta.persistence.criteria.Predicate, Class<?>> rsqlVisitor) Deprecated.
-
-
Method Details
-
save
Deprecated. -
saveAll
Deprecated. -
getDomainType
Deprecated.- Specified by:
getDomainTypein interfacecom.broadleafcommerce.common.extension.DomainTypeAware
-
existsByNameAndIdNot
Deprecated.Description copied from interface:CustomizedAdminPermissionRepositoryReports whether there exists a permission in the data store whoseAdminPermission.nameis equal to the givennameand whoseAdminPermission.idis not equal to the givenid.Similar to
CustomizedAdminPermissionRepository.existsByNameAndIdNotInTenantOrGlobal(String, String, String)but without any tenant-discrimination.- Specified by:
existsByNameAndIdNotin interfaceCustomizedAdminPermissionRepository<D extends JpaAdminPermission>- Parameters:
name- the value that permission name must equal in order to matchid- (optional) the value that the permission's id must not equal in order to match. If this value isnull, then results will not be filtered by their id.- Returns:
trueif there exists a permission matching the given name and not matching the given id,falseotherwise- See Also:
-
existsByNameAndIdNotInTenantOrGlobal
public boolean existsByNameAndIdNotInTenantOrGlobal(@NonNull @NonNull String name, @Nullable String id, @Nullable String tenantId) Deprecated.Description copied from interface:CustomizedAdminPermissionRepositoryReports whether there exists a permission in the data store whoseAdminPermission.nameis equal to the givennameand whoseAdminPermission.idis not equal to the givenid.Results are restricted to only the permissions accessible from the given context as described in the class-level javadocs.
Similar to
CustomizedAdminPermissionRepository.existsByNameAndIdNot(String, String)but with tenant-discrimination.- Specified by:
existsByNameAndIdNotInTenantOrGlobalin interfaceCustomizedAdminPermissionRepository<D extends JpaAdminPermission>- Parameters:
name- the value that permission name must equal in order to matchid- (optional) the value that the permission's id must not equal in order to match. If this value isnull, then results will not be filtered by their id.tenantId- the ID of the tenant to restrict the results by. If this is alsonull, then only permissions with a null tenant ID will be returned.- Returns:
trueif there exists a permission with a matching or null tenant ID, a matching name, and a not matching id,falseotherwise- See Also:
-
existsByNameAndIdNotInternal
protected boolean existsByNameAndIdNotInternal(@NonNull @NonNull String name, @Nullable String id, boolean filterOnTenantId, @Nullable String tenantId) Deprecated.Implements behavior forexistsByNameAndIdNot(String, String)andexistsByNameAndIdNotInTenantOrGlobal(String, String, String), as they have very similar requirements. They differ only in whether they filter on tenant ID.- Parameters:
name- the value that permission name must equal in order to matchid- (optional) the value that the permission's id must not equal in order to match. If this value isnull, then results will not be filtered by their id.filterOnTenantId- used to determine whether the giventenantIdshould be considered at all in the criteria. Distinguishes between theexistsByNameAndIdNot(String, String)use-case andexistsByNameAndIdNotInTenantOrGlobal(String, String, String).tenantId- the ID of the tenant to restrict the results by. If this is alsonull, then only permissions with a null tenant ID will be returned. Filtration is only done on tenantId iffilterOnTenantIdis true.- Returns:
trueif a record exists matching the given criteria,falseotherwise
-
findByIdsInTenantOrGlobal
Deprecated.Description copied from interface:CustomizedAdminPermissionRepositoryReads the permissions in the data store which have the given IDs. The permissions must either have a tenant ID matching the given value or a null tenant ID (global).- Specified by:
findByIdsInTenantOrGlobalin interfaceCustomizedAdminPermissionRepository<D extends JpaAdminPermission>- Parameters:
ids- the IDs of the permissions to findtenantId- the ID of the tenant to restrict the results by. If this is alsonull, then only permissions with a null tenant ID will be returned.- Returns:
- permissions that match the given IDs with either a null tenant ID or the given tenant ID
-
findByNameContainingIgnoreCaseInTenantOrGlobal
public org.springframework.data.domain.Page<D> findByNameContainingIgnoreCaseInTenantOrGlobal(String name, String tenantId, org.springframework.data.domain.Pageable pageable) Deprecated.Description copied from interface:CustomizedAdminPermissionRepositoryReads permissions in the data store, filtering to those whose name contains the given value. Results are also restricted to only the permissions that have a tenant ID matching the given value or a null tenant ID (global).- Specified by:
findByNameContainingIgnoreCaseInTenantOrGlobalin interfaceCustomizedAdminPermissionRepository<D extends JpaAdminPermission>- Parameters:
name- the value that permission names must contain in order to matchtenantId- the ID of the tenant to filter results by. If this is alsonull, then only permissions with null tenant IDs will be returned.pageable- describes the page of results to return- Returns:
- permissions that match the given name with either a null tenant ID or the given tenant ID
-
findByNameContainingIgnoreCase
public org.springframework.data.domain.Page<D> findByNameContainingIgnoreCase(String name, org.springframework.data.domain.Pageable pageable) Deprecated.Description copied from interface:CustomizedAdminPermissionRepositoryReads permissions in the data store, filtering to those whose name contains the given value. Results are also restricted to only the permissions that have a tenant ID matching the given value or a null tenant ID (global).- Specified by:
findByNameContainingIgnoreCasein interfaceCustomizedAdminPermissionRepository<D extends JpaAdminPermission>- Parameters:
name- the value that permission names must contain in order to matchpageable- describes the page of results to return- Returns:
- permissions that match the given name with either a null tenant ID or the given tenant ID
-
findByIdInTenantOrGlobal
Deprecated.Description copied from interface:CustomizedAdminPermissionRepositoryReads the permission in the data store which has the given ID. The permission must either have a tenant ID matching the given value or a null tenant ID (global).- Specified by:
findByIdInTenantOrGlobalin interfaceCustomizedAdminPermissionRepository<D extends JpaAdminPermission>- Parameters:
id- the ID of the permission to findtenantId- the ID of the tenant to restrict the result by. If this is alsonull, then only a permission with a null tenant ID will be returned.- Returns:
- an
Optionalcontaining the permission if found, orOptional.empty()
-
setNotificationAcknowledged
public boolean setNotificationAcknowledged(Object nativeId, String messageType, int attemptCount, Class<?> entityType) Deprecated.- Specified by:
setNotificationAcknowledgedin interfacecom.broadleafcommerce.common.messaging.notification.NotificationStateRepository
-
setFailedNotificationAttempt
public boolean setFailedNotificationAttempt(Object nativeId, String messageType, int attemptCount, Instant nextAttempt, Class<?> entityType, boolean stopped) Deprecated.- Specified by:
setFailedNotificationAttemptin interfacecom.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) Deprecated.- Specified by:
findNotificationReadyMembersin interfacecom.broadleafcommerce.common.messaging.notification.NotificationStateRepository
-
getNotificationStateRepository
protected com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment getNotificationStateRepository()Deprecated.
-