View Javadoc
1   /*
2    * This file is part of ***  M y C o R e  ***
3    * See http://www.mycore.de/ for details.
4    *
5    * MyCoRe is free software: you can redistribute it and/or modify
6    * it under the terms of the GNU General Public License as published by
7    * the Free Software Foundation, either version 3 of the License, or
8    * (at your option) any later version.
9    *
10   * MyCoRe is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with MyCoRe.  If not, see <http://www.gnu.org/licenses/>.
17   */
18  
19  package org.mycore.user2.login;
20  
21  import org.mycore.common.MCRUserInformation;
22  
23  import jakarta.xml.bind.annotation.XmlAccessType;
24  import jakarta.xml.bind.annotation.XmlAccessorType;
25  import jakarta.xml.bind.annotation.XmlAttribute;
26  import jakarta.xml.bind.annotation.XmlElement;
27  import jakarta.xml.bind.annotation.XmlRootElement;
28  import jakarta.xml.bind.annotation.XmlType;
29  
30  /**
31   * @author Thomas Scheffler (yagee)
32   *
33   */
34  @XmlRootElement(name = "login")
35  @XmlType(name = "user2-login")
36  @XmlAccessorType(XmlAccessType.FIELD)
37  public class MCRLogin extends org.mycore.frontend.support.MCRLogin {
38  
39      @XmlAttribute(required = true)
40      String realm;
41  
42      @XmlAttribute
43      String realmParameter;
44  
45      @XmlAttribute
46      boolean loginFailed;
47  
48      @XmlElement
49      String returnURL;
50  
51      @XmlElement
52      String errorMessage;
53  
54      public MCRLogin() {
55          super();
56      }
57  
58      public MCRLogin(MCRUserInformation userInformation, String returnURL, String formAction) {
59          super(userInformation, formAction);
60          this.returnURL = returnURL;
61      }
62  
63      public String getRealm() {
64          return realm;
65      }
66  
67      public void setRealm(String realm) {
68          this.realm = realm;
69      }
70  
71      public String getRealmParameter() {
72          return realmParameter;
73      }
74  
75      public void setRealmParameter(String realmParameter) {
76          this.realmParameter = realmParameter;
77      }
78  
79      public boolean isLoginFailed() {
80          return loginFailed;
81      }
82  
83      public void setLoginFailed(boolean loginFailed) {
84          this.loginFailed = loginFailed;
85      }
86  
87      public String getReturnURL() {
88          return returnURL;
89      }
90  
91      public void setReturnURL(String returnURL) {
92          this.returnURL = returnURL;
93      }
94  
95      public String getErrorMessage() {
96          return errorMessage;
97      }
98  
99      public void setErrorMessage(String errorMessage) {
100         this.errorMessage = errorMessage;
101     }
102 
103 }