home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / com / althea / client / shufflr / controller / PostCommand.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  3.0 KB  |  78 lines

  1. package com.althea.client.shufflr.controller
  2. {
  3.    import com.althea.client.shufflr.ApplicationFacade;
  4.    import com.althea.client.shufflr.model.PostCommandProxy;
  5.    import org.puremvc.as3.multicore.interfaces.ICommand;
  6.    import org.puremvc.as3.multicore.interfaces.INotification;
  7.    import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
  8.    
  9.    public class PostCommand extends SimpleCommand implements ICommand
  10.    {
  11.       public function PostCommand()
  12.       {
  13.          super();
  14.       }
  15.       
  16.       override public function execute(param1:INotification) : void
  17.       {
  18.          var _loc4_:Array = null;
  19.          var _loc2_:String = param1.getName();
  20.          var _loc3_:Object = param1.getBody();
  21.          switch(_loc2_)
  22.          {
  23.             case ApplicationFacade.POST_COMMENT:
  24.                this.proxy.postComment(_loc3_.videoId,_loc3_.comment);
  25.                break;
  26.             case ApplicationFacade.POST_BOOKMARK:
  27.                this.proxy.bookmark(_loc3_.videoId,_loc3_.tags,_loc3_.privateTag);
  28.                break;
  29.             case ApplicationFacade.POST_SHARE:
  30.                this.proxy.share(_loc3_.videoId,_loc3_.shareNote,_loc3_.shareOnFB);
  31.                break;
  32.             case ApplicationFacade.POST_RATING:
  33.                this.proxy.rate(_loc3_.videoId,_loc3_.rating);
  34.                break;
  35.             case ApplicationFacade.POST_FOLLOW:
  36.                this.proxy.follow(_loc3_.userId);
  37.                break;
  38.             case ApplicationFacade.POST_SHORTCUT:
  39.                this.proxy.createShortcut(_loc3_.shortcut);
  40.                break;
  41.             case ApplicationFacade.FEEDBACK:
  42.                this.proxy.feedback(_loc3_.component,_loc3_.content);
  43.                break;
  44.             case ApplicationFacade.VIDEO_VIEWED:
  45.                this.proxy.videoViewed(_loc3_.videoId,_loc3_.privateMode);
  46.                break;
  47.             case ApplicationFacade.REPORT_BROKEN_LINK:
  48.                this.proxy.reportBrokenLink(_loc3_.videoId);
  49.                break;
  50.             case ApplicationFacade.EDIT_PROFILE:
  51.                this.proxy.editProfile(_loc3_);
  52.                break;
  53.             case ApplicationFacade.CHANGE_PASSWORD:
  54.                this.proxy.changePassword(_loc3_.oldPassword,_loc3_.newPassword);
  55.                break;
  56.             case ApplicationFacade.PASSWORD_RECOVERY:
  57.                this.proxy.recoverPassword(_loc3_.username);
  58.                break;
  59.             case ApplicationFacade.SEND_QUESTIONNAIRE:
  60.                _loc4_ = param1.getBody() as Array;
  61.                this.proxy.sendQuestionnaire(_loc4_);
  62.                break;
  63.             case ApplicationFacade.FACEBOOK_KEYS:
  64.                this.proxy.sendFbKeys(_loc3_.secret,_loc3_.session_key,_loc3_.uid);
  65.                break;
  66.             case ApplicationFacade.EMAIL_INVITE:
  67.                this.proxy.sendInvite(_loc3_.email,_loc3_.invite_text);
  68.          }
  69.       }
  70.       
  71.       private function get proxy() : PostCommandProxy
  72.       {
  73.          return this.facade.retrieveProxy(PostCommandProxy.NAME) as PostCommandProxy;
  74.       }
  75.    }
  76. }
  77.  
  78.