Commit 2666dd82 by Jeong Gilmo

#33006 事業者毎のリソース多重化(Android)

parent 1525055a
......@@ -27,6 +27,11 @@ public class ContentVersionsJSON extends AcmsCommonJSON {
public ArrayList<ContentDto> contentVersions;
public String fetchDate;
// #33006 start
public static final String ResourcePattern = "resourcepattern"; // リソースパターン
public int resourcePattern;
// #33006 end
public ContentVersionsJSON(String jsonString) throws AcmsException {
super(jsonString);
......@@ -34,6 +39,11 @@ public class ContentVersionsJSON extends AcmsCommonJSON {
@Override
protected void parse(JSONObject json) throws JSONValidationException {
// #33006 start
if (json.has(ResourcePattern)) {
resourcePattern = json.getInt(ResourcePattern);
}
// #33006 end
if (json.has(FetchDate)) {
fetchDate = json.getString(FetchDate);
}
......
......@@ -59,6 +59,11 @@ public class ABVEnvironment {
// ダウンロード作業が完了したあと、テーブルに値を更新する。その後、再びクリアするようにする
public String tempContentVersionLastFetchDate = "";
// #33006 start
// Serverから取得したcontentVersion時のリソースパターンを一時的に保存するための変数
public int resourcePattern;
// #33006 end
////////////////////////////// 定数 //////////////////////////////////
private static final String ServerTimeKey = "ABook";
......
......@@ -265,6 +265,11 @@ public class ContentRefresher {
return false;
}
// #33006 start
// リソースパターンの値を取得する
ABVEnvironment.getInstance().resourcePattern = json.resourcePattern;
// #33006 end
// 一時値を保存。ダウンロード処理が完了したあとにlastFetchDateを更新
String fetchDate = json.fetchDate;
ABVEnvironment.getInstance().tempContentVersionLastFetchDate = fetchDate;
......
......@@ -162,7 +162,6 @@
<string name="homepage">ホームページ</string>
<string name="support_mail">サポートメール</string>
<string name="error">エラー</string>
<!-- #33006 -->
<string name="error_email_subject">【Error Report】 ABook for Android</string>
<string name="sendlog_email_subject">ABook for Android ログファイル</string>
......
......@@ -163,7 +163,6 @@
<string name="homepage">홈페이지</string>
<string name="support_mail">서포트메일</string>
<string name="error">Error</string>
<!-- #33006 -->
<string name="error_email_subject">【Error Report】 ABook for Android</string>
<string name="sendlog_email_subject">ABook for Android 로그파일</string>
......
......@@ -162,7 +162,6 @@
<string name="homepage">Homepage</string>
<string name="support_mail">Support Mail</string>
<string name="error">Error</string>
<!-- #33006 -->
<string name="error_email_subject">【Error Report】 ABook for Android</string>
<string name="sendlog_email_subject">ABook for Android Log file</string>
......@@ -370,10 +369,6 @@
<string name="pano_edit">360edit</string>
<string name="information_update">Update</string>
<string name="work_report">Report</string>
<!-- #33006 start -->
<string name="work_report_1">Report1</string>
<string name="work_report_2">Report2</string>
<!-- #33006 end -->
<string name="synchronizing">Syncing...</string>
<string name="msg_error_task_receiving_failed">An error occurred while receiving work data.</string>
<string name="msg_error_task_report_receiving_failed">An error occurred while receiving work report data.</string>
......
......@@ -54,6 +54,10 @@ public interface AppDefType {
String VIEW_MODE = "viewMode";
String OPERATION_REPORT_TYPES = "operationReportTypes";
// #33006 start
String RESOURCE_PATTERN = "resourcePattern"; // リソースパターン
// #33006 end
}
/**
......
......@@ -375,6 +375,10 @@ public class OperationListActivity extends ABVUIActivity {
if (refreshBaseView != null) {
refreshBaseView.onRefreshComplete();
}
// #33006 start
// リソースパターンを取得し、保存する。
getResourcePattern();
// #33006 end
refreshOperationList();
}
}
......@@ -611,7 +615,7 @@ public class OperationListActivity extends ABVUIActivity {
for (TaskReportDto taskReportDto : listTaskReport) {
// #32926 作業報告画面改善 start
if (taskReportDto.reporterFlag) {
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskReportDto.taskKey, String.valueOf(taskReportDto.taskReportLevel));
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskReportDto.taskKey, String.valueOf(taskReportDto.taskReportLevel)));
}
// #32926 作業報告画面改善 end
}
......@@ -1926,4 +1930,15 @@ public class OperationListActivity extends ABVUIActivity {
}
return operationReportTypes;
}
// #33006 start
// ログイン成功した後、新着更新時の「ContentVersion」APIからリソースパターンを取得し、ローカルに保存する。
private void getResourcePattern() {
Logger.d(TAG, "ABVEnvironment.getInstance().resourcePattern : " + ABVEnvironment.getInstance().resourcePattern);
if (ABVEnvironment.getInstance().resourcePattern != 0) {
} else {
}
putUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN, ABVEnvironment.getInstance().resourcePattern);
}
// #33006 end
}
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