View Javadoc

1   /**
2    * 
3    */
4   package org.appfuse.webapp.client.ui.login;
5   
6   import javax.validation.constraints.NotNull;
7   
8   import com.github.gwtbootstrap.client.ui.base.AlertBase;
9   import com.google.gwt.editor.client.EditorDriver;
10  import com.google.gwt.user.client.ui.IsWidget;
11  
12  /**
13   * @author ivangsa
14   *
15   */
16  public interface LoginView extends IsWidget {
17  
18      public interface Delegate {
19          void onLoginClick();
20  
21          void onCancelClick();
22  
23          void onPasswordHintClick();
24  
25          void onRequestPasswordRecoveryClick();
26      }
27  
28      public static class LoginDetails {
29          @NotNull
30          String username;
31          @NotNull
32          String password;
33          boolean rememberMe;
34  
35          public String getUsername() {
36              return username;
37          }
38  
39          public void setUsername(final String username) {
40              this.username = username;
41          }
42  
43          public String getPassword() {
44              return password;
45          }
46  
47          public void setPassword(final String password) {
48              this.password = password;
49          }
50  
51          public boolean isRememberMe() {
52              return rememberMe;
53          }
54  
55          public void setRememberMe(final boolean spring_security_remember_me) {
56              this.rememberMe = spring_security_remember_me;
57          }
58  
59          @Override
60          public String toString() {
61              return "LoginDetails [username=" + username + ", password=" + password + ", spring_security_remember_me=" + rememberMe + "]";
62          }
63  
64      }
65  
66      void setRememberMeEnabled(boolean rememberMeEnabled);
67  
68      void setDelegate(Delegate delegate);
69  
70      void setMessage(AlertBase alert);
71  
72      void setWaiting(boolean wait);
73  
74      EditorDriver<LoginDetails> getEditorDriver();
75  }