// Path: robotlegs4android/src/main/java/com/camnter/robotlegs4android/mvcs/Command.java
// public abstract class Command {
// 
//     @Inject
//     public Object contextView;
// 
//     @Inject
//     public ICommandMap commandMap;
// 
//     @Inject
//     public IEventDispatcher eventDispatcher;
// 
//     @Inject
//     public IInjector injector;
// 
//     @Inject
//     public IMediatorMap mediatorMap;
// 
//     public Command() {
// 
//     }
// 
//     /**
//      * TODO - The Command subclass must inherit the execute method
//      * 备忘录 - Command子类必须继承execute方法
//      */
//     public abstract void execute();
// 
//     /**
//      * Dispatch helper method
//      * 调度辅助方法
//      *
//      * @param event The <code>Event</code> to dispatch on the
//      *              <code>IContext</code>'s <code>IEventDispatcher</code>
//      *              Event分派IContext的IEventDispatcher
//      * @return Boolean
//      */
//     protected Boolean dispatch(Event event) {
//         if (this.eventDispatcher.hasEventListener(event.getType()))
//             return this.eventDispatcher.dispatchEvent(event);
// 
//         return false;
//     }
// 
// }
// 
// Path: app/src/main/java/com/camnter/robotlegs4android/test/event/LoginEvent.java
// public class LoginEvent extends Event {
// 
//     public static final String USER_LOGIN = "user_login";
//     public static final String USER_LOGOUT = "user_logout";
// 
//     public static final String USER_LOGIN_SUCCESS_FROM_MODEL_TO_CONTROLLER = "user_login_success_from_model_to_controller";
//     public static final String USER_LOGIN_SUCCESS_FROM_MODEL_TO_VIEW = "user_login_success_from_model_to_view";
//     public static final String USER_LOGIN_SUCCESS_FROM_CONTROLLER_TO_VIEW = "user_login_success_from_controller_to_view";
// 
//     public String name;
//     public String password;
// 
//     public User user;
// 
//     public LoginEvent(String type) {
//         super(type);
//     }
// 
// }
// 
// Path: app/src/main/java/com/camnter/robotlegs4android/test/model/UserModel.java
// public class UserModel extends Actor {
// 
//     public void login(String name,String password) {
// 
//         // TODO Do you want to network requests
// 
//         User user = new User();
//         user.name = "CaMnter";
//         user.sign = "Save you from anything";
// 
//         /*
//          * you can send a your custom event from Model layer to View layer
//          * 你可以发送一个你自定义的事件从Model层到View层
//          */
//         LoginEvent loginEvent = new LoginEvent(LoginEvent.USER_LOGIN_SUCCESS_FROM_MODEL_TO_VIEW);
//         loginEvent.user = user;
//         this.dispatch(loginEvent);
//         this.dispatch(new LoginEvent(LoginEvent.USER_LOGIN_SUCCESS_FROM_MODEL_TO_CONTROLLER));
//     }
// 
//     public boolean logout(){
// 
//         // TODO Do you want to network requests
// 
//         return true;
//     }
// 
// 
// }


import android.util.Log;
import com.camnter.robotlegs4android.base.Inject;
import com.camnter.robotlegs4android.mvcs.Command;
import com.camnter.robotlegs4android.test.event.LoginEvent;
import com.camnter.robotlegs4android.test.model.UserModel;
/*
 * Copyright (C) 2015 CaMnter 421482590@qq.com
 *
 * Licensed 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.
 */

package com.camnter.robotlegs4android.test.controller;



/**
 * Description：Login
 * Created by：CaMnter
 * Time：2015-11-07 22:58
 */
public class Login extends Command {

    private static final String TAG = "Login";

    @Inject
    public UserModel userModel;

    @Inject
// Path: robotlegs4android/src/main/java/com/camnter/robotlegs4android/mvcs/Command.java
// public abstract class Command {
// 
//     @Inject
//     public Object contextView;
// 
//     @Inject
//     public ICommandMap commandMap;
// 
//     @Inject
//     public IEventDispatcher eventDispatcher;
// 
//     @Inject
//     public IInjector injector;
// 
//     @Inject
//     public IMediatorMap mediatorMap;
// 
//     public Command() {
// 
//     }
// 
//     /**
//      * TODO - The Command subclass must inherit the execute method
//      * 备忘录 - Command子类必须继承execute方法
//      */
//     public abstract void execute();
// 
//     /**
//      * Dispatch helper method
//      * 调度辅助方法
//      *
//      * @param event The <code>Event</code> to dispatch on the
//      *              <code>IContext</code>'s <code>IEventDispatcher</code>
//      *              Event分派IContext的IEventDispatcher
//      * @return Boolean
//      */
//     protected Boolean dispatch(Event event) {
//         if (this.eventDispatcher.hasEventListener(event.getType()))
//             return this.eventDispatcher.dispatchEvent(event);
// 
//         return false;
//     }
// 
// }
// 
// Path: app/src/main/java/com/camnter/robotlegs4android/test/event/LoginEvent.java
// public class LoginEvent extends Event {
// 
//     public static final String USER_LOGIN = "user_login";
//     public static final String USER_LOGOUT = "user_logout";
// 
//     public static final String USER_LOGIN_SUCCESS_FROM_MODEL_TO_CONTROLLER = "user_login_success_from_model_to_controller";
//     public static final String USER_LOGIN_SUCCESS_FROM_MODEL_TO_VIEW = "user_login_success_from_model_to_view";
//     public static final String USER_LOGIN_SUCCESS_FROM_CONTROLLER_TO_VIEW = "user_login_success_from_controller_to_view";
// 
//     public String name;
//     public String password;
// 
//     public User user;
// 
//     public LoginEvent(String type) {
//         super(type);
//     }
// 
// }
// 
// Path: app/src/main/java/com/camnter/robotlegs4android/test/model/UserModel.java
// public class UserModel extends Actor {
// 
//     public void login(String name,String password) {
// 
//         // TODO Do you want to network requests
// 
//         User user = new User();
//         user.name = "CaMnter";
//         user.sign = "Save you from anything";
// 
//         /*
//          * you can send a your custom event from Model layer to View layer
//          * 你可以发送一个你自定义的事件从Model层到View层
//          */
//         LoginEvent loginEvent = new LoginEvent(LoginEvent.USER_LOGIN_SUCCESS_FROM_MODEL_TO_VIEW);
//         loginEvent.user = user;
//         this.dispatch(loginEvent);
//         this.dispatch(new LoginEvent(LoginEvent.USER_LOGIN_SUCCESS_FROM_MODEL_TO_CONTROLLER));
//     }
// 
//     public boolean logout(){
// 
//         // TODO Do you want to network requests
// 
//         return true;
//     }
// 
// 
// }


// Path: app/src/main/java/com/camnter/robotlegs4android/test/controller/Login.java
import android.util.Log;
import com.camnter.robotlegs4android.base.Inject;
import com.camnter.robotlegs4android.mvcs.Command;
import com.camnter.robotlegs4android.test.event.LoginEvent;
import com.camnter.robotlegs4android.test.model.UserModel;

/*
 * Copyright (C) 2015 CaMnter 421482590@qq.com
 *
 * Licensed 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.
 */

package com.camnter.robotlegs4android.test.controller;



/**
 * Description：Login
 * Created by：CaMnter
 * Time：2015-11-07 22:58
 */
public class Login extends Command {

    private static final String TAG = "Login";

    @Inject
    public UserModel userModel;

    @Inject
    public LoginEvent event;