home *** CD-ROM | disk | FTP | other *** search
- package com.althea.client.shufflr.controller
- {
- import com.althea.client.shufflr.ApplicationFacade;
- import com.althea.client.shufflr.model.SourceSiteProxy;
- import com.althea.client.shufflr.model.UserProxy;
- import com.althea.client.shufflr.model.vo.RegistrationDescriptor;
- import com.facebook.data.users.FacebookUser;
- import org.puremvc.as3.multicore.interfaces.ICommand;
- import org.puremvc.as3.multicore.interfaces.INotification;
- import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
-
- public class RegisterCommand extends SimpleCommand implements ICommand
- {
- public function RegisterCommand()
- {
- super();
- }
-
- private function get sourceSiteProxy() : SourceSiteProxy
- {
- return this.facade.retrieveProxy(SourceSiteProxy.NAME) as SourceSiteProxy;
- }
-
- override public function execute(param1:INotification) : void
- {
- var _loc3_:String = null;
- var _loc4_:RegistrationDescriptor = null;
- var _loc5_:String = null;
- var _loc6_:FacebookUser = null;
- var _loc2_:String = param1.getName();
- switch(_loc2_)
- {
- case ApplicationFacade.REGISTER:
- _loc4_ = param1.getBody() as RegistrationDescriptor;
- this.proxy.register(_loc4_);
- break;
- case ApplicationFacade.CHECK_USERNAME:
- _loc5_ = String(param1.getBody());
- this.proxy.checkUsername(_loc5_);
- break;
- case ApplicationFacade.FACEBOOK_DATA:
- _loc6_ = FacebookUser(param1.getBody());
- this.proxy.sendFacebookData(_loc6_);
- break;
- case ApplicationFacade.CHECK_KEY:
- _loc3_ = String(param1.getBody());
- this.proxy.checkKey(_loc3_);
- break;
- case ApplicationFacade.ACTIVATE_KEY:
- _loc3_ = String(param1.getBody());
- this.proxy.activateKey(_loc3_);
- break;
- case ApplicationFacade.READ_SOURCE_SITE:
- this.sourceSiteProxy.getSourceSiteTitle();
- }
- if(param1.getType() == "checkUsername")
- {
- }
- }
-
- private function get proxy() : UserProxy
- {
- return this.facade.retrieveProxy(UserProxy.NAME) as UserProxy;
- }
- }
- }
-
-