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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.foreach.across.modules.web.ui.elements.TemplateViewElement
build
(com.foreach.across.modules.web.ui.ViewElementBuilderContext viewElementBuilderContext) void
setPermissionService
(PermissionService permissionService) 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
-
TEMPLATE
- See Also:
-
ATTRIBUTE
- See Also:
-
-
Constructor Details
-
RolePermissionsFormElementBuilder
public RolePermissionsFormElementBuilder()
-
-
Method Details
-
setPermissionService
-
build
public com.foreach.across.modules.web.ui.elements.TemplateViewElement build(com.foreach.across.modules.web.ui.ViewElementBuilderContext viewElementBuilderContext) - Specified by:
build
in interfacecom.foreach.across.modules.web.ui.ViewElementBuilder<com.foreach.across.modules.web.ui.elements.TemplateViewElement>
-