Class CurrentUserUiComponentPoliciesImpl
java.lang.Object
io.jmix.uiconstraints.security.impl.CurrentUserUiComponentPoliciesImpl
- All Implemented Interfaces:
- CurrentUserUiComponentPolicies
@Component("uicns_CurrentUserUiComponentPolicies")
@SessionScope
public class CurrentUserUiComponentPoliciesImpl
extends Object
implements CurrentUserUiComponentPolicies
The default implementation of the 
CurrentUserUiComponentPolicies interface. This bean has a "session" scope.
 It caches the effective UI component policies for the current user.- 
Constructor SummaryConstructorsConstructorDescriptionCurrentUserUiComponentPoliciesImpl(CurrentUserRolesProvider currentUserRolesProvider, UiConstraintsProperties uiConstraintsProperties, CurrentUserSubstitution currentUserSubstitution) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns effective UI component policies for the current user for the given view.voidInvalidates the cache of effective UI component policies.
- 
Constructor Details- 
CurrentUserUiComponentPoliciesImplpublic CurrentUserUiComponentPoliciesImpl(CurrentUserRolesProvider currentUserRolesProvider, UiConstraintsProperties uiConstraintsProperties, CurrentUserSubstitution currentUserSubstitution) 
 
- 
- 
Method Details- 
getEffectiveUiComponentPoliciesForViewDescription copied from interface:CurrentUserUiComponentPoliciesReturns effective UI component policies for the current user for the given view.This method retrieves the resource roles for the current user, constructs a map of component IDs to their corresponding resource policies, and evaluates the effective policies for each component. - Specified by:
- getEffectiveUiComponentPoliciesForViewin interface- CurrentUserUiComponentPolicies
- Parameters:
- viewId- the ID of the view for which the policies are being retrieved
- Returns:
- a map where the key is the component ID and the value is a list of effective resource policies for that component
 
- 
invalidateCachepublic void invalidateCache()Description copied from interface:CurrentUserUiComponentPoliciesInvalidates the cache of effective UI component policies.- Specified by:
- invalidateCachein interface- CurrentUserUiComponentPolicies
 
 
-