Commit 4ce1d42a by NGUYEN HOANG SON

implement requireTerms API

parent 705ee87e
......@@ -40,6 +40,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON;
import jp.agentec.abook.abv.bl.acms.client.json.OperationListJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ProcessDataJSON;
import jp.agentec.abook.abv.bl.acms.client.json.RequirePasswordChangeJSON;
import jp.agentec.abook.abv.bl.acms.client.json.RequireTermsJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ResultJSON;
import jp.agentec.abook.abv.bl.acms.client.json.RoomJSON;
import jp.agentec.abook.abv.bl.acms.client.json.RoomListJSON;
......@@ -83,6 +84,7 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.JoinCollaborationParameter
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;
import jp.agentec.abook.abv.bl.acms.client.parameters.RequireTermsParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.SendPushMessageParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ServerTimeParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.UpdateDeviceTokenParameters;
......@@ -1112,6 +1114,12 @@ public class AcmsClient implements AcmsClientResponseListener {
return new TermsOfUseJson(response.httpResponseBody);
}
//terms
public RequireTermsJSON requireTerms(RequireTermsParameters param) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApiUrlRequireTerms, param);
return new RequireTermsJSON(response.httpResponseBody);
}
/**********************************************************************************************/
/** 以下、共用メソッド---------------------------------------------------------------------- **/
/**********************************************************************************************/
......
package jp.agentec.abook.abv.bl.acms.client.json;
import org.json.adf.JSONException;
import org.json.adf.JSONObject;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
public class RequireTermsJSON extends AcmsCommonJSON {
public RequireTermsJSON(String jsonString) throws AcmsException {
super(jsonString);
}
@Override
protected void parse(JSONObject json) throws JSONValidationException, JSONException {
super.parse(json);
}
}
package jp.agentec.abook.abv.bl.acms.client.parameters;
import jp.agentec.adf.net.http.HttpParameterObject;
import jp.agentec.adf.util.StringUtil;
public class RequireTermsParameters extends HttpParameterObject {
private String sid;
private int deviceTypeId;
private String deviceId;
public RequireTermsParameters(String sid, int deviceTypeId, String deviceId) {
if (StringUtil.isNullOrWhiteSpace(sid)) {
throw new IllegalArgumentException("argument sid not allowed null or white space.");
}
if (StringUtil.isNullOrWhiteSpace(deviceId)) {
throw new IllegalArgumentException("argument deviceId not allowed null or white space.");
}
this.sid = sid;
this.deviceTypeId = deviceTypeId;
this.deviceId = deviceId;
}
}
......@@ -240,6 +240,10 @@ public class AcmsApis {
public static final String GetTaskFileUrlFormat = "%s/%s/checkapi/getTaskFile";
//terms
public static final String ApiUrlRequireTerms = "requireTerms";
public static final String ApiUrlAgreeTerms = "agreeTerms";
/**
* APIのURLを完成します。
* @param host ACMSのFQDNです。
......
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