View Javadoc

1   package org.apache.maven.j2ee.war;
2   
3   /* ====================================================================
4    *   Copyright 2001-2004 The Apache Software Foundation.
5    *
6    *   Licensed under the Apache License, Version 2.0 (the "License");
7    *   you may not use this file except in compliance with the License.
8    *   You may obtain a copy of the License at
9    *
10   *       http://www.apache.org/licenses/LICENSE-2.0
11   *
12   *   Unless required by applicable law or agreed to in writing, software
13   *   distributed under the License is distributed on an "AS IS" BASIS,
14   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   *   See the License for the specific language governing permissions and
16   *   limitations under the License.
17   * ====================================================================
18   */
19  
20  /**
21   * A class to represent the <code>&lt;form-login-config&gt;</code> element of
22   * a war file
23   *
24   * @author  dion
25   * @version $Id: FormLoginConfig.java 170200 2005-05-15 06:24:19Z brett $
26   */
27  public class FormLoginConfig
28  {
29      /** login page in the web app */
30      private String loginPage;
31      /** error page in the web app to be displayed when login fails*/
32      private String errorPage;
33      
34      /** Create an instance of the class with null values for all fields */
35      public FormLoginConfig()
36      {
37      }
38      
39      /** Create an instance of the class with the given values for fields
40       * @param login initial value of loginPage property
41       * @param error initial value if errorPage property
42       */
43      public FormLoginConfig(String login, String error)
44      {
45          setLoginPage(login);
46          setErrorPage(error);
47      }
48      
49      /** Getter for property errorPage.
50       * @return Value of property errorPage.
51       */
52      public String getErrorPage()
53      {
54          return errorPage;
55      }
56      
57      /** Setter for property errorPage.
58       * @param errorPage New value of property errorPage.
59       */
60      public void setErrorPage(String errorPage)
61      {
62          this.errorPage = errorPage;
63      }
64      
65      /** Getter for property loginPage.
66       * @return Value of property loginPage.
67       */
68      public String getLoginPage()
69      {
70          return loginPage;
71      }
72      
73      /** Setter for property loginPage.
74       * @param loginPage New value of property loginPage.
75       */
76      public void setLoginPage(String loginPage)
77      {
78          this.loginPage = loginPage;
79      }
80      
81  }