//# 0 errors, 218 messages
//#
/*
    //#Profile.java:1:1: class: org.apache.roller.weblogger.ui.struts2.core.Profile
 * Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  The ASF licenses this file to You
 * 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.  For additional information regarding
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.
 */

package org.apache.roller.weblogger.ui.struts2.core;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.business.UserManager;
import org.apache.roller.weblogger.pojos.User;
import org.apache.roller.weblogger.ui.struts2.util.UIAction;
import org.apache.struts2.interceptor.validation.SkipValidation;


/**
 * Allows user to edit his/her profile.
 *
 * TODO: check on the impact of deleting that cookieLogin stuff
 */
public class Profile extends UIAction {
    
    private static Log log = LogFactory.getLog(Profile.class);
    //#Profile.java:39: method: org.apache.roller.weblogger.ui.struts2.core.Profile.org.apache.roller.weblogger.ui.struts2.core.Profile__static_init
    //#Profile.java:39: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: org.apache.roller.weblogger.ui.struts2.core.Profile__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Profile]
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.execute()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/core/ProfileBean;
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.isWeblogRequired()Z
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.myValidate()V
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.save()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.setBean(Lorg/apache/roller/weblogger/ui/struts2/core/ProfileBean;)V
    //#output(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): log
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Profile] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.execute()Ljava/lang/String; == &execute
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/core/ProfileBean; == &getBean
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.isWeblogRequired()Z == &isWeblogRequired
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.myValidate()V == &myValidate
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.save()Ljava/lang/String; == &save
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): __Dispatch_Table.setBean(Lorg/apache/roller/weblogger/ui/struts2/core/ProfileBean;)V == &setBean
    //#post(org.apache.roller.weblogger.ui.struts2.core.Profile__static_init): init'ed(log)
    //#Profile.java:39: end of method: org.apache.roller.weblogger.ui.struts2.core.Profile.org.apache.roller.weblogger.ui.struts2.core.Profile__static_init
    
    private ProfileBean bean = new ProfileBean();
    
    
    public Profile() {
    //#Profile.java:44: method: void org.apache.roller.weblogger.ui.struts2.core.Profile.org.apache.roller.weblogger.ui.struts2.core.Profile()
    //#Profile.java:44: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.util.UIAction()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: void org.apache.roller.weblogger.ui.struts2.core.Profile()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.util.UIAction()
    //#input(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): new ProfileBean(Profile#1) num objects
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.__Tag
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.emailAddress
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.fullName
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.id
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.locale
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.password
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.passwordConfirm
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.passwordText
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.screenName
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.timeZone
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.userName
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.pageTitle
    //#new obj(void org.apache.roller.weblogger.ui.struts2.core.Profile()): new ProfileBean(Profile#1)
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean == &new ProfileBean(Profile#1)
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.pageTitle == &"yourProfile.title"
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): new ProfileBean(Profile#1) num objects == 1
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/core/ProfileBean
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.emailAddress == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.fullName == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.id == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.locale == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.password == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.passwordConfirm == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.passwordText == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.screenName == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.timeZone == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Profile()): this.bean.userName == null
        this.pageTitle = "yourProfile.title";
    }
    //#Profile.java:46: end of method: void org.apache.roller.weblogger.ui.struts2.core.Profile.org.apache.roller.weblogger.ui.struts2.core.Profile()
    
    // override default security, we do not require an action weblog
    public boolean isWeblogRequired() {
        return false;
    //#Profile.java:50: method: bool org.apache.roller.weblogger.ui.struts2.core.Profile.isWeblogRequired()
    //#output(bool isWeblogRequired()): return_value
    //#post(bool isWeblogRequired()): return_value == 0
    //#Profile.java:50: end of method: bool org.apache.roller.weblogger.ui.struts2.core.Profile.isWeblogRequired()
    }
    
    
    @SkipValidation
    public String execute() {
        
        User ud = getAuthenticatedUser();
    //#Profile.java:57: method: String org.apache.roller.weblogger.ui.struts2.core.Profile.execute()
    //#Profile.java:57: Warning: method not available
    //#    -- call on User org.apache.roller.weblogger.ui.struts2.core.Profile:getAuthenticatedUser()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String execute()
    //#    unanalyzed callee: User org.apache.roller.weblogger.ui.struts2.core.Profile:getAuthenticatedUser()
    //#input(String execute()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Profile]
    //#input(String execute()): __Descendant_Table[others]
    //#input(String execute()): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/core/ProfileBean;
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/ProfileBean]
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Descendant_Table[others]
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.copyFrom(Lorg/apache/roller/weblogger/pojos/User;)V
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.setLocale(Ljava/lang/String;)V
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.setPasswordConfirm(Ljava/lang/String;)V
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.setPasswordText(Ljava/lang/String;)V
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.setTimeZone(Ljava/lang/String;)V
    //#input(String execute()): this
    //#input(String execute()): this.__Tag
    //#input(String execute()): this.bean
    //#input(String execute()): this.bean.__Tag
    //#output(String execute()): return_value
    //#output(String execute()): this.bean.emailAddress
    //#output(String execute()): this.bean.fullName
    //#output(String execute()): this.bean.id
    //#output(String execute()): this.bean.locale
    //#output(String execute()): this.bean.password
    //#output(String execute()): this.bean.passwordConfirm
    //#output(String execute()): this.bean.passwordText
    //#output(String execute()): this.bean.screenName
    //#output(String execute()): this.bean.timeZone
    //#output(String execute()): this.bean.userName
    //#pre[2] (String execute()): this.__Tag == org/apache/roller/weblogger/ui/struts2/core/Profile
    //#pre[3] (String execute()): this.bean != null
    //#pre[4] (String execute()): this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/core/ProfileBean
    //#presumption(String execute()): org.apache.roller.weblogger.ui.struts2.core.Profile:getAuthenticatedUser(...)@57 != null
    //#post(String execute()): return_value == &"input"
    //#post(String execute()): init'ed(this.bean.emailAddress)
    //#post(String execute()): init'ed(this.bean.fullName)
    //#post(String execute()): init'ed(this.bean.id)
    //#post(String execute()): init'ed(this.bean.locale)
    //#post(String execute()): init'ed(this.bean.password)
    //#post(String execute()): this.bean.passwordConfirm == null
    //#post(String execute()): this.bean.passwordText == null
    //#post(String execute()): init'ed(this.bean.screenName)
    //#post(String execute()): init'ed(this.bean.timeZone)
    //#post(String execute()): init'ed(this.bean.userName)
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getId
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getUserName
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getPassword
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getScreenName
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getFullName
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getEmailAddress
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getLocale
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.User:getTimeZone
        
        // load up the form from the users existing profile data
        getBean().copyFrom(ud);
    //#Profile.java:60: Warning: unused assignment in callee
    //#    unused assignment to (this.bean.locale, this.bean.timeZone) in copyFrom
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String execute()
        getBean().setPasswordText(null);
        getBean().setPasswordConfirm(null);
        getBean().setLocale(ud.getLocale());
    //#Profile.java:63: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.User:getLocale()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String execute()
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.User:getLocale()
        getBean().setTimeZone(ud.getTimeZone());
    //#Profile.java:64: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.User:getTimeZone()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String execute()
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.User:getTimeZone()

        return INPUT;
    //#Profile.java:66: end of method: String org.apache.roller.weblogger.ui.struts2.core.Profile.execute()
    }
    
    
    public String save() {
        
        myValidate();
    //#Profile.java:72: method: String org.apache.roller.weblogger.ui.struts2.core.Profile.save()
    //#input(String save()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Profile]
    //#input(String save()): __Descendant_Table[others]
    //#input(String save()): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/core/ProfileBean;
    //#input(String save()): __Dispatch_Table.myValidate()V
    //#input(String save()): log
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/ProfileBean]
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Descendant_Table[others]
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getEmailAddress()Ljava/lang/String;
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getFullName()Ljava/lang/String;
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getLocale()Ljava/lang/String;
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getPasswordConfirm()Ljava/lang/String;
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getPasswordText()Ljava/lang/String;
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getScreenName()Ljava/lang/String;
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getTimeZone()Ljava/lang/String;
    //#input(String save()): this
    //#input(String save()): this.__Tag
    //#input(String save()): this.bean
    //#input(String save()): this.bean.__Tag
    //#input(String save()): this.bean.emailAddress
    //#input(String save()): this.bean.fullName
    //#input(String save()): this.bean.locale
    //#input(String save()): this.bean.passwordConfirm
    //#input(String save()): this.bean.passwordText
    //#input(String save()): this.bean.screenName
    //#input(String save()): this.bean.timeZone
    //#output(String save()): return_value
    //#pre[3] (String save()): this.__Tag == org/apache/roller/weblogger/ui/struts2/core/Profile
    //#pre[1] (String save()): (soft) log != null
    //#pre[4] (String save()): (soft) this.bean != null
    //#pre[5] (String save()): (soft) this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/core/ProfileBean
    //#pre[6] (String save()): (soft) init'ed(this.bean.emailAddress)
    //#pre[7] (String save()): (soft) init'ed(this.bean.fullName)
    //#pre[8] (String save()): (soft) init'ed(this.bean.locale)
    //#pre[9] (String save()): (soft) init'ed(this.bean.passwordConfirm)
    //#pre[10] (String save()): (soft) this.bean.passwordText != null
    //#pre[11] (String save()): (soft) init'ed(this.bean.screenName)
    //#pre[12] (String save()): (soft) init'ed(this.bean.timeZone)
    //#presumption(String save()): org.apache.roller.weblogger.business.Weblogger:getUserManager(...)@97 != null
    //#presumption(String save()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@97 != null
    //#presumption(String save()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@99 != null
    //#presumption(String save()): org.apache.roller.weblogger.ui.struts2.core.Profile:getAuthenticatedUser(...)@76 != null
    //#post(String save()): return_value in Addr_Set{&"success",&"input"}
    //#unanalyzed(String save()): Effects-of-calling:org.apache.commons.lang.StringUtils:isEmpty
    //#unanalyzed(String save()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.core.Profile:addError
    //#unanalyzed(String save()): Effects-of-calling:java.lang.String:equals
    //#test_vector(String save()): org.apache.commons.lang.StringUtils:isEmpty(...)@86: {1}, {0}
    //#test_vector(String save()): org.apache.roller.weblogger.ui.struts2.core.Profile:hasActionErrors(...)@74: {1}, {0}
        
        if (!hasActionErrors()) {
    //#Profile.java:74: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.ui.struts2.core.Profile:hasActionErrors()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: bool org.apache.roller.weblogger.ui.struts2.core.Profile:hasActionErrors()
            // We ONLY modify the user currently logged in
            User existingUser = getAuthenticatedUser();
    //#Profile.java:76: Warning: method not available
    //#    -- call on User org.apache.roller.weblogger.ui.struts2.core.Profile:getAuthenticatedUser()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: User org.apache.roller.weblogger.ui.struts2.core.Profile:getAuthenticatedUser()
            
            // We want to be VERY selective about what data gets updated
            existingUser.setScreenName(getBean().getScreenName());
    //#Profile.java:79: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.User:setScreenName(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.User:setScreenName(String)
            existingUser.setFullName(getBean().getFullName());
    //#Profile.java:80: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.User:setFullName(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.User:setFullName(String)
            existingUser.setEmailAddress(getBean().getEmailAddress());
    //#Profile.java:81: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.User:setEmailAddress(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.User:setEmailAddress(String)
            existingUser.setLocale(getBean().getLocale());
    //#Profile.java:82: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.User:setLocale(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.User:setLocale(String)
            existingUser.setTimeZone(getBean().getTimeZone());
    //#Profile.java:83: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.User:setTimeZone(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.User:setTimeZone(String)
            
            // If user set both password and passwordConfirm then reset password
            if (!StringUtils.isEmpty(getBean().getPasswordText()) && 
    //#Profile.java:86: Warning: method not available
    //#    -- call on bool org.apache.commons.lang.StringUtils:isEmpty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: bool org.apache.commons.lang.StringUtils:isEmpty(String)
                    !StringUtils.isEmpty(getBean().getPasswordConfirm())) {
                try {
                    existingUser.resetPassword(getBean().getPasswordText());
    //#Profile.java:89: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.User:resetPassword(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.User:resetPassword(String)
                } catch (WebloggerException e) {
                    addMessage("yourProfile.passwordResetError");
    //#Profile.java:91: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.core.Profile:addMessage(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.core.Profile:addMessage(String)
                }
            }
            
            try {
                // save the updated profile
                UserManager mgr = WebloggerFactory.getWeblogger().getUserManager();
    //#Profile.java:97: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#Profile.java:97: Warning: method not available
    //#    -- call on UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()
                mgr.saveUser(existingUser);
    //#Profile.java:98: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.UserManager:saveUser(User)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.UserManager:saveUser(User)
                WebloggerFactory.getWeblogger().flush();
    //#Profile.java:99: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#Profile.java:99: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
                
                // TODO: i18n
                addMessage("profile updated.");
    //#Profile.java:102: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.core.Profile:addMessage(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.core.Profile:addMessage(String)
                
                return SUCCESS;
                
            } catch (WebloggerException ex) {
                log.error("ERROR in action", ex);
    //#Profile.java:107: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
                // TODO: i18n
                addError("unexpected error doing profile save");
    //#Profile.java:109: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.core.Profile:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.core.Profile:addError(String)
            }
            
        }
        
        return INPUT;
    //#Profile.java:114: end of method: String org.apache.roller.weblogger.ui.struts2.core.Profile.save()
    }
    
    
    public void myValidate() {
        
        // check that passwords match if they were specified
        if(!StringUtils.isEmpty(getBean().getPasswordText())) {
    //#Profile.java:121: method: void org.apache.roller.weblogger.ui.struts2.core.Profile.myValidate()
    //#Profile.java:121: Warning: method not available
    //#    -- call on bool org.apache.commons.lang.StringUtils:isEmpty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: void myValidate()
    //#    unanalyzed callee: bool org.apache.commons.lang.StringUtils:isEmpty(String)
    //#input(void myValidate()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Profile]
    //#input(void myValidate()): __Descendant_Table[others]
    //#input(void myValidate()): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/core/ProfileBean;
    //#input(void myValidate()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/ProfileBean]
    //#input(void myValidate()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Descendant_Table[others]
    //#input(void myValidate()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getPasswordConfirm()Ljava/lang/String;
    //#input(void myValidate()): org/apache/roller/weblogger/ui/struts2/core/ProfileBean.__Dispatch_Table.getPasswordText()Ljava/lang/String;
    //#input(void myValidate()): this
    //#input(void myValidate()): this.__Tag
    //#input(void myValidate()): this.bean
    //#input(void myValidate()): this.bean.__Tag
    //#input(void myValidate()): this.bean.passwordConfirm
    //#input(void myValidate()): this.bean.passwordText
    //#pre[2] (void myValidate()): this.__Tag == org/apache/roller/weblogger/ui/struts2/core/Profile
    //#pre[3] (void myValidate()): this.bean != null
    //#pre[4] (void myValidate()): this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/core/ProfileBean
    //#pre[5] (void myValidate()): (soft) init'ed(this.bean.passwordConfirm)
    //#pre[6] (void myValidate()): (soft) this.bean.passwordText != null
    //#test_vector(void myValidate()): java.lang.String:equals(...)@122: {1}, {0}
    //#test_vector(void myValidate()): org.apache.commons.lang.StringUtils:isEmpty(...)@121: {1}, {0}
            if(!getBean().getPasswordText().equals(getBean().getPasswordConfirm())) {
                addError("Register.error.passowordMismatch");
    //#Profile.java:123: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.core.Profile:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Profile
    //#    method: void myValidate()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.core.Profile:addError(String)
            }
        }
    }
    //#Profile.java:126: end of method: void org.apache.roller.weblogger.ui.struts2.core.Profile.myValidate()
    
    
    public ProfileBean getBean() {
        return bean;
    //#Profile.java:130: method: ProfileBean org.apache.roller.weblogger.ui.struts2.core.Profile.getBean()
    //#input(ProfileBean getBean()): this
    //#input(ProfileBean getBean()): this.bean
    //#output(ProfileBean getBean()): return_value
    //#pre[2] (ProfileBean getBean()): init'ed(this.bean)
    //#post(ProfileBean getBean()): return_value == this.bean
    //#post(ProfileBean getBean()): init'ed(return_value)
    //#Profile.java:130: end of method: ProfileBean org.apache.roller.weblogger.ui.struts2.core.Profile.getBean()
    }

    public void setBean(ProfileBean bean) {
        this.bean = bean;
    //#Profile.java:134: method: void org.apache.roller.weblogger.ui.struts2.core.Profile.setBean(ProfileBean)
    //#input(void setBean(ProfileBean)): bean
    //#input(void setBean(ProfileBean)): this
    //#output(void setBean(ProfileBean)): this.bean
    //#post(void setBean(ProfileBean)): this.bean == bean
    //#post(void setBean(ProfileBean)): init'ed(this.bean)
    }
    //#Profile.java:135: end of method: void org.apache.roller.weblogger.ui.struts2.core.Profile.setBean(ProfileBean)
    
}
    //#Profile.java:: end of class: org.apache.roller.weblogger.ui.struts2.core.Profile
