Class ResourceRole

java.lang.Object
io.jmix.security.model.BaseRole
io.jmix.security.model.ResourceRole
All Implemented Interfaces:
Serializable

public class ResourceRole extends BaseRole
Class is a container for security resource policies.

Resource policies define permissions for resources. A resource may be a screen, entity CRUD operation, entity attribute, etc.

Role objects may be created from different sources:

  • from interfaces annotated with ResourceRole
  • from database Role entities
  • created explicitly by the application
See Also:
  • Constructor Details

    • ResourceRole

      public ResourceRole()
  • Method Details

    • getScopes

      public Set<String> getScopes()
    • setScopes

      public void setScopes(Set<String> scopes)
    • getResourcePolicies

      public Collection<ResourcePolicy> getResourcePolicies()
      Returns a list of policies defined directly in the current role, excluding policies from child roles.
    • setResourcePolicies

      public void setResourcePolicies(Collection<ResourcePolicy> resourcePolicies)
    • getAllResourcePolicies

      public Collection<ResourcePolicy> getAllResourcePolicies()
      Returns policies defined in the current role and in all its child roles.
    • setAllResourcePolicies

      public void setAllResourcePolicies(Collection<ResourcePolicy> allResourcePolicies)
    • getResourcePoliciesIndex

      public ResourceRole.ResourcePoliciesIndex getResourcePoliciesIndex()
      Returns an index structure that stores policies of the current role only.
    • getAllResourcePoliciesIndex

      public ResourceRole.ResourcePoliciesIndex getAllResourcePoliciesIndex()
      Returns an index structure that stores policies of the current role and all child roles.