Mercurial > hg > Database > jungle-network
comparison src/main/java/app/bbs/codesegment/LogUpdateCodeSegment.java @ 123:495ac60d7f5f
Modified JungleUpdater
author | one |
---|---|
date | Fri, 27 Dec 2013 20:13:37 +0900 |
parents | 7d9b7fcb4d9a |
children | 48d342e72dd7 |
comparison
equal
deleted
inserted
replaced
122:cef245f71053 | 123:495ac60d7f5f |
---|---|
6 | 6 |
7 import alice.codesegment.CodeSegment; | 7 import alice.codesegment.CodeSegment; |
8 import alice.datasegment.CommandType; | 8 import alice.datasegment.CommandType; |
9 import alice.datasegment.Receiver; | 9 import alice.datasegment.Receiver; |
10 import alice.jungle.operations.NetworkTreeOperationLog; | 10 import alice.jungle.operations.NetworkTreeOperationLog; |
11 import app.bbs.JungleManager; | 11 import app.bbs.BullentInBoardJungleManager; |
12 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor; | 12 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor; |
13 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; | 13 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; |
14 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; | 14 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; |
15 | 15 |
16 public class LogUpdateCodeSegment extends CodeSegment { | 16 public class LogUpdateCodeSegment extends CodeSegment { |
32 int index = log.index; | 32 int index = log.index; |
33 NetworkTreeOperationLog netLog = log.asClass(NetworkTreeOperationLog.class); | 33 NetworkTreeOperationLog netLog = log.asClass(NetworkTreeOperationLog.class); |
34 @SuppressWarnings("unchecked") | 34 @SuppressWarnings("unchecked") |
35 List<String> list = clist.asClass(List.class); | 35 List<String> list = clist.asClass(List.class); |
36 if (!log.from.equals("local")) { | 36 if (!log.from.equals("local")) { |
37 Either<Error, JungleTreeEditor> either = JungleManager.update(netLog); | 37 Either<Error, JungleTreeEditor> either = BullentInBoardJungleManager.update(netLog); |
38 if(either.isA()) { | 38 if(either.isA()) { |
39 /* Should throw after new LogUpdateCodeSegment */ | 39 /* Should throw after new LogUpdateCodeSegment */ |
40 throw new IllegalStateException(); | 40 throw new IllegalStateException(); |
41 } | 41 } |
42 } | 42 } |