Commit e85e78d5 by Kazuyuki Hida

文字列リテラルの排除と、ユーティリティ関数の集約

parent d23461b3
......@@ -93,6 +93,9 @@ import jp.agentec.adf.net.http.HttpResponse;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStatus;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.Message;
/**
* ACMSのAPIにアクセスするにはこのクラスを継承します。
* @author Taejin Hong
......@@ -575,8 +578,8 @@ public class AcmsClient implements AcmsClientResponseListener {
// JSのコールバックに渡すために必要な情報をストックしておく(暫定的な実装 fixme )
if (apiUrl.contains(AcmsApis.ApiSendTaskData)) {
JSONObject res = new JSONObject(result.httpResponseBody);
int reportStatus = res.has("reportStatus") ? res.getInt("reportStatus") : null;
String message = res.has("message") ? res.getString("message") : null;
int reportStatus = res.has(ReportStatus) ? res.getInt(ReportStatus) : null;
String message = res.has(Message) ? res.getString(Message) : null;
ReportStatusLogic.TaskReportExtParam.stock(String.valueOf(reportStatus), message);
}
......
......@@ -133,6 +133,30 @@ public abstract class AcmsJSONParser extends CloneableObject {
}
}
protected long getLongOrZero(JSONObject json, String key) {
if (json.has(key)) {
return json.getLong(key);
} else {
return 0;
}
}
protected Long getLongOrNull(JSONObject json, String key) {
if (json.has(key)) {
return json.getLong(key);
} else {
return null;
}
}
protected int getIntOrZero(JSONObject json, String key) {
if (json.has(key)) {
return json.getInt(key);
} else {
return 0;
}
}
protected int getIntOrDef(JSONObject json, String key, int def) {
if (json.has(key)) {
return json.getInt(key);
......@@ -156,4 +180,6 @@ public abstract class AcmsJSONParser extends CloneableObject {
return null;
}
}
}
......@@ -10,8 +10,14 @@ import java.util.List;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.DashboardStatusDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.OperationId;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportList;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStartDate;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStatus;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskKey;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskReportId;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationListJSON.OperationName;
public class DashboardStatusJSON extends AcmsCommonJSON {
private static final String TAG = "DashboardStatusJSON";
......@@ -32,15 +38,15 @@ public class DashboardStatusJSON extends AcmsCommonJSON {
for (int i = 0; i < oprations.length(); i++) {
JSONObject opJson = oprations.getJSONObject(i);
try {
long operationId = longOrZero(opJson, "operationId");
String operationName = stringOrNull(opJson, "operationName");
JSONArray reports = opJson.getJSONArray("reportList");
long operationId = getLongOrZero(opJson, OperationId);
String operationName = getStringOrNull(opJson, OperationName);
JSONArray reports = opJson.getJSONArray(ReportList);
for (int j = 0; j < reports.length(); j++) {
JSONObject repJson = reports.getJSONObject(j);
String taskKey = stringOrNull(repJson,"taskKey");
Long taskReportId = longOrNull(repJson, "taskReportId");
Date reportStartDate = dateOrNull(repJson, "reportStartDate");
int reportStatus = intOrZero(repJson,"reportStatus");
String taskKey = getStringOrNull(repJson, TaskKey);
Long taskReportId = getLongOrNull(repJson, TaskReportId);
Date reportStartDate = getDateOrNull(repJson, ReportStartDate);
int reportStatus = getIntOrZero(repJson,ReportStatus);
DashboardStatusDto rep = new DashboardStatusDto(
taskKey,
taskReportId,
......@@ -60,64 +66,4 @@ public class DashboardStatusJSON extends AcmsCommonJSON {
public List<DashboardStatusDto> getReportStatuses() {
return reportStatuses;
}
private Long longOrNull(JSONObject json, String key) {
try {
if (json.has(key)) {
return json.getLong(key);
} else {
return null;
}
} catch (Exception e) {
return null;
}
}
private long longOrZero(JSONObject json, String key) {
try {
if (json.has(key)) {
return json.getLong(key);
} else {
return 0;
}
} catch (Exception e) {
return 0;
}
}
private int intOrZero(JSONObject json, String key) {
try {
if (json.has(key)) {
return json.getInt(key);
} else {
return 0;
}
} catch (Exception e) {
return 0;
}
}
private Date dateOrNull(JSONObject json, String key) {
try {
if (json.has(key)) {
return DateTimeUtil.toDate(json.getString(key), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
} else {
return null;
}
} catch (Exception e) {
return null;
}
}
private String stringOrNull(JSONObject json, String key) {
try {
if (json.has(key)) {
return json.getString(key);
} else {
return null;
}
} catch (Exception e) {
return null;
}
}
}
......@@ -21,6 +21,8 @@ public class OperationDataJSON extends AcmsCommonJSON {
public static final String OperationLastEditDate = "operationLastEditDate";
public static final String TaskList = "taskList";
public static final String OperationId = "operationId";
public static final String OperationList = "operationList";
public static final String ReportStatusId = "reportStatusId";
public static final String TaskId = "taskId";
public static final String TaskKey = "taskKey";
public static final String TaskCode = "taskCode";
......@@ -45,7 +47,9 @@ public class OperationDataJSON extends AcmsCommonJSON {
public static final String SendBackUserName = "sendBackUserName"; // 差し戻しユーザ名 差し戻された場合のみ
public static final String SendBackComment = "sendBackComment"; // 確認コメント 差し戻された場合のみ
public static final String ReportList = "reportList";
public static final String ReportStatus = "reportStatus";
public static final String Message = "message";
public List<TaskDto> taskDtoList;
public Date lastEditDate;
......
package jp.agentec.abook.abv.bl.common.constant;
/**
* Created by leemk on 2021/03/03.
*/
public interface ABookCommConstants {
String TAG = "ABookComm";
//AbookComm専用の共通インターフェース
interface KEY {
String CHAT_ROOM_ID = "chatRoomId";
String CHAT_ROOM_NAME = "chatRoomName";
String TYPE = "type";
String FAVORITE_REGISTER_DATE = "favoriteRegisterDate";
String UNREAD_COUNT = "unreadCount";
String MESSAGE = "message";
String MESSAGE_TYPE = "messageType";
String INSERT_DATE = "insertDate";
String USER_COUNT = "userCount";
String LOGIN_ID = "loginId";
String PROFILE_IMAGE_PATH = "profileImagePath";
String SELF_FLG = "selfFlg";
String SHOP_MEMBER_NAME = "shopMemberName";
String SHOP_MEMBER_ID = "shopMemberId";
String PROFILE_URL = "profileUrl";
String GROUP_NAME = "groupName";
String GROUP_ID = "groupId";
String GROUP_PATH = "groupPath";
String GROUP_IDS = "groupIds";
String GROUP_PATH_LIST = "groupPathList";
String IS_FAVORITE = "isFavorite";
String CHILD_GROUP_LIST = "childGroupList";
String GROUP_USER_LIST = "groupUserList";
String BODY = "body";
String CHECKED = "checked";
String CHAT_ROOM_INFO = "chatRoomInfo";
String ROOM_ID = "roomId";
String ROOM_NAME = "roomName";
String ATTEND_USERS = "attendUsers";
String MEMBER_NAME = "memberName";
String DEL_FLG = "delFlg";
String ROOM_TYPE = "roomType";
String GROUP_ID_LIST = "groupIdList";
String MESSAGE_INFO_LIST = "messageInfoList";
String MESSAGE_ID = "messageId";
String SHOP_ID = "shopId";
String TIME = "time";
String GROUP_INFO_LIST = "groupInfoList";
String PARENT_GROUP_ID = "parentGroupId";
String GROUP_MEMBER_LIST = "groupMemberList";
String CHAT_ROOM_INFO_LIST = "chatRoomInfoList";
String LAST_MESSAGE_INFO = "lastMessageInfo";
String FAVORITE_USER_IDS = "favoriteUserIds";
String FAVORITE_GROUP_IDS = "favoriteGroupIds";
String LAST_REQUEST_DATE = "lastRequestDate";
String ARCHIVE_INFO_LIST = "archiveInfoList";
String ARCHIVE_INFO = "archiveInfo";
String ARCHIVE_ID = "archiveId";
String ARCHIVE_NAME = "archiveName";
String ARCHIVE_DATE = "archiveDate";
String ARCHIVE_TYPE = "archiveType";
String SAVE_USER_ID = "saveUserId";
String FILE_PATH = "filePath";
String ATTEND_USER_IDS = "attendUserIds";
String ARCHIVE_INFO_LAST_UPDATE_DATE = "archiveInfoLastUpdateDate";
String CONTENT_ID = "contentId";
String CONTENT_NAEM = "contentName";
String THUMBNAIL_NORMAL_PATH = "thumbnailNormalPath";
String THUMBNAIL_BIG_PATH = "thumbnailBigPath";
String RESOURCE_PATH = "resourcePath";
String COLLABORATION_DEATAIL_ID = "collaborationDetailId";
String MY_SHOPE_MEMBER_ID = "myShopMemberId";
String ROOT_GROUP_ID = "rootGroupId";
String GROUP_MEMBER_UPDATED_DATE = "groupMemberUpdatedDate";
String MESSAGE_UPDATED_DATE = "MessageUpdatedDate";
String ARCHIVE_UPDATED_DATE = "ArchiveUpdatedDate";
String HTTP_STATUS = "httpStatus";
interface API_KIND {
String USER = "user";
String ROOM = "room";
String GROUP = "group";
String CHAT = "chat";
String FILE = "file";
String COLLABORATION = "collaboration";
}
String SHOP_NAME = "shopName";
String LANGUAGE_CODE = "languageCode";
String SID = "sid";
String ROOM_ID_UPPERCASE_D = "roomID";
String CHAT_URL = "chatURL";
String CMS_URL = "cmsURL";
String IS_ONLINE = "isOnline";
String IS_MOBILE = "isMobile";
String PLATFORM = "platform";
String COLLABORATION_TYPE = "collaborationType";
}
interface FLAG {
interface SCREEN_FLG {
Integer NAME_CARD = 0;
Integer MAKE_ROOM = 1;
}
interface SELF_FLAG {
Integer OFF = 0;
Integer ON = 1;
}
interface DEL_FLAG {
Integer EXIST = 0;
Integer DELETE = 1;
}
interface ROOM_TYPE {
Integer GROUP = 0;
Integer DM = 1;
Integer ALL = 2;
}
interface MESSAGE_TYPE {
Integer TEXT = 0;
Integer PHOTO = 1;
Integer VIDEO = 2;
Integer SYSTEM = 3;
Integer COLLABORATION_START = 4;
Integer COLLABORATION_END = 5;
}
interface COLLABORATION_TYPE {
Integer AUDIO = 0;
Integer CAMERA = 2;
Integer VIDEO = 3;
Integer DOCUMENT = 4;
Integer BOARD = 5;
}
interface COLLABORATION_JOIN_FLG {
Integer CREATE = 0;
Integer JOIN = 1;
Integer INVITE = 2;
}
interface ROOM_VIEW_FLAG {
Integer VISIBLE = 0;
Integer INVISIBLE = 1;
}
Integer GROUP_REQUEST_ALL = 0;
}
interface SIZE {
Integer MAX_FAVORITE_COUNT = 100;
Integer MESSAGE_PAGING_SIZE = 100;
}
interface COLLABORATION {
interface INVITE_COLLABORATION {
String EN = "inviteCollaboration";
String JP = "\u5354\u696d";
String KR = "\ud611\uc5c5";
}
interface COLLABORATION_AUDIO {
String EN = "audio collaboration";
String JP = "通話協業";
String KR = "통화협업";
}
interface COLLABORATION_CAMERA {
String EN = "image collaboration";
String JP = "写真協業";
String KR = "사진협업";
}
interface COLLABORATION_VIDEO {
String EN = "video collaboration";
String JP = "動画協業";
String KR = "영상협업";
}
interface COLLABORATION_DOCUMENT {
String EN = "document collaboration";
String JP = "文書協業";
String KR = "문서협업";
}
interface COLLABORATION_BOARD {
String EN = "board collaboration";
String JP = "ボード協業";
String KR = "보드협업";
}
}
String FILE_SAVE_PATH = "/data/user/0/jp.co.agentec.abookplus.check/files/";
String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public_new/chat.html";
String CHAT_PAGE_URL = "file:///android_asset/chat/public_new/chat.html";
String CHAT_ROOM_PAGE_URL = "file:///android_asset/chat/public_new/chat_room.html";
String ARCHIVE_URL = "file:///android_asset/chat/public_new/archive.html";
String ARCHIVE_DETAIL_URL = "file:///android_asset/chat/public_new/archive_detail.html";
String CONTACT_URL = "file:///android_asset/chat/public_new/contact.html";
String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
String DEFAULT_CHECKSUM = "0000000000";
String PLATFORM_NAME = "android";
String CHAT_MESSAGE_SEPERATOR = "<::split>";
String DASHBOARD_URL = "file:///android_asset/dashboard/app/index.html";
int PUSH_MESSAGE_DLG_REQUEST_CODE = 200;
interface PUSH_MESSAGE_DLG_RESULT {
int OK = 0;
int CANCEL = 1;
}
// ABookCheckで、onActivityResultのリクエストコードとして使用されている
int ABOOK_CHECK_TASK_IMAGE = 103;
int ABOOK_CHECK_TASK_VIDEO = 104;
int ABOOK_CHECK_SELECT_SCENE = 105;
}
......@@ -45,8 +45,6 @@ import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.TaskReportDao;
import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.MydataDto;
......@@ -87,7 +85,10 @@ import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.Message;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStartDate;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStatus;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskKey;
public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
......@@ -982,8 +983,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ReportStatusLogic.TaskReportExtParam extParam = ReportStatusLogic.TaskReportExtParam.pick();
JSONObject extJson = new JSONObject();
if (extParam != null) {
extJson.put("reportStatus", extParam.reportStatus);
extJson.put("message", extParam.message);
extJson.put(ReportStatus, extParam.reportStatus);
extJson.put(Message, extParam.message);
}
afterABookCheckApi(mCmd, mTaskKey, 0, "", extJson.toString(), isOperationPdf());
} else if (mAddReport) { // 作業追加ありの場合
......@@ -1090,14 +1091,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 1:中心温度計 2:置くだけセンサー 3:バーコード
getDeviceInfo(abookCheckParam);
} else if (mCmd.equals(ABookKeys.CMD_LOCK_REPORT)) {
String taskKey = abookCheckParam.get("taskKey");
String taskKey = abookCheckParam.get(TaskKey);
Date startDate = DateTimeUtil.toDate(reportStartDate, "UTC", DateTimeFormat.yyyyMMdd_hyphen);
// ロック
LockReportLogic.Result r = LockReportLogic.newInstance().lock(taskKey, taskReportId, startDate);
// JSコールバック
afterABookCheckApi(mCmd, mTaskKey, r.getResult(), r.getMessage(), r.getExtParam().json());
} else if (mCmd.equals(ABookKeys.CMD_UNLOCK_REPORT)) {
String taskKey = abookCheckParam.get("taskKey");
String taskKey = abookCheckParam.get(TaskKey);
Date startDate = dateOrNull(abookCheckParam.get("reportStartDate"));
// アンロック
UnlockReportLogic.Result r = UnlockReportLogic.newInstance().unlock(taskKey, taskReportId, startDate);
......
......@@ -52,7 +52,20 @@ import jp.agentec.abook.abv.ui.viewer.view.CheckFormWebview;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import static jp.agentec.abook.abv.bl.common.constant.ABookCommConstants.DASHBOARD_URL;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.OperationId;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportList;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportLockTime;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportLockUserId;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportLockUserName;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStartDate;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStatusId;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.SendBackUserId;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.SendBackUserName;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskKey;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskReportId;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskReportInfo;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationListJSON.OperationList;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationListJSON.OperationName;
import static jp.agentec.abook.abv.bl.common.constant.ABookKeys.CMD_GET_REPORT_LIST;
import static jp.agentec.abook.abv.bl.common.constant.ABookKeys.CMD_GET_REPORT_STATUS_COUNT;
import static jp.agentec.abook.abv.bl.common.constant.ABookKeys.CMD_GO_REPORT_DETAIL;
......@@ -61,6 +74,8 @@ import static jp.agentec.abook.abv.bl.common.constant.ABookKeys.CMD_UNLOCK_REPOR
public class DashboardActivity extends OperationActivity {
private static final String TAG = "DashboardActivity";
private static final String DASHBOARD_URL = "file:///android_asset/dashboard/app/index.html";
private WebView webView;
private ProgressBar progress;
......@@ -75,8 +90,7 @@ public class DashboardActivity extends OperationActivity {
@Override
public void onClick(View v) {
Logger.d(TAG, "ReloadUrl");
webView.loadUrl("javascript:CHK_Dashboard.init()");
// webView.loadUrl(DASHBOARD_URL);
webView.loadUrl(DASHBOARD_URL);
}
});
......@@ -250,7 +264,7 @@ public class DashboardActivity extends OperationActivity {
return getReportStatusCount();
}
case CMD_GET_REPORT_LIST: {
String reportStatusId = param.get("reportStatusId");
String reportStatusId = param.get(ReportStatusId);
if (reportStatusId != null) {
return getReportList(Integer.parseInt(reportStatusId));
} else {
......@@ -258,7 +272,7 @@ public class DashboardActivity extends OperationActivity {
}
}
case CMD_GO_REPORT_DETAIL: {
Long operationId = longOrNull(param.get("operationId"));
Long operationId = getLongOrNull(param.get(OperationId));
if (operationId == null) {
return true;
} else {
......@@ -266,15 +280,15 @@ public class DashboardActivity extends OperationActivity {
}
}
case CMD_LOCK_REPORT: {
String taskKey = param.get("taskKey");
Long taskReportId = longOrNull(param.get("taskReportId"));
Date reportStartDate = dateOrNull(param.get("reportStartDate"));
String taskKey = param.get(TaskKey);
Long taskReportId = getLongOrNull(param.get(TaskReportId));
Date reportStartDate = getDateOrNull(param.get(ReportStartDate));
return lockReport(taskKey, taskReportId, reportStartDate);
}
case CMD_UNLOCK_REPORT: {
String taskKey = param.get("taskKey");
Long taskReportId = longOrNull(param.get("taskReportId"));
Date reportStartDate = dateOrNull(param.get("reportStartDate"));
String taskKey = param.get(TaskKey);
Long taskReportId = getLongOrNull(param.get(TaskReportId));
Date reportStartDate = getDateOrNull(param.get(ReportStartDate));
return unlockReport(taskKey, taskReportId, reportStartDate);
}
}
......@@ -340,35 +354,35 @@ public class DashboardActivity extends OperationActivity {
private JSONObject makeReportTree(int reportStatusId, List<ReportStatusDto> reports) {
JSONObject tree = new JSONObject();
tree.put("reportStatusId", reportStatusId);
tree.put(ReportStatusId, reportStatusId);
JSONArray operationList = new JSONArray();
tree.put("operationList", operationList);
tree.put(OperationList, operationList);
// operationIDで、ソートしておく
Collections.sort(reports, new ReportStatusCompalator());
JSONObject operation = null;
for (ReportStatusDto report : reports) {
if (operation == null || operation.getLong("operationId") != report.getOperationId()) {
if (operation == null || operation.getLong(OperationId) != report.getOperationId()) {
// 新しい作業の追加
operation = new JSONObject();
operation.put("operationId", report.getOperationId());
operation.put("operationName", report.getOperationName());
operation.put("reportList", new JSONArray());
operation.put(OperationId, report.getOperationId());
operation.put(OperationName, report.getOperationName());
operation.put(ReportList, new JSONArray());
tree.getJSONArray("operationList").put(operation);
}
JSONObject task = new JSONObject();
task.put("taskKey", report.getTaskKey());
task.put("taskReportInfo", report.getTaskReportInfo());
task.put("taskReportId", report.getTaskReportId());
task.put("reportStartDate", report.getReportStartDateAsString());
task.put("reportLockUserId", report.getReportLockUserId());
task.put("reportLockUserName", report.getReportLockUserName());
task.put("reportLockTime", report.getReportLockTimeAsString());
task.put("sendBackUserId", report.getSendBackUserId());
task.put("sendBackUserName", report.getSendBackUserName());
operation.getJSONArray("reportList").put(task);
task.put(TaskKey, report.getTaskKey());
task.put(TaskReportInfo, report.getTaskReportInfo());
task.put(TaskReportId, report.getTaskReportId());
task.put(ReportStartDate, report.getReportStartDateAsString());
task.put(ReportLockUserId, report.getReportLockUserId());
task.put(ReportLockUserName, report.getReportLockUserName());
task.put(ReportLockTime, report.getReportLockTimeAsString());
task.put(SendBackUserId, report.getSendBackUserId());
task.put(SendBackUserName, report.getSendBackUserName());
operation.getJSONArray(ReportList).put(task);
}
return tree;
}
......@@ -480,7 +494,7 @@ public class DashboardActivity extends OperationActivity {
});
}
private Long longOrNull(String s) {
private Long getLongOrNull(String s) {
try {
return Long.parseLong(s);
} catch (Exception e) {
......@@ -489,7 +503,7 @@ public class DashboardActivity extends OperationActivity {
}
}
private Date dateOrNull(String s) {
private Date getDateOrNull(String s) {
try {
return DateTimeUtil.toDate(s, "UTC", DateTimeFormat.yyyyMMdd_hyphen);
} catch (Exception e) {
......@@ -497,6 +511,4 @@ public class DashboardActivity extends OperationActivity {
return null;
}
}
}
......@@ -634,7 +634,7 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
}
@Override
public void finishActivity() {
public void finishActivity() {
setResult(RESULT_OK, new Intent());
finish();
if (objectId == -1) { // Enqueteコンテンツの場合で、KeyUpではない場合、全コンテンツActivityを終了
......
......@@ -190,7 +190,7 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
}
@Override
protected void finishActivity() {
protected void finishActivity() {
Logger.d(TAG, "finishActivity");
finish();
if (isLinkedContent) {
......
......@@ -39,6 +39,8 @@ app_versioncode=1
#cms server
acms_address=https://check.abookcloud.com/acms
download_server_address=https://check.abookcloud.com/acms
#acms_address=https://abook188-1.abook.bz/acms
#download_server_address=https://abook188-1.abook.bz/acms
#syncview server
websocket_server_http_url=https://abook188-1.abook.bz/v1
......@@ -92,7 +94,7 @@ hope_page=http://www.sato.co.jp
contact_email=grp-atform_support@sato-global.com
#Log Settings
log_level=1
log_level=2
default_log_name=abvje
#エラーレポート/Exportログ送信方法 1:acms 2:平文メール(開発・テスト時のみ) 3:暗号化添付メール
error_report_flg=1
......
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