Commit 9daff9e1 by Lee Munkyeong

ルーム開設API修正。

parent 99e916bc
......@@ -603,8 +603,8 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException
* @throws AcmsException
*/
public CreatedRoomJSON createRoom(String sid, String roomType, String inviteMemberIds, String newRoomName) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetChatRooms, new CreateRoomParameters(sid, AcmsApis.RoomCmds.createRoom, roomType, inviteMemberIds, newRoomName));
public CreatedRoomJSON createRoom(String sid, String roomType, String inviteMemberIds, String newRoomName, String memberName) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetChatRooms, new CreateRoomParameters(sid, AcmsApis.RoomCmds.createRoom, roomType, inviteMemberIds, newRoomName, memberName));
CreatedRoomJSON json = new CreatedRoomJSON(response.httpResponseBody);
return json;
}
......
......@@ -19,6 +19,8 @@ public class CreateRoomParameters extends HttpParameterObject {
private String roomType;
private String inviteMemberIds;
private String newRoomName;
private String memberName;
/**
* {@link CreateRoomParameters} のインスタンスを初期化します。
* @param sid ログインした時のセッションIDです。
......@@ -34,12 +36,13 @@ public class CreateRoomParameters extends HttpParameterObject {
* @param cmd Apiリクエストに必要なコマンド(ABOOK COMM専用)。
* @since 1.0.0
*/
public CreateRoomParameters(String sid, String cmd, String roomType, String inviteMemberIds, String newRoomName) {
public CreateRoomParameters(String sid, String cmd, String roomType, String inviteMemberIds, String newRoomName, String memberName) {
this.sid = sid;
this.cmd = cmd;
this.roomType = roomType;
this.inviteMemberIds = inviteMemberIds;
this.newRoomName = newRoomName;
this.memberName = memberName;
}
/**
......@@ -71,4 +74,8 @@ public class CreateRoomParameters extends HttpParameterObject {
public String getNewRoomName() {
return newRoomName;
}
public String getMemberName() {
return memberName;
}
}
......@@ -299,6 +299,11 @@ public class CommunicationLogic extends AbstractLogic {
groupDao.deleteGroupList(deleteGroupList);
}
public ShopMemberDto getMyShopMemberDto() {
ShopMemberDto myInfo = shopMemberDao.getMyInfo();
return myInfo;
}
public void deleteChatRoomList() {
chatRoomDao.deleteChatRoom();
}
......
......@@ -92,6 +92,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private String shopName;
private boolean isOnline;
private Long roomId;
private Integer shopMemberId;
public AlertDialog myAlertDialog;
......@@ -135,6 +136,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
Logger.d("DEVICE_NOT_CONNECTED_NETWORK:");
}
shopMemberId = communicationLogic.getMyShopMemberDto().shopMemberId;
mChatWebView = findViewById(R.id.chatWebview2);
mChatWebView.setOverScrollMode(View.OVER_SCROLL_NEVER); //オーバースクロールしない。
mChatWebView.setVerticalScrollBarEnabled(false); //スクロールバーを消す。
......@@ -720,7 +724,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
@JavascriptInterface
public void createChatRoom(String roomType, String userIdList, String encodedRoomName) throws NetworkDisconnectedException, AcmsException {
CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName);
CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName, loginId);
communicationLogic.insertChatRoom(resultJson.chatRoomDto);
final Integer chatRoomId = resultJson.chatRoomDto.chatRoomId;
final String chatRoomName = resultJson.chatRoomDto.chatRoomName;
......@@ -779,11 +783,10 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public String getGroupInfo(String groupId) throws NetworkDisconnectedException, AcmsException {
public String getGroupInfo(String groupId) {
String groupInfoStr = communicationLogic.getGroupSearchData(Integer.parseInt(groupId));
return groupInfoStr;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment