Class UserEditorDriver

  • All Implemented Interfaces:
    Driver<org.jboss.errai.security.shared.api.identity.User,​UserEditor>

    @Dependent
    public class UserEditorDriver
    extends Object
    implements Driver<org.jboss.errai.security.shared.api.identity.User,​UserEditor>

    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

      • createNewUser

        public org.jboss.errai.security.shared.api.identity.User createNewUser​(String identifier)
      • show

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

        public void edit​(org.jboss.errai.security.shared.api.identity.User user,
                         UserEditor userEditor)
        Description copied from interface: Driver
        Edit the instance using the given editor.
        Specified by:
        edit in interface Driver<org.jboss.errai.security.shared.api.identity.User,​UserEditor>
        Parameters:
        user - The instance to show.
        userEditor - 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.identity.User,​UserEditor>
        Returns:
        The validation violations, if any.
      • getValue

        public org.jboss.errai.security.shared.api.identity.User 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.identity.User,​UserEditor>
        Returns:
        The instance.