Show
Ignore:
Timestamp:
07/04/08 12:48:31 (6 months ago)
Author:
yamashiro
Message:

マルチサービスでうまく動くようにしてコミットした。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/eclipse/sabotter/trunk/jp.xet.sabotter.core/src/jp/xet/sabotter/core/twitter/TwitterAdapterWrapper.java

    r15107 r15143  
    2424        private MiniblogServiceResponceListener listener; 
    2525         
     26        private String userId; 
     27         
    2628 
    2729        /** 
    2830         * コンストラクタ。 
    2931         *  
     32         * @param userId サービスを利用中のuserId 
    3033         * @param listener 
    3134         */ 
    32         public TwitterAdapterWrapper(MiniblogServiceResponceListener listener) { 
     35        public TwitterAdapterWrapper(MiniblogServiceResponceListener listener, String userId) { 
    3336                this.listener = listener; 
     37                this.userId = userId; 
    3438        } 
    3539         
     
    4448                 
    4549                for (Status status : statuses) { 
    46                         wrapList.add(new TwitterStatusEntry(status)); 
     50                        wrapList.add(new TwitterStatusEntry(status, this.userId)); 
    4751                } 
    4852                 
     
    6064                 
    6165                for (DirectMessage message : messages) { 
    62                         wrapList.add(new TwitterDirectMessageEntry(message)); 
     66                        wrapList.add(new TwitterDirectMessageEntry(message, this.userId)); 
    6367                } 
    6468                 
     
    7680                 
    7781                for (Status status : statuses) { 
    78                         wrapList.add(new TwitterStatusEntry(status)); 
     82                        wrapList.add(new TwitterStatusEntry(status, this.userId)); 
    7983                } 
    8084                 
     
    9094        public void onException(TwitterException ex, int method) { 
    9195                // FIXME 
    92 //              if (ex.getStatusCode() == 400) { // タイムライン取得制限 
    93 //                      SabotterPlugin.handleException(ex, SabotterPlugin.DIALOG, "API limit rate over."); 
    94 //              } 
    95 //              ex.printStackTrace(); 
     96// if (ex.getStatusCode() == 400) { // タイムライン取得制限 
     97// SabotterPlugin.handleException(ex, SabotterPlugin.DIALOG, "API limit rate over."); 
     98// } 
     99// ex.printStackTrace(); 
    96100                this.listener.onException(new MiniblogServiceException(ex), method); 
    97101        }