Class RoleEditorDriver

  • All Implemented Interfaces:
    Driver<org.jboss.errai.security.shared.api.Role,​RoleEditor>

    @Dependent
    public class RoleEditorDriver
    extends Object
    implements Driver<org.jboss.errai.security.shared.api.Role,​RoleEditor>

    It links the user editors hierarchy with the instance edited by flushing the editor's values into the User model.

    It contains all logic for editing a User instance by using Editors hierarchy instances, so the editors's concrete widget/component implementation is isolated from the edition logic.

    Since:
    0.8.0
    • Method Detail

      • show

        public void show​(org.jboss.errai.security.shared.api.Role role,
                         RoleEditor roleEditor)
        Description copied from interface: Driver
        Show the instance using the given editor.
        Specified by:
        show in interface Driver<org.jboss.errai.security.shared.api.Role,​RoleEditor>
        Parameters:
        role - The instance to show.
        roleEditor - The viewer for the instance.
      • edit

        public void edit​(org.jboss.errai.security.shared.api.Role role,
                         RoleEditor roleEditor)
        Description copied from interface: Driver
        Edit the instance using the given editor.
        Specified by:
        edit in interface Driver<org.jboss.errai.security.shared.api.Role,​RoleEditor>
        Parameters:
        role - The instance to show.
        roleEditor - The editor for the instance.
      • flush

        public boolean flush()
        Description copied from interface: Driver
        Flush the editors hierarchy states and perform the validations.
        Specified by:
        flush in interface Driver<org.jboss.errai.security.shared.api.Role,​RoleEditor>
        Returns:
        The validation violations, if any.
      • getValue

        public org.jboss.errai.security.shared.api.Role getValue()
        Description copied from interface: Driver
        The instance after being flush with against the editors hierarchy.
        Specified by:
        getValue in interface Driver<org.jboss.errai.security.shared.api.Role,​RoleEditor>
        Returns:
        The instance.
      • getHomePerspective

        public org.uberfire.client.mvp.PerspectiveActivity getHomePerspective()
      • getRolePriority

        public int getRolePriority()
      • getPermissions

        public org.uberfire.security.authz.PermissionCollection getPermissions()