/**
 * Copyright (c) 2006 Red Hat, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * Component of: Red Hat Application Server
 * 
 * Initial Developers: Greg Lapouchnian
 *                     Patrick Smith
 *
 */

package olstore.controller;

import olstore.dto.AddressValue;
import olstore.dto.UserValue;

/**
 * A wrapper for user information user creation and editing.
 */
public class UserForm {
    
    // The user data for the form.
    private UserValue user;

    // The confirmation password.
    private String passwordConfirm;

    // The address for this user.
    private AddressValue address;

    /**
     * Create a new user form helper object with the given information.
     * @param user the user information for this form.
     * @param address the address information for this form.
     */
    public UserForm(UserValue user, AddressValue address) {
        this.user = user;
        this.address = address;
    }

    /**
     * Returns the address information for this form.
     * @return the address information for this form.
     */
    public AddressValue getAddress() {
        return address;
    }

    /**
     * Sets this form's address to the given address.
     * @param address the address information to use for this form.
     */
    public void setAddress(AddressValue address) {
        this.address = address;
    }

    /**
     * Returns the user information for this form.
     * @return the user information for this form.
     */
    public UserValue getUser() {
        return this.user;
    }

    /**
     * Sets the user information for this form to the given value.
     * @param user the user information to use for this form.
     */
    public void setUser(UserValue user) {
        this.user = user;
    }

    /**
     * Returns the confirmation password for this user.
     * @return the confirmation password for this user.
     */
    public String getPasswordConfirm() {
        return this.passwordConfirm;
    }

    /**
     * Sets the confirmation password to the given value.
     * @param pass the new confirmation password.
     */
    public void setPasswordConfirm(String pass) {
        this.passwordConfirm = pass;
    }
    
    
}
