File Source: CreateUserBean.java
/*
P/P * Method: org.apache.roller.weblogger.ui.struts2.admin.CreateUserBean__static_init
*/
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. The ASF licenses this file to You
4 * under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. For additional information regarding
15 * copyright in this work, please see the NOTICE file in the top level
16 * directory of this distribution.
17 */
18
19 package org.apache.roller.weblogger.ui.struts2.admin;
20
21 import java.util.Locale;
22 import org.apache.roller.weblogger.pojos.User;
23
24
25 /**
26 * Bean used by CreateUser action.
27 */
/*
P/P * Method: void org.apache.roller.weblogger.ui.struts2.admin.CreateUserBean()
*
* Presumptions:
* init'ed(java.lang.Boolean.TRUE)
*
* Postconditions:
* this.activationCode == null
* this.emailAddress == null
* this.fullName == null
* this.id == null
* this.locale == null
* this.password == null
* this.screenName == null
* this.timeZone == null
* this.userName == null
* this.administrator == 0
* ...
*/
28 public class CreateUserBean {
29
30 private String id = null;
31 private String userName = null;
32 private String password = null;
33 private String screenName = null;
34 private String fullName = null;
35 private String emailAddress = null;
36 private String locale = null;
37 private String timeZone = null;
38 private Boolean enabled = Boolean.TRUE;
39 private String activationCode = null;
40
41 private boolean administrator = false;
42
43
44 public String getId() {
/*
P/P * Method: String getId()
*
* Preconditions:
* init'ed(this.id)
*
* Postconditions:
* return_value == this.id
* init'ed(return_value)
*/
45 return id;
46 }
47
48 public void setId(String id) {
/*
P/P * Method: void setId(String)
*
* Postconditions:
* this.id == id
* init'ed(this.id)
*/
49 this.id = id;
50 }
51
52 public String getUserName() {
/*
P/P * Method: String getUserName()
*
* Preconditions:
* init'ed(this.userName)
*
* Postconditions:
* return_value == this.userName
* init'ed(return_value)
*/
53 return userName;
54 }
55
56 public void setUserName(String userName) {
/*
P/P * Method: void setUserName(String)
*
* Postconditions:
* this.userName == userName
* init'ed(this.userName)
*/
57 this.userName = userName;
58 }
59
60 public String getPassword() {
/*
P/P * Method: String getPassword()
*
* Preconditions:
* init'ed(this.password)
*
* Postconditions:
* return_value == this.password
* init'ed(return_value)
*/
61 return password;
62 }
63
64 public void setPassword(String password) {
/*
P/P * Method: void setPassword(String)
*
* Postconditions:
* this.password == password
* init'ed(this.password)
*/
65 this.password = password;
66 }
67
68 public String getScreenName() {
/*
P/P * Method: String getScreenName()
*
* Preconditions:
* init'ed(this.screenName)
*
* Postconditions:
* return_value == this.screenName
* init'ed(return_value)
*/
69 return screenName;
70 }
71
72 public void setScreenName(String screenName) {
/*
P/P * Method: void setScreenName(String)
*
* Postconditions:
* this.screenName == screenName
* init'ed(this.screenName)
*/
73 this.screenName = screenName;
74 }
75
76 public String getFullName() {
/*
P/P * Method: String getFullName()
*
* Preconditions:
* init'ed(this.fullName)
*
* Postconditions:
* return_value == this.fullName
* init'ed(return_value)
*/
77 return fullName;
78 }
79
80 public void setFullName(String fullName) {
/*
P/P * Method: void setFullName(String)
*
* Postconditions:
* this.fullName == fullName
* init'ed(this.fullName)
*/
81 this.fullName = fullName;
82 }
83
84 public String getEmailAddress() {
/*
P/P * Method: String getEmailAddress()
*
* Preconditions:
* init'ed(this.emailAddress)
*
* Postconditions:
* return_value == this.emailAddress
* init'ed(return_value)
*/
85 return emailAddress;
86 }
87
88 public void setEmailAddress(String emailAddress) {
/*
P/P * Method: void setEmailAddress(String)
*
* Postconditions:
* this.emailAddress == emailAddress
* init'ed(this.emailAddress)
*/
89 this.emailAddress = emailAddress;
90 }
91
92 public String getLocale() {
/*
P/P * Method: String getLocale()
*
* Preconditions:
* init'ed(this.locale)
*
* Postconditions:
* return_value == this.locale
* init'ed(return_value)
*/
93 return locale;
94 }
95
96 public void setLocale(String locale) {
/*
P/P * Method: void setLocale(String)
*
* Postconditions:
* this.locale == locale
* init'ed(this.locale)
*/
97 this.locale = locale;
98 }
99
100 public String getTimeZone() {
/*
P/P * Method: String getTimeZone()
*
* Preconditions:
* init'ed(this.timeZone)
*
* Postconditions:
* return_value == this.timeZone
* init'ed(return_value)
*/
101 return timeZone;
102 }
103
104 public void setTimeZone(String timeZone) {
/*
P/P * Method: void setTimeZone(String)
*
* Postconditions:
* this.timeZone == timeZone
* init'ed(this.timeZone)
*/
105 this.timeZone = timeZone;
106 }
107
108 public Boolean getEnabled() {
/*
P/P * Method: Boolean getEnabled()
*
* Preconditions:
* init'ed(this.enabled)
*
* Postconditions:
* return_value == this.enabled
* init'ed(return_value)
*/
109 return enabled;
110 }
111
112 public void setEnabled(Boolean enabled) {
/*
P/P * Method: void setEnabled(Boolean)
*
* Postconditions:
* this.enabled == enabled
* init'ed(this.enabled)
*/
113 this.enabled = enabled;
114 }
115
116 public String getActivationCode() {
/*
P/P * Method: String getActivationCode()
*
* Preconditions:
* init'ed(this.activationCode)
*
* Postconditions:
* return_value == this.activationCode
* init'ed(return_value)
*/
117 return activationCode;
118 }
119
120 public void setActivationCode(String activationCode) {
/*
P/P * Method: void setActivationCode(String)
*
* Postconditions:
* this.activationCode == activationCode
* init'ed(this.activationCode)
*/
121 this.activationCode = activationCode;
122 }
123
124 public boolean isAdministrator() {
/*
P/P * Method: bool isAdministrator()
*
* Preconditions:
* init'ed(this.administrator)
*
* Postconditions:
* return_value == this.administrator
* init'ed(return_value)
*/
125 return administrator;
126 }
127
128 public void setAdministrator(boolean administrator) {
/*
P/P * Method: void setAdministrator(bool)
*
* Postconditions:
* this.administrator == administrator
* init'ed(this.administrator)
*/
129 this.administrator = administrator;
130 }
131
132
133 public void copyTo(User dataHolder, Locale locale) {
134
/*
P/P * Method: void copyTo(User, Locale)
*
* Preconditions:
* dataHolder != null
* init'ed(this.activationCode)
* init'ed(this.emailAddress)
* this.enabled != null
* init'ed(this.fullName)
* init'ed(this.locale)
* init'ed(this.screenName)
* init'ed(this.timeZone)
*/
135 dataHolder.setScreenName(this.screenName);
136 dataHolder.setFullName(this.fullName);
137 dataHolder.setEmailAddress(this.emailAddress);
138 dataHolder.setLocale(this.locale);
139 dataHolder.setTimeZone(this.timeZone);
140 dataHolder.setEnabled(new Boolean(this.enabled));
141 dataHolder.setActivationCode(this.activationCode);
142 }
143
144
145 public void copyFrom(User dataHolder, Locale locale) {
146
/*
P/P * Method: void copyFrom(User, Locale)
*
* Preconditions:
* dataHolder != null
*
* Postconditions:
* init'ed(this.activationCode)
* init'ed(this.administrator)
* init'ed(this.emailAddress)
* init'ed(this.enabled)
* init'ed(this.fullName)
* init'ed(this.id)
* init'ed(this.locale)
* init'ed(this.password)
* init'ed(this.screenName)
* init'ed(this.timeZone)
* ...
*/
147 this.id = dataHolder.getId();
148 this.userName = dataHolder.getUserName();
149 this.password = dataHolder.getPassword();
150 this.screenName = dataHolder.getScreenName();
151 this.fullName = dataHolder.getFullName();
152 this.emailAddress = dataHolder.getEmailAddress();
153 this.locale = dataHolder.getLocale();
154 this.timeZone = dataHolder.getTimeZone();
155 this.enabled = dataHolder.getEnabled();
156 this.activationCode = dataHolder.getActivationCode();
157
158 this.administrator = dataHolder.hasRole("admin");
159 }
160
161 }
SofCheck Inspector Build Version : 2.18479
| CreateUserBean.java |
2009-Jan-02 14:25:26 |
| CreateUserBean.class |
2009-Sep-04 03:12:45 |