Commit 263341ce by Kang Donghun

Merge branch 'communication/abcomm_sp6_finish_collaboration' into 'communication/develop'

[チャットルーム]のチャット履歴から現在協業が進行中なのか終了されたのか確認できる

See merge request !147
parents cb06820c cc44e47a
...@@ -62,6 +62,7 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.EnterpriseLoginParameters; ...@@ -62,6 +62,7 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.EnterpriseLoginParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.EnterpriseNewLoginParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.EnterpriseNewLoginParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.FavoriteGroupParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.FavoriteGroupParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.FavoriteUserParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.FavoriteUserParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.FinishCollaborationParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetApertureMasterDataParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.GetApertureMasterDataParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetContentParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.GetContentParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetEnqueteReplyParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.GetEnqueteReplyParameters;
...@@ -795,10 +796,16 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -795,10 +796,16 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException * @throws NetworkDisconnectedException
* @throws AcmsException * @throws AcmsException
*/ */
public ArchiveDetailJSON joinCollaboration(String sid, Integer roomId) throws NetworkDisconnectedException, AcmsException { public void joinCollaboration(String sid, Integer roomId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetCollaboration, new JoinCollaborationParameters(sid, AcmsApis.CollaborationCmds.join, roomId)); HttpResponse response = send(AcmsApis.ApigetCollaboration, new JoinCollaborationParameters(sid, AcmsApis.CollaborationCmds.join, roomId));
ArchiveDetailJSON json = new ArchiveDetailJSON(response.httpResponseBody); if (response.httpResponseCode != 200) {
return json;
}
}
public void finishCollaboration(String sid, int roomId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetCollaboration, new FinishCollaborationParameters(sid, AcmsApis.CollaborationCmds.finish, roomId));
} }
/** /**
...@@ -813,10 +820,11 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -813,10 +820,11 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException * @throws NetworkDisconnectedException
* @throws AcmsException * @throws AcmsException
*/ */
public ArchiveDetailJSON inviteCollaboration(String sid, Integer roomId, String roomName, String inveitedUserIds, String collaborationType) throws NetworkDisconnectedException, AcmsException { public void inviteCollaboration(String sid, Integer roomId, String roomName, String inveitedUserIds, String collaborationType) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetCollaboration, new InviteCollaborationParameters(sid, AcmsApis.CollaborationCmds.invite, roomId, roomName, inveitedUserIds, collaborationType)); HttpResponse response = send(AcmsApis.ApigetCollaboration, new InviteCollaborationParameters(sid, AcmsApis.CollaborationCmds.invite, roomId, roomName, inveitedUserIds, collaborationType));
ArchiveDetailJSON json = new ArchiveDetailJSON(response.httpResponseBody); if (response.httpResponseCode != 200) {
return json;
}
} }
/** /**
...@@ -1251,7 +1259,7 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -1251,7 +1259,7 @@ public class AcmsClient implements AcmsClientResponseListener {
public Date getLastPresentTime() { public Date getLastPresentTime() {
return lastPresentTime; return lastPresentTime;
} }
private class HttpTaskWorker <T extends HttpParameterObject> extends Thread { private class HttpTaskWorker <T extends HttpParameterObject> extends Thread {
private String methodName = null; private String methodName = null;
private boolean result = false; private boolean result = false;
......
package jp.agentec.abook.abv.bl.acms.client.parameters;
import jp.agentec.adf.net.http.HttpParameterObject;
/**
* ACMSのAPIに渡す共通的なパラメータを格納します。ACMSのAPIのパラメータ用クラスを作成するときはこのクラスを継承してください。<br>
* ただし、このクラスはログイン状態の確認用として使われる {@link FinishCollaborationParameters#sid} を持っているため、ログイン用のパラメータ {@link MobileLoginParameters} は、このクラスを継承する必要はありません。
* @author lee-mk
* @version 1.0.0
*/
public class FinishCollaborationParameters extends HttpParameterObject {
/**
* セッションID
* @since 1.0.0
*/
private String sid;
private String cmd;
private Integer roomId;
/**
* {@link FinishCollaborationParameters} のインスタンスを初期化します。
* @param sid ログインした時のセッションIDです。
* @param cmd Apiリクエストに必要なコマンド(ABOOK COMM専用)。
* @since 1.0.0
*/
public FinishCollaborationParameters(String sid, String cmd, Integer roomId) {
this.sid = sid;
this.cmd = cmd;
this.roomId = roomId;
}
/**
* セッションIDを返します。
* @return ログインした時のセッションIDです。
* @since 1.0.0
*/
public String getSid() {
return sid;
}
/**
* コマンドを返します。
* @return ログインした時のセッションIDです。
* @since 1.0.0
*/
public String getCmd() {
return cmd;
}
/**
* roomIdを返します。
* @return roomId
* @since 1.0.0
*/
public Integer getRoomId() {
return roomId;
}
}
...@@ -1359,6 +1359,11 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1359,6 +1359,11 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} }
@JavascriptInterface @JavascriptInterface
public void finishCollaboration() throws NetworkDisconnectedException, AcmsException {
AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).finishCollaboration(sid, roomId.intValue());
}
@JavascriptInterface
public String getCollaborationJoinFlg() { public String getCollaborationJoinFlg() {
return collaborationJoinFlg.toString(); return collaborationJoinFlg.toString();
} }
......
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