Class PermissionTemplate

    • Constructor Detail

      • PermissionTemplate

        @DataBoundConstructor
        public PermissionTemplate​(String name,
                                  Set<String> permissions)
        Create a new PermissionTemplate.
        Parameters:
        name - the name of the template
        permissions - the set of permissions of this template
      • PermissionTemplate

        public PermissionTemplate​(Set<Permission> permissions,
                                  String name)
        Create a new PermissionTemplate.
        Parameters:
        name - the name of the template
        permissions - the set of permissions of this template
    • Method Detail

      • isUsed

        public boolean isUsed()
        Checks whether the template is used by one or more roles.
        Returns:
        true when template is used.
      • getName

        public String getName()
      • hasPermission

        public Boolean hasPermission​(Permission permission)
        Checks if the role holds the given Permission.
        Parameters:
        permission - The permission you want to check
        Returns:
        True if the role holds this permission
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object