Package io.jmix.securityflowui.model
Class DefaultResourcePolicyGroupResolver
java.lang.Object
io.jmix.securityflowui.model.DefaultResourcePolicyGroupResolver
@Component("sec_DefaultResourcePolicyGroupResolver")
public class DefaultResourcePolicyGroupResolver
extends Object
Class is used for getting default policy group for the
ResourcePolicy instance.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultResourcePolicyGroupResolver(ViewRegistry viewRegistry, MenuConfig menuConfig, Metadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionresolvePolicyGroup(ResourcePolicy resourcePolicy) Methods evaluates default policy group for a givenResourcePolicy.resolvePolicyGroup(String resourcePolicyType, String resource) Methods evaluates security policy group for a given resource of theResourcePolicy.protected StringresolvePolicyGroupByScreenControllerGenericType(Class<? extends View<?>> controllerClass) protected Stringprotected StringresolvePolicyGroupForEntityPolicy(String entityName) protected Stringprotected String
-
Field Details
-
viewRegistry
-
metadata
-
-
Constructor Details
-
Method Details
-
resolvePolicyGroup
Methods evaluates default policy group for a givenResourcePolicy.- Parameters:
resourcePolicy- aResourcePolicy- Returns:
- a group policy or
nullif the group cannot be resolved - See Also:
-
resolvePolicyGroup
Methods evaluates security policy group for a given resource of theResourcePolicy.For entity:
- the entity name is returned
For entity attributes:
- a policy group for the attribute's entity is returned
For view:
-
returns a policy group of the related entity (for standard detail and list views).
If the view implements the
LookupVieworDetailViewinterfaces then a generic type is taken and assuming that a generic type points to the entity class the policy group of the entity is returned
For menu:
- policy group for the related screen is returned
- Parameters:
resourcePolicyType- aResourcePolicyType, i.e. view, entity, menu, etc.resource- a resource (viewId, entity name, etc.)- Returns:
- a policy group or
nullif policy group cannot be resolved - See Also:
-
resolvePolicyGroupForEntityAttributePolicy
-
resolvePolicyGroupForEntityPolicy
-
resolvePolicyGroupForScreenPolicy
-
resolvePolicyGroupByScreenControllerGenericType
-
resolvePolicyGroupForMenuPolicy
-