package org.apache.maven.j2ee.war;

/* ====================================================================
 *   Copyright 2001-2004 The Apache Software Foundation.
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 * ====================================================================
 */

/**
 * A class to represent the <code>&lt;form-login-config&gt;</code> element of
 * a war file
 *
 * @author  dion
 * @version $Id$
 */
public class FormLoginConfig
{
    /** login page in the web app */
    private String loginPage;
    /** error page in the web app to be displayed when login fails*/
    private String errorPage;
    
    /** Create an instance of the class with null values for all fields */
    public FormLoginConfig()
    {
    }
    
    /** Create an instance of the class with the given values for fields
     * @param login initial value of loginPage property
     * @param error initial value if errorPage property
     */
    public FormLoginConfig(String login, String error)
    {
        setLoginPage(login);
        setErrorPage(error);
    }
    
    /** Getter for property errorPage.
     * @return Value of property errorPage.
     */
    public String getErrorPage()
    {
        return errorPage;
    }
    
    /** Setter for property errorPage.
     * @param errorPage New value of property errorPage.
     */
    public void setErrorPage(String errorPage)
    {
        this.errorPage = errorPage;
    }
    
    /** Getter for property loginPage.
     * @return Value of property loginPage.
     */
    public String getLoginPage()
    {
        return loginPage;
    }
    
    /** Setter for property loginPage.
     * @param loginPage New value of property loginPage.
     */
    public void setLoginPage(String loginPage)
    {
        this.loginPage = loginPage;
    }
    
}