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.PostCommandProxy;
- import org.puremvc.as3.multicore.interfaces.ICommand;
- import org.puremvc.as3.multicore.interfaces.INotification;
- import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
-
- public class PostCommand extends SimpleCommand implements ICommand
- {
- public function PostCommand()
- {
- super();
- }
-
- override public function execute(param1:INotification) : void
- {
- var _loc4_:Array = null;
- var _loc2_:String = param1.getName();
- var _loc3_:Object = param1.getBody();
- switch(_loc2_)
- {
- case ApplicationFacade.POST_COMMENT:
- this.proxy.postComment(_loc3_.videoId,_loc3_.comment);
- break;
- case ApplicationFacade.POST_BOOKMARK:
- this.proxy.bookmark(_loc3_.videoId,_loc3_.tags,_loc3_.privateTag);
- break;
- case ApplicationFacade.POST_SHARE:
- this.proxy.share(_loc3_.videoId,_loc3_.shareNote,_loc3_.shareOnFB);
- break;
- case ApplicationFacade.POST_RATING:
- this.proxy.rate(_loc3_.videoId,_loc3_.rating);
- break;
- case ApplicationFacade.POST_FOLLOW:
- this.proxy.follow(_loc3_.userId);
- break;
- case ApplicationFacade.POST_SHORTCUT:
- this.proxy.createShortcut(_loc3_.shortcut);
- break;
- case ApplicationFacade.FEEDBACK:
- this.proxy.feedback(_loc3_.component,_loc3_.content);
- break;
- case ApplicationFacade.VIDEO_VIEWED:
- this.proxy.videoViewed(_loc3_.videoId,_loc3_.privateMode);
- break;
- case ApplicationFacade.REPORT_BROKEN_LINK:
- this.proxy.reportBrokenLink(_loc3_.videoId);
- break;
- case ApplicationFacade.EDIT_PROFILE:
- this.proxy.editProfile(_loc3_);
- break;
- case ApplicationFacade.CHANGE_PASSWORD:
- this.proxy.changePassword(_loc3_.oldPassword,_loc3_.newPassword);
- break;
- case ApplicationFacade.PASSWORD_RECOVERY:
- this.proxy.recoverPassword(_loc3_.username);
- break;
- case ApplicationFacade.SEND_QUESTIONNAIRE:
- _loc4_ = param1.getBody() as Array;
- this.proxy.sendQuestionnaire(_loc4_);
- break;
- case ApplicationFacade.FACEBOOK_KEYS:
- this.proxy.sendFbKeys(_loc3_.secret,_loc3_.session_key,_loc3_.uid);
- break;
- case ApplicationFacade.EMAIL_INVITE:
- this.proxy.sendInvite(_loc3_.email,_loc3_.invite_text);
- }
- }
-
- private function get proxy() : PostCommandProxy
- {
- return this.facade.retrieveProxy(PostCommandProxy.NAME) as PostCommandProxy;
- }
- }
- }
-
-