Changeset 19632


Ignore:
Timestamp:
02/02/12 19:37:10 (4 months ago)
Author:
tha
Message:

New features for comment service

  • new cdAction (Sync, ask an update since a timestamp)
  • default response is build on Sync response (instead of List)


Minor bugs corrections

Location:
trunk/Jav_Wsp/src/eu/scenari/wsp/service/comment
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Jav_Wsp/src/eu/scenari/wsp/service/comment/CommentAction.java

    r19527 r19632  
    4949        public static final int sUPDATE = 3; 
    5050 
     51        public static final int sRESPOND = 4; 
     52 
    5153        protected int fAction; 
    5254 
     
    5557        protected long fTimeStamp; 
    5658 
     59        protected CommentThread fCommentThread; 
     60 
    5761        public CommentAction() { 
    5862                fTimeStamp = -1; 
    5963        } 
    6064 
    61         public CommentAction(int pAction, OriPath pOripath, long pTimeStamp) { 
     65        public CommentAction(int pAction, OriPath pOripath, long pTimeStamp, CommentThread pCommentThread) { 
    6266                this.fAction = pAction; 
    6367                this.fOripath = pOripath; 
    6468                this.fTimeStamp = pTimeStamp; 
     69                this.fCommentThread = pCommentThread; 
    6570        } 
    6671 
     
    8994        } 
    9095 
     96        public CommentThread getCommentThread() { 
     97                return fCommentThread; 
     98        } 
     99 
     100        public void setCommentThread(CommentThread pCommentThread) { 
     101                fCommentThread = pCommentThread; 
     102        } 
     103 
    91104} 
  • trunk/Jav_Wsp/src/eu/scenari/wsp/service/comment/CommentActionsStack.java

    r19527 r19632  
    8282                                if (!vKnownTimeStamp) { 
    8383                                        fTable.put(vId, new ArrayList<CommentAction>()); 
    84                                         fTable.get(vId).add(new CommentAction(CommentAction.sINIT, null, vSrcNode.getLastModif())); 
     84                                        fTable.get(vId).add(new CommentAction(CommentAction.sINIT, null, vSrcNode.getLastModif(), null)); 
    8585                                } 
    8686                        } 
     
    8888                        else { 
    8989                                fTable.put(vId, new ArrayList<CommentAction>()); 
    90                                 fTable.get(vId).add(new CommentAction(CommentAction.sINIT, null, vSrcNode.getLastModif())); 
     90                                fTable.get(vId).add(new CommentAction(CommentAction.sINIT, null, vSrcNode.getLastModif(), null)); 
    9191                        } 
    9292                } 
     
    105105                                if (vCommentAction.getAction() == CommentAction.sINIT) { 
    106106                                        return false; 
    107                                 } else { 
     107                                } else if (pOripath != null) { 
    108108                                        vSuccess = pOripath.updatePath(vCommentAction.getAction(), vCommentAction.fOripath); 
    109109                                } 
     
    111111                } 
    112112                return vSuccess; 
     113        } 
     114 
     115        public boolean checkTimeStamp(long pRequestTimeStamp, String pRefUri) { 
     116                for (CommentAction vCommentAction : fTable.get(pRefUri)) { 
     117                        if (pRequestTimeStamp < vCommentAction.getTimeStamp()) { 
     118                                if (vCommentAction.getAction() == CommentAction.sINIT) return false; 
     119                        } 
     120                } 
     121                return true; 
    113122        } 
    114123 
     
    125134        } 
    126135 
     136        public List<CommentAction> getCommentActionSinceTimeStamp(String pId, long pTimeStamp) throws Exception { 
     137 
     138                List<CommentAction> vResult = new ArrayList<CommentAction>(); 
     139                if (fTable.containsKey(pId)) { 
     140                        for (CommentAction vCommentAction : fTable.get(pId)) { 
     141                                if (vCommentAction.getTimeStamp() > pTimeStamp) vResult.add(vCommentAction); 
     142                        } 
     143                } 
     144                return vResult; 
     145        } 
     146 
    127147} 
  • trunk/Jav_Wsp/src/eu/scenari/wsp/service/comment/CommentThread.java

    r19527 r19632  
    5151        protected boolean fChecked; 
    5252 
     53        protected char fStatut; 
     54 
     55        public static char sSTATUT_LISTE = '='; 
     56 
     57        public static char sSTATUT_ADD = '+'; 
     58 
     59        public static char sSTATUT_REMOVE = '-'; 
     60 
     61        public static char sSTATUT_UPDATE = '~'; 
     62 
    5363        public CommentThread() { 
    5464                super(); 
     65                fStatut = sSTATUT_LISTE; 
    5566        } 
    5667 
     
    7990        public void toJson(JsonSerializer pJson) throws Exception { 
    8091                pJson.startObject(); 
     92                pJson.key("sync"); 
     93                pJson.val(fStatut); 
    8194                pJson.key("oriPath"); 
    8295                pJson.valString(fOriPath); 
    8396                pJson.key("threadClosed"); 
    8497                pJson.valBoolean(fChecked); 
     98 
    8599                pJson.key("comments"); 
    86100                pJson.startArray(); 
     
    101115        } 
    102116 
     117        public void setStatut(char pStatut) { 
     118                fStatut = pStatut; 
     119        } 
     120 
    103121}; 
  • trunk/Jav_Wsp/src/eu/scenari/wsp/service/comment/OriPath.java

    r19527 r19632  
    142142 
    143143                boolean vSuccess = true; 
    144                 boolean vSameSize; 
    145  
    146                 if (fRelativePath.length == pOriPath.getRelativePath().length) 
    147                         vSameSize = true; 
    148                 else vSameSize = false; 
    149                 int vMax = Math.min(fRelativePath.length, pOriPath.getRelativePath().length); 
    150                 for (int i = 0; i < vMax; i++) { 
    151                         //mark as changed at the first difference only !!! 
    152                         if (pOriPath.getRelativePath()[i] != fRelativePath[i]) { 
    153                                 if (pOriPath.getRelativePath()[i] < fRelativePath[i]) switch (pAction) { 
    154                                 case CommentAction.sCREATE: 
    155                                         fRelativePath[i]++; 
    156                                         break; 
    157                                 case CommentAction.sDELETE: 
    158                                         fRelativePath[i]--; 
    159                                         break; 
    160                                 } 
    161                                 break; 
    162                         } 
    163                         //If same relative Path and an action on the full comment 
    164                         if (i + 1 == vMax && vSameSize && pOriPath.getRelativeCommentOrder() == sNO_RELATIVE_COMMENT_ORDER) { 
    165                                 switch (pAction) { 
    166                                 case CommentAction.sCREATE: 
    167                                         fRelativePath[i]++; 
    168                                         break; 
    169                                 //THIS COMMENT WAS UNFORTUNATELY REMOVED 
    170                                 case CommentAction.sDELETE: 
    171                                         vSuccess = false; 
    172                                         break; 
    173  
    174                                 case CommentAction.sUPDATE: 
    175                                         vSuccess = false; 
    176                                         break; 
    177                                 } 
    178                         } 
    179                         //if same relative path and an action on a comment in the thread 
    180                         else if (i + 1 == vMax && vSameSize) { 
    181                                 if (pOriPath.getRelativeCommentOrder() < fRelativeCommentOrder) { 
     144 
     145                if (fRelativePath.length >= pOriPath.getRelativePath().length) { 
     146                        for (int i = 0; i < pOriPath.getRelativePath().length; i++) { 
     147                                //case the Action was on an other branch 
     148                                if (i != pOriPath.getRelativePath().length - 1 && fRelativePath[i] != pOriPath.getRelativePath()[i]) break; 
     149                                //Case the action wes on an uncle/brother ... 
     150                                if (i == pOriPath.getRelativePath().length - 1 && fRelativePath[i] > pOriPath.getRelativePath()[i] && pOriPath.getRelativeCommentOrder() == sNO_RELATIVE_COMMENT_ORDER) { 
    182151                                        switch (pAction) { 
    183152                                        case CommentAction.sCREATE: 
    184                                                 fRelativeCommentOrder++; 
     153                                                fRelativePath[i]++; 
    185154                                                break; 
    186  
    187155                                        case CommentAction.sDELETE: 
    188                                                 fRelativeCommentOrder--; 
    189                                                 break; 
    190                                         } 
    191                                 } else if (pOriPath.getRelativeCommentOrder() == fRelativeCommentOrder) { 
    192                                         switch (pAction) { 
    193                                         case CommentAction.sCREATE: 
    194                                                 fRelativeCommentOrder++; 
    195                                                 break; 
    196                                         //THIS COMMENT WAS UNFORTUNATELY REMOVED 
    197                                         case CommentAction.sDELETE: 
    198                                                 vSuccess = false; 
    199                                                 break; 
    200  
    201                                         case CommentAction.sUPDATE: 
    202                                                 vSuccess = false; 
     156                                                fRelativePath[i]--; 
    203157                                                break; 
    204158                                        } 
    205159                                } 
    206                         } 
    207                         //other cases, errors ! (a relative pass point a sub comment part of a comment 
    208                         else if (i + 1 == vMax) { 
    209                                 vSuccess = false; 
     160                                //Case the action was on the same node 
     161                                if (i == pOriPath.getRelativePath().length - 1 && fRelativePath[i] == pOriPath.getRelativePath()[i]) { 
     162                                        if (pOriPath.getRelativeCommentOrder() == sNO_RELATIVE_COMMENT_ORDER) { 
     163                                                switch (pAction) { 
     164                                                case CommentAction.sCREATE: 
     165                                                        fRelativePath[i]++; 
     166                                                        break; 
     167                                                //THIS COMMENT WAS UNFORTUNATELY REMOVED 
     168                                                case CommentAction.sDELETE: 
     169                                                        vSuccess = false; 
     170                                                        break; 
     171 
     172                                                case CommentAction.sUPDATE: 
     173                                                        vSuccess = false; 
     174                                                        break; 
     175                                                } 
     176                                        } else { 
     177                                                if (pOriPath.getRelativeCommentOrder() < fRelativeCommentOrder) { 
     178                                                        switch (pAction) { 
     179                                                        case CommentAction.sCREATE: 
     180                                                                fRelativeCommentOrder++; 
     181                                                                break; 
     182 
     183                                                        case CommentAction.sDELETE: 
     184                                                                fRelativeCommentOrder--; 
     185                                                                break; 
     186                                                        } 
     187                                                } else if (pOriPath.getRelativeCommentOrder() == fRelativeCommentOrder) { 
     188                                                        switch (pAction) { 
     189                                                        case CommentAction.sCREATE: 
     190                                                                fRelativeCommentOrder++; 
     191                                                                break; 
     192                                                        //THIS COMMENT WAS UNFORTUNATELY REMOVED 
     193                                                        case CommentAction.sDELETE: 
     194                                                                vSuccess = false; 
     195                                                                break; 
     196 
     197                                                        case CommentAction.sUPDATE: 
     198                                                                vSuccess = false; 
     199                                                                break; 
     200                                                        } 
     201                                                } 
     202                                        } 
     203                                } 
    210204                        } 
    211205                } 
  • trunk/Jav_Wsp/src/eu/scenari/wsp/service/comment/SvcCommentDialog.java

    r19527 r19632  
    8787 
    8888        /** 
     89         * CDACTION_SYNC : Envoie toutes les modifications dans les commentaires depuis TimeStamp. 
     90         *  
     91         * Param par défaut : Code de l'atelier. 
     92         * refUris : liste de srcUri ou srcId de la source pour laquelle obtenir les commentaires. 
     93         * TimeStamp : timestamp à partir duquel envoyer les dernières modifications dans les commentaires  
     94         */ 
     95        public static final String CDACTION_SYNC = "Sync"; 
     96 
     97        /** 
    8998         * CDACTION_CREATE : creation d'un nouveau thread de commentaires 
    9099         *  
     
    160169        public SvcCommentDialog(IService pService, CommentActionsStack pCommentActionsStack) { 
    161170                super(pService); 
    162                 fComments = new HashMap<String, List<CommentThread>>(); 
    163171                fLastActionsTable = pCommentActionsStack; 
    164172        } 
     
    193201                                        fOripathWrapper.insertComment(vCommentThread.toXml()); 
    194202                                        writeDom(fOripathWrapper.getDocument(), fSrcNodes.get(0)); 
    195                                         fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sCREATE, fOripath, fSrcNodes.get(0).getLastModif())); 
    196  
    197                                         listComments(fSrcNodes); 
     203                                        fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sCREATE, fOripath, fSrcNodes.get(0).getLastModif(), vCommentThread)); 
     204 
     205                                        listNewComments(fSrcNodes); 
    198206                                } else { 
    199207                                        listComments(fSrcNodes); 
     
    211219                                findSrcs(); 
    212220                                fLastActionsTable.updateTableFromSrc(fSrcNodes); 
     221                                CommentThread vThread; 
    213222                                if (fLastActionsTable.trackOripathEvolutions(fParamTimeStamp, fOripath)) { 
    214                                         if (fOripath.getRelativeCommentOrder() == -1) { 
     223                                        if (fOripath.getRelativeCommentOrder() == OriPath.sNO_RELATIVE_COMMENT_ORDER) { 
    215224                                                ScComment vComment = new ScComment(getContextUser().getAccount(), String.valueOf(System.currentTimeMillis()), fParamText); 
    216                                                 CommentThread vThread = new CommentThread(fOripath.toString()); 
     225                                                vThread = new CommentThread(fOripath.toString()); 
    217226                                                vThread.add(vComment); 
    218227                                                fOripathWrapper.updateComment(vThread.toXml()); 
     
    222231                                                List<CommentThread> vThreads = new ArrayList<CommentThread>(); 
    223232                                                vThreads = recursiveCommentsSearch(fOripathWrapper.getComment(), vThreads, fOripath.getRelativePathAsString()); 
    224                                                 //Sub case 1 comment exists in thread 
    225                                                 if (vThreads.size() == 1 && vThreads.get(0).size() > fOripath.getRelativeCommentOrder()) { 
    226                                                         vThreads.get(0).set(fOripath.getRelativeCommentOrder(), new ScComment(getContextUser().getAccount(), String.valueOf(System.currentTimeMillis()), fParamText)); 
    227                                                         fOripathWrapper.updateComment(vThreads.get(0).toXml()); 
    228                                                 }//Sub case 2 comments doesn't exists (ex : requested an update of the second comment but thread contains only one comment) 
    229                                                         //add a new comment in the thread 
    230                                                 else if (vThreads.size() == 1) { 
    231                                                         vThreads.get(0).add(new ScComment(getContextUser().getAccount(), String.valueOf(System.currentTimeMillis()), fParamText)); 
    232                                                         fOripathWrapper.updateComment(vThreads.get(0).toXml()); 
     233                                                if (vThreads.size() == 1) { 
     234                                                        vThread = vThreads.get(0); 
     235                                                        //Sub case 1 comment exists in thread 
     236                                                        if (vThread.size() > fOripath.getRelativeCommentOrder()) { 
     237                                                                vThread.set(fOripath.getRelativeCommentOrder(), new ScComment(getContextUser().getAccount(), String.valueOf(System.currentTimeMillis()), fParamText)); 
     238                                                                fOripathWrapper.updateComment(vThread.toXml()); 
     239                                                        }//Sub case 2 comments doesn't exists (ex : requested an update of the second comment but thread contains only one comment) 
     240                                                                //add a new comment in the thread 
     241                                                        else { 
     242                                                                vThread.add(new ScComment(getContextUser().getAccount(), String.valueOf(System.currentTimeMillis()), fParamText)); 
     243                                                                fOripathWrapper.updateComment(vThread.toXml()); 
     244                                                        } 
    233245                                                } else throw new Exception("This originpath doesn't point a SCENARI comment but a standard XML comment. Unable to update"); 
    234246                                        } 
    235  
    236                                         listComments(fSrcNodes); 
    237247                                        writeDom(fOripathWrapper.getDocument(), fSrcNodes.get(0)); 
    238                                         fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sUPDATE, fOripath, fSrcNodes.get(0).getLastModif())); 
    239                                         listComments(fSrcNodes); 
     248                                        fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sUPDATE, fOripath, fSrcNodes.get(0).getLastModif(), vThread)); 
     249                                        listNewComments(fSrcNodes); 
    240250                                } else { 
    241251                                        listComments(fSrcNodes); 
     
    257267                                        List<CommentThread> vThreads = new ArrayList<CommentThread>(); 
    258268                                        vThreads = recursiveCommentsSearch(fOripathWrapper.getComment(), vThreads, fOripath.getRelativePathAsString()); 
     269                                        CommentThread vThread; 
    259270                                        if (vThreads.size() == 1) { 
    260                                                 vThreads.get(0).add(new ScComment(getContextUser().getAccount(), String.valueOf(System.currentTimeMillis()), fParamText)); 
    261                                                 fOripathWrapper.updateComment(vThreads.get(0).toXml()); 
     271                                                vThread = vThreads.get(0); 
     272                                                vThread.add(new ScComment(getContextUser().getAccount(), String.valueOf(System.currentTimeMillis()), fParamText)); 
     273                                                fOripathWrapper.updateComment(vThread.toXml()); 
    262274                                                writeDom(fOripathWrapper.getDocument(), fSrcNodes.get(0)); 
    263                                                 fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sCREATE, fOripath, fSrcNodes.get(0).getLastModif())); 
     275                                                fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sCREATE, fOripath, fSrcNodes.get(0).getLastModif(), vThread)); 
    264276                                        } else { 
    265277                                                throw new Exception("This originpath doesn't point a SCENARI comment but a standard XML comment. Unable to respond"); 
    266278                                        } 
    267                                         listComments(fSrcNodes); 
     279                                        listNewComments(fSrcNodes); 
    268280 
    269281                                } else { 
     
    286298                                fLastActionsTable.updateTableFromSrc(fSrcNodes); 
    287299                                if (fLastActionsTable.trackOripathEvolutions(fParamTimeStamp, fOripath)) { 
    288                                         if (fOripath.getRelativeCommentOrder() == -1) { 
     300                                        List<CommentThread> vThreads = new ArrayList<CommentThread>(); 
     301                                        vThreads = recursiveCommentsSearch(fOripathWrapper.getComment(), vThreads, fOripath.getRelativePathAsString()); 
     302                                        CommentThread vThread = vThreads.get(0); 
     303 
     304                                        if (fOripath.getRelativeCommentOrder() == OriPath.sNO_RELATIVE_COMMENT_ORDER) { 
    289305                                                fOripathWrapper.removeNode(); 
    290306                                                writeDom(fOripathWrapper.getDocument(), fSrcNodes.get(0)); 
    291                                                 fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif())); 
     307                                                fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif(), vThread)); 
    292308 
    293309                                        } 
    294310                                        //Case oripath form is refUri#relativePath#commentNumberInThread 
    295311                                        else { 
    296                                                 List<CommentThread> vThreads = new ArrayList<CommentThread>(); 
    297                                                 vThreads = recursiveCommentsSearch(fOripathWrapper.getComment(), vThreads, fOripath.getRelativePathAsString()); 
    298312                                                // case everythings is fine 
    299313                                                if (vThreads.size() == 1 && vThreads.get(0).size() > fOripath.getRelativeCommentOrder()) { 
     
    304318                                                                fOripathWrapper.removeNode(); 
    305319                                                                writeDom(fOripathWrapper.getDocument(), fSrcNodes.get(0)); 
    306                                                                 fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif())); 
     320                                                                fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif(), vThread)); 
     321                                                                listNewComments(fSrcNodes); 
    307322 
    308323                                                        } 
     
    313328                                                                fOripathWrapper.updateComment(vThreads.get(0).toXml()); 
    314329                                                                writeDom(fOripathWrapper.getDocument(), fSrcNodes.get(0)); 
    315                                                                 fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif())); 
    316  
     330                                                                fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif(), vThread)); 
     331                                                                listNewComments(fSrcNodes); 
    317332                                                        } 
    318333                                                        //case the thread have no comments 
     
    322337                                                        fOripath.setRelativeCommentOrder(OriPath.sNO_RELATIVE_COMMENT_ORDER); 
    323338                                                        writeDom(fOripathWrapper.getDocument(), fSrcNodes.get(0)); 
    324                                                         fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif())); 
    325  
     339                                                        fLastActionsTable.addCommentAction(fSrcNodes.get(0), new CommentAction(CommentAction.sDELETE, fOripath, fSrcNodes.get(0).getLastModif(), vThread)); 
     340                                                        listNewComments(fSrcNodes); 
    326341                                                        //Case the node is not a thread or the comment index is out of boundary 
    327342                                                } else { 
     
    339354                        } 
    340355 
    341                         listComments(fSrcNodes); 
     356                } else if (CDACTION_SYNC.equals(vCdAction)) { 
     357                        findSrcs(); 
     358                        boolean vSucess = true; 
     359                        String vRefUri; 
     360                        fLastActionsTable.updateTableFromSrc(fSrcNodes); 
     361                        for (ISrcNode vSrcNode : fSrcNodes) { 
     362                                vRefUri = SrcFeatureIds.getSrcId(vSrcNode); 
     363                                if (vRefUri == null) { 
     364                                        vRefUri = SrcFeatureIds.getRefUri(vSrcNode); 
     365                                } 
     366                                vSucess = fLastActionsTable.checkTimeStamp(fParamTimeStamp, vRefUri); 
     367                                if (!vSucess) break; 
     368                        } 
     369                        if (fSrcNodes != null && vSucess) { 
     370                                listNewComments(fSrcNodes); 
     371                        } else { 
     372                                fSuccessfullRequest = false; 
     373                                listComments(fSrcNodes); 
     374                        } 
     375 
    342376                } else { 
    343377                        vResult = super.xExecuteDialog(); 
     
    348382        } 
    349383 
     384        protected void listNewComments(List<ISrcNode> pSrcNodes) { 
     385                fComments = new HashMap<String, List<CommentThread>>(); 
     386                for (ISrcNode vSrcNode : pSrcNodes) { 
     387                        try { 
     388                                String vId = SrcFeatureIds.getSrcId(vSrcNode); 
     389                                if (vId == null) vId = SrcFeatureIds.getRefUri(vSrcNode); 
     390 
     391                                List<CommentAction> vCommentActions = fLastActionsTable.getCommentActionSinceTimeStamp(vId, fParamTimeStamp); 
     392                                for (CommentAction vCommentAction : vCommentActions) { 
     393 
     394                                        switch (vCommentAction.fAction) { 
     395                                        case CommentAction.sCREATE: 
     396                                                //Case respond 
     397                                                if (vCommentAction.getOripath().getRelativeCommentOrder() != OriPath.sNO_RELATIVE_COMMENT_ORDER) { 
     398                                                        vCommentAction.getCommentThread().setStatut(CommentThread.sSTATUT_UPDATE); 
     399                                                } 
     400                                                //Case true creation 
     401                                                else { 
     402                                                        vCommentAction.getCommentThread().setStatut(CommentThread.sSTATUT_ADD); 
     403                                                } 
     404                                                break; 
     405                                        case CommentAction.sDELETE: 
     406                                                if (vCommentAction.getOripath().getRelativeCommentOrder() != OriPath.sNO_RELATIVE_COMMENT_ORDER) 
     407                                                        vCommentAction.getCommentThread().setStatut(CommentThread.sSTATUT_UPDATE); 
     408 
     409                                                else vCommentAction.getCommentThread().setStatut(CommentThread.sSTATUT_REMOVE); 
     410                                                break; 
     411                                        case CommentAction.sUPDATE: 
     412                                                vCommentAction.getCommentThread().setStatut(CommentThread.sSTATUT_UPDATE); 
     413                                                break; 
     414 
     415                                        default: 
     416                                                vCommentAction.getCommentThread().setStatut(CommentThread.sSTATUT_LISTE); 
     417                                                break; 
     418                                        } 
     419 
     420                                        if (!fComments.containsKey(vId)) fComments.put(vId, new ArrayList<CommentThread>()); 
     421                                        fComments.get(vId).add(vCommentAction.getCommentThread()); 
     422                                } 
     423                        } catch (Exception e) { 
     424                                LogMgr.addMessage(e, "Fail to find refUri : " + vSrcNode.getSrcUri()); 
     425                                fError = LogMgr.getMessage(e); 
     426                        } 
     427                } 
     428 
     429        } 
     430 
    350431        protected void listComments(List<ISrcNode> pSrcNodes) { 
     432                fComments = new HashMap<String, List<CommentThread>>(); 
    351433                for (ISrcNode vSrcNode : pSrcNodes) { 
    352434                        try { 
Note: See TracChangeset for help on using the changeset viewer.