Class RolePermissionsFormElementBuilder

java.lang.Object
com.foreach.across.modules.user.ui.RolePermissionsFormElementBuilder
All Implemented Interfaces:
com.foreach.across.modules.web.ui.ViewElementBuilder<com.foreach.across.modules.web.ui.elements.TemplateViewElement>

public class RolePermissionsFormElementBuilder extends Object implements com.foreach.across.modules.web.ui.ViewElementBuilder<com.foreach.across.modules.web.ui.elements.TemplateViewElement>
Custom renderer that renders the permissions as an accordion grouped by by permission group. Requires the builder context to have an attribute *permissionsByPermissionGroup*. If that attribute is not yet present, it will be added by fetching all permissions, sorting them by name and grouping them by PermissionGroup (in turn sorted by name).

Defers actual rendering to the Thymeleaf fragment permissions in the role.thtml resource.

Since:
2.0.0
Author:
Arne Vandamme
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder

    com.foreach.across.modules.web.ui.ViewElementBuilder.Wither<T extends com.foreach.across.modules.web.ui.ViewElementBuilder>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.foreach.across.modules.web.ui.elements.TemplateViewElement
    build(com.foreach.across.modules.web.ui.ViewElementBuilderContext viewElementBuilderContext)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder

    andThen, build, doWith, map, map, postProcess, postProcess
  • Field Details

  • Constructor Details

    • RolePermissionsFormElementBuilder

      public RolePermissionsFormElementBuilder()
  • Method Details

    • setPermissionService

      @Autowired public void setPermissionService(PermissionService permissionService)
    • build

      public com.foreach.across.modules.web.ui.elements.TemplateViewElement build(com.foreach.across.modules.web.ui.ViewElementBuilderContext viewElementBuilderContext)
      Specified by:
      build in interface com.foreach.across.modules.web.ui.ViewElementBuilder<com.foreach.across.modules.web.ui.elements.TemplateViewElement>