001: /**
002: * Copyright (c) 2006 Red Hat, Inc. All rights reserved.
003: *
004: * This library is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License as published by the Free Software Foundation; either
007: * version 2.1 of the License, or any later version.
008: *
009: * This library is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012: * Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public
015: * License along with this library; if not, write to the Free Software
016: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
017: * USA
018: *
019: * Component of: Red Hat Application Server
020: *
021: * Initial Developers: Greg Lapouchnian
022: * Patrick Smith
023: *
024: */package olstore.controller;
025:
026: import olstore.dto.AddressValue;
027: import olstore.dto.UserValue;
028:
029: /**
030: * A wrapper for user information user creation and editing.
031: */
032: public class UserForm {
033:
034: // The user data for the form.
035: private UserValue user;
036:
037: // The confirmation password.
038: private String passwordConfirm;
039:
040: // The address for this user.
041: private AddressValue address;
042:
043: /**
044: * Create a new user form helper object with the given information.
045: * @param user the user information for this form.
046: * @param address the address information for this form.
047: */
048: public UserForm(UserValue user, AddressValue address) {
049: this .user = user;
050: this .address = address;
051: }
052:
053: /**
054: * Returns the address information for this form.
055: * @return the address information for this form.
056: */
057: public AddressValue getAddress() {
058: return address;
059: }
060:
061: /**
062: * Sets this form's address to the given address.
063: * @param address the address information to use for this form.
064: */
065: public void setAddress(AddressValue address) {
066: this .address = address;
067: }
068:
069: /**
070: * Returns the user information for this form.
071: * @return the user information for this form.
072: */
073: public UserValue getUser() {
074: return this .user;
075: }
076:
077: /**
078: * Sets the user information for this form to the given value.
079: * @param user the user information to use for this form.
080: */
081: public void setUser(UserValue user) {
082: this .user = user;
083: }
084:
085: /**
086: * Returns the confirmation password for this user.
087: * @return the confirmation password for this user.
088: */
089: public String getPasswordConfirm() {
090: return this .passwordConfirm;
091: }
092:
093: /**
094: * Sets the confirmation password to the given value.
095: * @param pass the new confirmation password.
096: */
097: public void setPasswordConfirm(String pass) {
098: this.passwordConfirm = pass;
099: }
100:
101: }
|