//# 0 errors, 61 messages
//#
/*
    //#Login.java:1:1: class: org.apache.roller.weblogger.ui.struts2.core.Login
    //#Login.java:1:1: method: org.apache.roller.weblogger.ui.struts2.core.Login.org.apache.roller.weblogger.ui.struts2.core.Login__static_init
 * 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.roller.weblogger.ui.struts2.util.UIAction;


/**
 * Handle user logins.
 */
public class Login extends UIAction {
    
    private String error = null;
    
    
    public Login() {
    //#Login.java:32: method: void org.apache.roller.weblogger.ui.struts2.core.Login.org.apache.roller.weblogger.ui.struts2.core.Login()
    //#Login.java:32: 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.Login
    //#    method: void org.apache.roller.weblogger.ui.struts2.core.Login()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.util.UIAction()
    //#input(void org.apache.roller.weblogger.ui.struts2.core.Login()): this
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Login()): this.error
    //#output(void org.apache.roller.weblogger.ui.struts2.core.Login()): this.pageTitle
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Login()): this.error == null
    //#post(void org.apache.roller.weblogger.ui.struts2.core.Login()): this.pageTitle == &"loginPage.title"
        this.pageTitle = "loginPage.title";
    }
    //#Login.java:34: end of method: void org.apache.roller.weblogger.ui.struts2.core.Login.org.apache.roller.weblogger.ui.struts2.core.Login()
    
    
    // override default security, we do not require an authenticated user
    public boolean isUserRequired() {
        return false;
    //#Login.java:39: method: bool org.apache.roller.weblogger.ui.struts2.core.Login.isUserRequired()
    //#output(bool isUserRequired()): return_value
    //#post(bool isUserRequired()): return_value == 0
    //#Login.java:39: end of method: bool org.apache.roller.weblogger.ui.struts2.core.Login.isUserRequired()
    }
    
    // override default security, we do not require an action weblog
    public boolean isWeblogRequired() {
        return false;
    //#Login.java:44: method: bool org.apache.roller.weblogger.ui.struts2.core.Login.isWeblogRequired()
    //#output(bool isWeblogRequired()): return_value
    //#post(bool isWeblogRequired()): return_value == 0
    //#Login.java:44: end of method: bool org.apache.roller.weblogger.ui.struts2.core.Login.isWeblogRequired()
    }
    
    
    public String execute() {
        
        // set action error message if there was login error
        if(getError() != null) {
    //#Login.java:51: method: String org.apache.roller.weblogger.ui.struts2.core.Login.execute()
    //#input(String execute()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Login]
    //#input(String execute()): __Descendant_Table[others]
    //#input(String execute()): __Dispatch_Table.getError()Ljava/lang/String;
    //#input(String execute()): this
    //#input(String execute()): this.__Tag
    //#input(String execute()): this.error
    //#output(String execute()): return_value
    //#pre[2] (String execute()): this.__Tag == org/apache/roller/weblogger/ui/struts2/core/Login
    //#pre[3] (String execute()): init'ed(this.error)
    //#post(String execute()): return_value == &"success"
    //#test_vector(String execute()): this.error: Addr_Set{null}, Inverse{null}
            addError("error.password.mismatch");
    //#Login.java:52: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.core.Login:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.core.Login
    //#    method: String execute()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.core.Login:addError(String)
        }
        
        return SUCCESS;
    //#Login.java:55: end of method: String org.apache.roller.weblogger.ui.struts2.core.Login.execute()
    }

    
    public String getError() {
        return error;
    //#Login.java:60: method: String org.apache.roller.weblogger.ui.struts2.core.Login.getError()
    //#input(String getError()): this
    //#input(String getError()): this.error
    //#output(String getError()): return_value
    //#pre[2] (String getError()): init'ed(this.error)
    //#post(String getError()): return_value == this.error
    //#post(String getError()): init'ed(return_value)
    //#Login.java:60: end of method: String org.apache.roller.weblogger.ui.struts2.core.Login.getError()
    }

    public void setError(String error) {
        this.error = error;
    //#Login.java:64: method: void org.apache.roller.weblogger.ui.struts2.core.Login.setError(String)
    //#input(void setError(String)): error
    //#input(void setError(String)): this
    //#output(void setError(String)): this.error
    //#post(void setError(String)): this.error == error
    //#post(void setError(String)): init'ed(this.error)
    }
    //#Login.java:65: end of method: void org.apache.roller.weblogger.ui.struts2.core.Login.setError(String)
    
}
    //#output(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Login]
    //#output(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.execute()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.getError()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.isUserRequired()Z
    //#output(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.isWeblogRequired()Z
    //#output(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.setError(Ljava/lang/String;)V
    //#post(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/core/Login] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.execute()Ljava/lang/String; == &execute
    //#post(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.getError()Ljava/lang/String; == &getError
    //#post(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.isUserRequired()Z == &isUserRequired
    //#post(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.isWeblogRequired()Z == &isWeblogRequired
    //#post(org.apache.roller.weblogger.ui.struts2.core.Login__static_init): __Dispatch_Table.setError(Ljava/lang/String;)V == &setError
    //#Login.java:: end of method: org.apache.roller.weblogger.ui.struts2.core.Login.org.apache.roller.weblogger.ui.struts2.core.Login__static_init
    //#Login.java:: end of class: org.apache.roller.weblogger.ui.struts2.core.Login
