Commit 5a1704d3 by Lee Munkyeong

協業実装

parent acbe02e3
......@@ -72,6 +72,7 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.GetNameCardParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetOperationDataParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetTaskFileParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.InviteUsersParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.JoinCollaborationParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.NewAppStoreLoginParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.PasswordChangeParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.PostEnqueteReplyParameters;
......@@ -793,11 +794,11 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException
* @throws AcmsException
*/
/*public ArchiveDetailJSON joinCollaboration(String sid, Integer roomId) throws NetworkDisconnectedException, AcmsException {
//HttpResponse response = send(AcmsApis.ApigetArchive, new ArchiveDetailRequestParameters(sid, AcmsApis.ArchiveCmds.getArchiveDetail, archiveId, collaborationDetailId));
//ArchiveDetailJSON json = new ArchiveDetailJSON(response.httpResponseBody);
//return json;
}*/
public ArchiveDetailJSON joinCollaboration(String sid, Integer roomId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetCollaboration, new JoinCollaborationParameters(sid, AcmsApis.CollaborationCmds.join, roomId));
ArchiveDetailJSON json = new ArchiveDetailJSON(response.httpResponseBody);
return json;
}
/**
* 作業報告データ送信
......
package jp.agentec.abook.abv.bl.acms.client.parameters;
import jp.agentec.adf.net.http.HttpParameterObject;
/**
* ACMSのAPIに渡す共通的なパラメータを格納します。ACMSのAPIのパラメータ用クラスを作成するときはこのクラスを継承してください。<br>
* ただし、このクラスはログイン状態の確認用として使われる {@link JoinCollaborationParameters#sid} を持っているため、ログイン用のパラメータ {@link MobileLoginParameters} は、このクラスを継承する必要はありません。
* @author lee-mk
* @version 1.0.0
*/
public class JoinCollaborationParameters extends HttpParameterObject {
/**
* セッションID
* @since 1.0.0
*/
private String sid;
private String cmd;
private Integer roomId;
/**
* {@link JoinCollaborationParameters} のインスタンスを初期化します。
* @param sid ログインした時のセッションIDです。
* @param cmd Apiリクエストに必要なコマンド(ABOOK COMM専用)。
* @since 1.0.0
*/
public JoinCollaborationParameters(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;
}
}
......@@ -175,6 +175,7 @@ public class AcmsApis {
public static final String ApigetMessage = "message";
public static final String ApigetFavorite = "favorite";
public static final String ApigetArchive = "archive";
public static final String ApigetCollaboration = "collaboration";
public static final class UserCmds {
public static final String inviteUsers = "3";
......@@ -207,6 +208,12 @@ public class AcmsApis {
public static final String getArchiveDetail = "2";
}
public static final class CollaborationCmds {
public static final String start = "1";
public static final String join = "2";
public static final String finish = "3";
}
// download
/**
* コンテンツのZIPファイルを取得<br>
......@@ -253,7 +260,9 @@ public class AcmsApis {
methodName.equals(ApiOperationGroupMaster) || methodName.equals(ApiGetApertureMasterData) || methodName.equals(ApiQuickReportSearch) || methodName.equals(ApiQuickReportRevision)
|| methodName.equals(ApiGetProcessData) || methodName.equals(ApiDeleteProcess)) {
apiValue = Constant.ApiValue.checkapi;
} else if (methodName.equals(ApiGetChatPushData) || methodName.equals(ApigetChatRooms) || methodName.equals(ApigetUser) || methodName.equals(ApigetMessage) || methodName.equals(ApigetFavorite) || methodName.equals(ApigetArchive)) { // pushActionはchatapiを指定
} else if (methodName.equals(ApiGetChatPushData) || methodName.equals(ApigetChatRooms) || methodName.equals(ApigetUser)
|| methodName.equals(ApigetMessage) || methodName.equals(ApigetFavorite) || methodName.equals(ApigetArchive)
|| methodName.equals(ApigetCollaboration)) { // pushActionはchatapiを指定
apiValue = Constant.ApiValue.chatapi;
}
......
......@@ -1255,9 +1255,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public void joinCollaboration(String collaborationType) {
public void joinCollaboration(String collaborationType) throws NetworkDisconnectedException, AcmsException {
collaborationJoinFlg = ABookCommConstants.FLAG.COLLABORATION_JOIN_FLG.JOIN;
//AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).getArchiveDetail(sid, Integer.parseInt(archiveId), archiveDto.collaborationDetailId);
AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).joinCollaboration(sid, roomId.intValue());
moveCollaborationScreen(Integer.parseInt(collaborationType));
}
......
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