Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
decce445
Commit
decce445
authored
May 01, 2026
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#73480 通信仕組み改善検証
parent
ed09a6a5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
339 additions
and
38 deletions
+339
-38
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
+3
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ShopSyncWatermarkJSON.java
+2
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/parameters/ShopSyncWatermarkParameters.java
+44
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/ServiceOption.java
+8
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
+10
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/AcmsDao.java
+22
-9
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MAcms.java
+4
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefreshApiProfile.java
+40
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
+0
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/AcmsDto.java
+5
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+40
-0
ABVJE_UI_Android/res/xml/pref.xml
+12
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+9
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+7
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+2
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
+28
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/DashboardActivity.java
+3
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
+13
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+86
-10
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
View file @
decce445
...
@@ -42,6 +42,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.WorkerGroupJSON;
...
@@ -42,6 +42,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.WorkerGroupJSON;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AbstractAcmsLoginParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AbstractAcmsLoginParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AcmsContentParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AcmsContentParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.ShopSyncWatermarkParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AddMemberGroupParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AddMemberGroupParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AppStoreNewLoginParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.AppStoreNewLoginParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.ContentReadingLogParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.ContentReadingLogParameters
;
...
@@ -981,8 +982,7 @@ public class AcmsClient implements AcmsClientResponseListener {
...
@@ -981,8 +982,7 @@ public class AcmsClient implements AcmsClientResponseListener {
AcmsApis
.
ApiSendPushMessage
,
AcmsApis
.
ApiSendPushMessage
,
AcmsApis
.
ApiLockReport
,
AcmsApis
.
ApiLockReport
,
AcmsApis
.
ApiUnlockReport
,
AcmsApis
.
ApiUnlockReport
,
AcmsApis
.
ApiGetDashboardStatus
,
AcmsApis
.
ApiGetDashboardStatus
AcmsApis
.
ApiShopSyncWatermark
};
};
public
HttpTaskWorker
(
String
methodName
,
String
apiUrl
,
T
param
)
{
public
HttpTaskWorker
(
String
methodName
,
String
apiUrl
,
T
param
)
{
...
@@ -1060,7 +1060,7 @@ public class AcmsClient implements AcmsClientResponseListener {
...
@@ -1060,7 +1060,7 @@ public class AcmsClient implements AcmsClientResponseListener {
/**
/**
* DB同期の必要性を判定するウォーターマーク情報を取得する
* DB同期の必要性を判定するウォーターマーク情報を取得する
*/
*/
public
ShopSyncWatermarkJSON
checkShopSyncWatermark
(
Acms
Parameters
param
)
throws
NetworkDisconnectedException
,
AcmsException
{
public
ShopSyncWatermarkJSON
checkShopSyncWatermark
(
ShopSyncWatermark
Parameters
param
)
throws
NetworkDisconnectedException
,
AcmsException
{
HttpResponse
response
=
send
(
AcmsApis
.
ApiShopSyncWatermark
,
param
);
HttpResponse
response
=
send
(
AcmsApis
.
ApiShopSyncWatermark
,
param
);
return
new
ShopSyncWatermarkJSON
(
response
.
httpResponseBody
);
return
new
ShopSyncWatermarkJSON
(
response
.
httpResponseBody
);
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ShopSyncWatermarkJSON.java
View file @
decce445
...
@@ -6,7 +6,8 @@ import jp.agentec.abook.abv.bl.common.exception.AcmsException;
...
@@ -6,7 +6,8 @@ import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import
jp.agentec.abook.abv.bl.common.exception.JSONValidationException
;
import
jp.agentec.abook.abv.bl.common.exception.JSONValidationException
;
/**
/**
* checkapi/shopSyncWatermark/ のレスポンスを変換するクラス
* checkapi/shopSyncWatermark/ のレスポンスを変換するクラス。
* <p>リクエストは {@code screen=OPERATION_LIST}(作業一覧)/{@code REPORT_LIST}(報告・コンテンツ側)で区分する。</p>
*/
*/
public
class
ShopSyncWatermarkJSON
extends
AcmsCommonJSON
{
public
class
ShopSyncWatermarkJSON
extends
AcmsCommonJSON
{
public
static
final
String
NeedsFullSync
=
"needsFullSync"
;
public
static
final
String
NeedsFullSync
=
"needsFullSync"
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/parameters/ShopSyncWatermarkParameters.java
0 → 100644
View file @
decce445
package
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
parameters
;
import
java.net.URLEncoder
;
import
jp.agentec.abook.abv.bl.common.exception.ABVRuntimeException
;
import
jp.agentec.adf.util.StringUtil
;
/**
* GET checkapi/shopSyncWatermark/?sid=&screen=&lastFetchDate=(任意)
*/
public
class
ShopSyncWatermarkParameters
extends
AcmsParameters
{
public
static
final
String
SCREEN_OPERATION_LIST
=
"OPERATION_LIST"
;
public
static
final
String
SCREEN_REPORT_LIST
=
"REPORT_LIST"
;
private
final
String
screen
;
private
final
String
lastFetchDate
;
public
ShopSyncWatermarkParameters
(
String
sid
,
String
screen
,
String
lastFetchDate
)
{
super
(
sid
);
this
.
screen
=
screen
;
this
.
lastFetchDate
=
lastFetchDate
;
}
@Override
public
String
toHttpParameterString
(
String
encoding
)
{
try
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
URLEncoder
.
encode
(
"sid"
,
encoding
)).
append
(
"="
)
.
append
(
URLEncoder
.
encode
(
getSid
(),
encoding
).
replace
(
"+"
,
"%20"
));
sb
.
append
(
"&"
);
sb
.
append
(
URLEncoder
.
encode
(
"screen"
,
encoding
)).
append
(
"="
)
.
append
(
URLEncoder
.
encode
(
screen
,
encoding
).
replace
(
"+"
,
"%20"
));
if
(!
StringUtil
.
isNullOrEmpty
(
lastFetchDate
))
{
sb
.
append
(
"&"
);
sb
.
append
(
URLEncoder
.
encode
(
"lastFetchDate"
,
encoding
)).
append
(
"="
)
.
append
(
URLEncoder
.
encode
(
lastFetchDate
,
encoding
).
replace
(
"+"
,
"%20"
));
}
return
sb
.
toString
();
}
catch
(
Exception
e
)
{
throw
new
ABVRuntimeException
(
e
);
}
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/ServiceOption.java
View file @
decce445
...
@@ -163,5 +163,12 @@ public interface ServiceOption {
...
@@ -163,5 +163,12 @@ public interface ServiceOption {
* 利用しない:N(通常)、利用する:Y
* 利用しない:N(通常)、利用する:Y
*/
*/
int
UsableIOReport
=
186
;
int
UsableIOReport
=
186
;
/**
* 事業者オプション:自動同期(CMS側 ON/OFF)
* Y … アプリ設定に「自動同期」を表示し、ユーザーの ON/OFF に従って一覧復帰時の自動同期を行う
* N または未定義 … 設定に項目を出さず、自動同期は常にオフ扱い(新着更新の画面別API自体は事業者共通)
*/
int
EnterpriseAutoSync
=
187
;
}
}
}
}
\ No newline at end of file
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
View file @
decce445
...
@@ -246,7 +246,7 @@ public class ABVDataCache {
...
@@ -246,7 +246,7 @@ public class ABVDataCache {
}
}
}
}
public
class
ServiceOption
{
public
class
ServiceOption
{
public
boolean
isUndelivarableDelete
()
{
public
boolean
isUndelivarableDelete
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UndeliverableDelete
);
return
isServiceOptionEnable
(
ServiceOptionId
.
UndeliverableDelete
);
}
}
...
@@ -367,6 +367,15 @@ public class ServiceOption {
...
@@ -367,6 +367,15 @@ public class ServiceOption {
public
boolean
isUnableIOReport
()
{
public
boolean
isUnableIOReport
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UsableIOReport
);
return
isServiceOptionEnable
(
ServiceOptionId
.
UsableIOReport
);
}
}
/**
* {@link ServiceOptionId#EnterpriseAutoSync} が CMS で Y のとき true。
* <p>設定画面で自動同期チェックを表示し、一覧復帰時の自動同期をユーザ設定で許可する前提となる。</p>
*/
public
boolean
isEnterpriseAutoSyncOptionUsed
()
{
ServiceOptionDto
dto
=
getServiceOption
(
ServiceOptionId
.
EnterpriseAutoSync
);
return
dto
!=
null
&&
ContractLogic
.
getBooleanValue
(
dto
.
val
);
}
}
}
public
void
setDiffMinFromUTC
(
String
timeZone
)
{
public
void
setDiffMinFromUTC
(
String
timeZone
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/AcmsDao.java
View file @
decce445
...
@@ -2,8 +2,6 @@ package jp.agentec.abook.abv.bl.data.dao;
...
@@ -2,8 +2,6 @@ package jp.agentec.abook.abv.bl.data.dao;
import
jp.agentec.abook.abv.bl.common.db.Cursor
;
import
jp.agentec.abook.abv.bl.common.db.Cursor
;
import
jp.agentec.abook.abv.bl.dto.AcmsDto
;
import
jp.agentec.abook.abv.bl.dto.AcmsDto
;
public
class
AcmsDao
extends
AbstractDao
{
public
class
AcmsDao
extends
AbstractDao
{
/*package*/
AcmsDao
()
{
/*package*/
AcmsDao
()
{
...
@@ -41,9 +39,13 @@ public class AcmsDao extends AbstractDao {
...
@@ -41,9 +39,13 @@ public class AcmsDao extends AbstractDao {
if
(
colnum
!=
-
1
)
{
if
(
colnum
!=
-
1
)
{
dto
.
contentVersionLastFetchDate
=
cursor
.
getString
(
colnum
);
dto
.
contentVersionLastFetchDate
=
cursor
.
getString
(
colnum
);
}
}
colnum
=
cursor
.
getColumnIndex
(
"shopsyncwatermark_last_fetch_date"
);
colnum
=
cursor
.
getColumnIndex
(
"shopsyncwatermark_
operation_list_
last_fetch_date"
);
if
(
colnum
!=
-
1
)
{
if
(
colnum
!=
-
1
)
{
dto
.
shopSyncWatermarkLastFetchDate
=
cursor
.
getString
(
colnum
);
dto
.
shopSyncWatermarkOperationListLastFetchDate
=
cursor
.
getString
(
colnum
);
}
colnum
=
cursor
.
getColumnIndex
(
"shopsyncwatermark_report_list_last_fetch_date"
);
if
(
colnum
!=
-
1
)
{
dto
.
shopSyncWatermarkReportListLastFetchDate
=
cursor
.
getString
(
colnum
);
}
}
return
dto
;
return
dto
;
...
@@ -58,7 +60,7 @@ public class AcmsDao extends AbstractDao {
...
@@ -58,7 +60,7 @@ public class AcmsDao extends AbstractDao {
}
}
public
void
insert
(
AcmsDto
acmsDto
)
{
public
void
insert
(
AcmsDto
acmsDto
)
{
insert
(
"insert into m_acms (url_path, acms_address,download_server_address, websocket_server_http_url, websocket_server_ws_url, schedulelist_last_fetch_date, contentversion_last_fetch_date, shopsyncwatermark_
last_fetch_date) values (
?,?,?,?,?,?,?,?)"
,
acmsDto
.
getInsertValues
());
insert
(
"insert into m_acms (url_path, acms_address,download_server_address, websocket_server_http_url, websocket_server_ws_url, schedulelist_last_fetch_date, contentversion_last_fetch_date, shopsyncwatermark_
operation_list_last_fetch_date, shopsyncwatermark_report_list_last_fetch_date) values (?,
?,?,?,?,?,?,?,?)"
,
acmsDto
.
getInsertValues
());
}
}
public
boolean
isTodayLastAnnounceChangePasswordDate
()
{
public
boolean
isTodayLastAnnounceChangePasswordDate
()
{
...
@@ -88,12 +90,23 @@ public class AcmsDao extends AbstractDao {
...
@@ -88,12 +90,23 @@ public class AcmsDao extends AbstractDao {
return
count
>
0
;
return
count
>
0
;
}
}
public
String
selectShopSyncWatermarkLastFetchDate
()
{
/** 作業一覧プロファイル用(m_acms.shopsyncwatermark_operation_list_last_fetch_date)。 */
return
rawQueryGetString
(
"select shopsyncwatermark_last_fetch_date from m_acms order by shopsyncwatermark_last_fetch_date desc limit 1"
,
null
);
public
String
selectShopSyncWatermarkOperationListLastFetchDate
()
{
return
rawQueryGetString
(
"select shopsyncwatermark_operation_list_last_fetch_date from m_acms limit 1"
,
null
);
}
/** 報告・コンテンツ側プロファイル用(m_acms.shopsyncwatermark_report_list_last_fetch_date)。 */
public
String
selectShopSyncWatermarkReportListLastFetchDate
()
{
return
rawQueryGetString
(
"select shopsyncwatermark_report_list_last_fetch_date from m_acms limit 1"
,
null
);
}
public
boolean
updateShopSyncWatermarkOperationListLastFetchDate
(
String
fetchDate
)
{
long
count
=
update
(
"update m_acms set shopsyncwatermark_operation_list_last_fetch_date=?"
,
new
Object
[]{
fetchDate
});
return
count
>
0
;
}
}
public
boolean
updateShopSyncWatermarkLastFetchDate
(
String
fetchDate
)
{
public
boolean
updateShopSyncWatermark
ReportList
LastFetchDate
(
String
fetchDate
)
{
long
count
=
update
(
"update m_acms set shopsyncwatermark_last_fetch_date=?"
,
new
Object
[]{
fetchDate
});
long
count
=
update
(
"update m_acms set shopsyncwatermark_
report_list_
last_fetch_date=?"
,
new
Object
[]{
fetchDate
});
return
count
>
0
;
return
count
>
0
;
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MAcms.java
View file @
decce445
...
@@ -29,7 +29,8 @@ public class MAcms extends SQLiteTableScript {
...
@@ -29,7 +29,8 @@ public class MAcms extends SQLiteTableScript {
sql
.
append
(
" , websocket_server_ws_url VARCHAR(256) "
);
sql
.
append
(
" , websocket_server_ws_url VARCHAR(256) "
);
sql
.
append
(
" , schedulelist_last_fetch_date VARCHAR(256) "
);
sql
.
append
(
" , schedulelist_last_fetch_date VARCHAR(256) "
);
sql
.
append
(
" , contentversion_last_fetch_date VARCHAR(256) "
);
sql
.
append
(
" , contentversion_last_fetch_date VARCHAR(256) "
);
sql
.
append
(
" , shopsyncwatermark_last_fetch_date VARCHAR(256) "
);
sql
.
append
(
" , shopsyncwatermark_operation_list_last_fetch_date VARCHAR(256) "
);
sql
.
append
(
" , shopsyncwatermark_report_list_last_fetch_date VARCHAR(256) "
);
sql
.
append
(
" , PRIMARY KEY (url_path) "
);
sql
.
append
(
" , PRIMARY KEY (url_path) "
);
sql
.
append
(
" ) "
);
sql
.
append
(
" ) "
);
...
@@ -47,7 +48,8 @@ public class MAcms extends SQLiteTableScript {
...
@@ -47,7 +48,8 @@ public class MAcms extends SQLiteTableScript {
public
List
<
String
>
getUpgradeScript
(
int
oldVersion
,
int
newVersion
)
{
public
List
<
String
>
getUpgradeScript
(
int
oldVersion
,
int
newVersion
)
{
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
if
(
oldVersion
<
DatabaseVersions
.
Ver1_0_613
)
{
if
(
oldVersion
<
DatabaseVersions
.
Ver1_0_613
)
{
ddl
.
add
(
"ALTER TABLE m_acms ADD COLUMN shopsyncwatermark_last_fetch_date VARCHAR(256)"
);
ddl
.
add
(
"ALTER TABLE m_acms ADD COLUMN shopsyncwatermark_operation_list_last_fetch_date VARCHAR(256)"
);
ddl
.
add
(
"ALTER TABLE m_acms ADD COLUMN shopsyncwatermark_report_list_last_fetch_date VARCHAR(256)"
);
}
}
return
ddl
;
return
ddl
;
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefreshApiProfile.java
0 → 100644
View file @
decce445
package
jp
.
agentec
.
abook
.
abv
.
bl
.
download
;
/**
* 新着更新のAPIセット(画面コンテキスト別)。
* <p>
* 共通(オンライン時・{@link ContentRefresher#refreshContentList} 入口):<br>
* ・checkSid(SID確認)<br>
* ・enqueteReply / contentDownloadLog / contentReadingLog(失敗分の再送・ログ送信)
* </p>
* <p>
* {@link #OPERATION_LIST_SCREEN} … 作業一覧に必要な最小セット(ウォーターマークFull時のワーカー内):<br>
* ・serviceOption({@code initializeContractServiceOption})<br>
* ・workingGroupList(operationList のグループ解釈と揃えるため operationList 取得前に実行)<br>
* ・category<br>
* ・operationGroupMaster<br>
* 完了後: operationList / getPushMessageList({@link jp.agentec.abook.abv.bl.logic.OperationLogic#syncOperationListFromServer} /
* {@link jp.agentec.abook.abv.bl.logic.PushMessageLogic#initializePushMessage})
* </p>
* <p>
* {@link #REPORT_LIST_SCREEN} … 報告・コンテンツ側に必要な最小セット(ウォーターマークFull時のワーカー内):<br>
* ・group<br>
* ・getMasterData<br>
* ・contentVersion({@code retrieveServerContent})<br>
* 完了後: 同上で operationList / プッシュ(一覧と通知をアプリで揃える)
* </p>
* <p>
* {@link #FULL} … 従来の一括(上記をワーカー内ですべて実行し、完了後は {@code initializeOperations})。
* </p>
*/
public
enum
ContentRefreshApiProfile
{
/** ウォーターマークFull時はグループ〜コンテンツ版まで従来どおり一括。 */
FULL
,
/** 作業一覧由来。 */
OPERATION_LIST_SCREEN
,
/** 報告・閲覧コンテンツ由来。 */
REPORT_LIST_SCREEN
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
View file @
decce445
This diff is collapsed.
Click to expand it.
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/AcmsDto.java
View file @
decce445
...
@@ -8,7 +8,8 @@ public class AcmsDto extends AbstractDto {
...
@@ -8,7 +8,8 @@ public class AcmsDto extends AbstractDto {
public
String
websocketServerWsUrl
;
public
String
websocketServerWsUrl
;
public
String
contentVersionLastFetchDate
;
// 保存のみ、内部で比較しない
public
String
contentVersionLastFetchDate
;
// 保存のみ、内部で比較しない
public
String
scheduleListLastFetchDate
;
// 保存のみ、内部で比較しない
public
String
scheduleListLastFetchDate
;
// 保存のみ、内部で比較しない
public
String
shopSyncWatermarkLastFetchDate
;
// DB同期判定用の最終取得日時
public
String
shopSyncWatermarkOperationListLastFetchDate
;
public
String
shopSyncWatermarkReportListLastFetchDate
;
public
AcmsDto
()
{
public
AcmsDto
()
{
}
}
...
@@ -21,7 +22,8 @@ public class AcmsDto extends AbstractDto {
...
@@ -21,7 +22,8 @@ public class AcmsDto extends AbstractDto {
this
.
websocketServerWsUrl
=
websocketServerWsUrl
;
this
.
websocketServerWsUrl
=
websocketServerWsUrl
;
this
.
contentVersionLastFetchDate
=
""
;
this
.
contentVersionLastFetchDate
=
""
;
this
.
scheduleListLastFetchDate
=
""
;
this
.
scheduleListLastFetchDate
=
""
;
this
.
shopSyncWatermarkLastFetchDate
=
""
;
this
.
shopSyncWatermarkOperationListLastFetchDate
=
""
;
this
.
shopSyncWatermarkReportListLastFetchDate
=
""
;
}
}
@Override
@Override
...
@@ -31,7 +33,7 @@ public class AcmsDto extends AbstractDto {
...
@@ -31,7 +33,7 @@ public class AcmsDto extends AbstractDto {
@Override
@Override
public
Object
[]
getInsertValues
()
{
public
Object
[]
getInsertValues
()
{
return
new
Object
[]{
urlPath
,
acmsAddress
,
downloadServerAddress
,
websocketServerHttpUrl
,
websocketServerWsUrl
,
scheduleListLastFetchDate
,
contentVersionLastFetchDate
,
shopSyncWatermarkLastFetchDate
};
return
new
Object
[]{
urlPath
,
acmsAddress
,
downloadServerAddress
,
websocketServerHttpUrl
,
websocketServerWsUrl
,
scheduleListLastFetchDate
,
contentVersionLastFetchDate
,
shopSyncWatermark
OperationListLastFetchDate
,
shopSyncWatermarkReportList
LastFetchDate
};
}
}
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
decce445
...
@@ -91,6 +91,32 @@ public class OperationLogic extends AbstractLogic {
...
@@ -91,6 +91,32 @@ public class OperationLogic extends AbstractLogic {
private
TaskWorkerGroupDao
mTaskWorkerGroupDao
=
AbstractDao
.
getDao
(
TaskWorkerGroupDao
.
class
);
private
TaskWorkerGroupDao
mTaskWorkerGroupDao
=
AbstractDao
.
getDao
(
TaskWorkerGroupDao
.
class
);
private
static
final
int
FINISHED_STATUS
=
999
;
private
static
final
int
FINISHED_STATUS
=
999
;
/** 一覧バッチ同期時、直近同期からこの時間未満の作業は間隔条件により除外できる(ms)。 */
private
static
final
int
INTERVAL_LAST_EDIT_TIME_MS
=
1800000
;
private
boolean
isEnableTimeForAutoSync
(
Date
lastEditDateTime
)
{
Date
currentDateTime
=
DateTimeUtil
.
getCurrentDate
();
if
(
lastEditDateTime
==
null
)
{
return
true
;
}
long
diffInMillis
=
currentDateTime
.
getTime
()
-
lastEditDateTime
.
getTime
();
return
diffInMillis
>=
INTERVAL_LAST_EDIT_TIME_MS
;
}
/**
* operationLastSyncDate に基づき、自動同期の間隔条件を満たす needSync 作業だけを残す。
*/
public
List
<
OperationDto
>
needSyncCheckArray
(
List
<
OperationDto
>
needSyncOperationInfoArray
)
{
List
<
OperationDto
>
needSyncCheckArray
=
new
ArrayList
<>();
for
(
OperationDto
operationDto
:
needSyncOperationInfoArray
)
{
if
(
isEnableTimeForAutoSync
(
operationDto
.
operationLastSyncDate
))
{
needSyncCheckArray
.
add
(
operationDto
);
}
}
return
needSyncCheckArray
;
}
public
void
initializeOperations
()
throws
AcmsException
,
NetworkDisconnectedException
{
public
void
initializeOperations
()
throws
AcmsException
,
NetworkDisconnectedException
{
// 作業グループリスト取得
// 作業グループリスト取得
setWorkingGroupList
();
setWorkingGroupList
();
...
@@ -100,6 +126,20 @@ public class OperationLogic extends AbstractLogic {
...
@@ -100,6 +126,20 @@ public class OperationLogic extends AbstractLogic {
}
}
/**
/**
* workingGroupList API のみ(作業一覧側・FULL 新着のワーカーで operationList より先に実行)。
*/
public
void
syncWorkingGroupsFromServer
()
throws
NetworkDisconnectedException
,
AcmsException
{
setWorkingGroupList
();
}
/**
* operationList API のみ(新着完了後の一覧同期。workingGroupList は別途 {@link #syncWorkingGroupsFromServer})。
*/
public
void
syncOperationListFromServer
()
throws
AcmsException
,
NetworkDisconnectedException
{
retrieveServerOperation
();
}
/**
* プロジェクト一覧取得し、登録・更新・削除する
* プロジェクト一覧取得し、登録・更新・削除する
*
*
* @throws AcmsException
* @throws AcmsException
...
...
ABVJE_UI_Android/res/xml/pref.xml
View file @
decce445
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:key=
"pref_screen_root"
>
<PreferenceCategory
android:title=
"@string/account"
android:key=
"account_set"
>
<PreferenceCategory
android:title=
"@string/account"
android:key=
"account_set"
>
<PreferenceScreen
<PreferenceScreen
...
@@ -68,4 +69,13 @@
...
@@ -68,4 +69,13 @@
android:title=
"@string/spp_machine"
>
android:title=
"@string/spp_machine"
>
</PreferenceScreen>
</PreferenceScreen>
</PreferenceCategory>
</PreferenceCategory>
<PreferenceCategory
android:key=
"operation_sync_category"
android:title=
"@string/auto_sync"
>
<CheckBoxPreference
android:defaultValue=
"false"
android:key=
"operationAutoSync"
android:summary=
"@string/auto_sync_setting_subtitle"
android:title=
"@string/auto_sync_setting_title"
/>
</PreferenceCategory>
</PreferenceScreen>
</PreferenceScreen>
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
decce445
...
@@ -73,6 +73,7 @@ import jp.agentec.abook.abv.bl.data.dao.MemberInfoDao;
...
@@ -73,6 +73,7 @@ import jp.agentec.abook.abv.bl.data.dao.MemberInfoDao;
import
jp.agentec.abook.abv.bl.download.ContentDownloadListener
;
import
jp.agentec.abook.abv.bl.download.ContentDownloadListener
;
import
jp.agentec.abook.abv.bl.download.ContentDownloader
;
import
jp.agentec.abook.abv.bl.download.ContentDownloader
;
import
jp.agentec.abook.abv.bl.download.ContentFileExtractor
;
import
jp.agentec.abook.abv.bl.download.ContentFileExtractor
;
import
jp.agentec.abook.abv.bl.download.ContentRefreshApiProfile
;
import
jp.agentec.abook.abv.bl.download.ContentRefresher
;
import
jp.agentec.abook.abv.bl.download.ContentRefresher
;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
...
@@ -128,6 +129,14 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
...
@@ -128,6 +129,14 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
protected
ContentDownloader
contentDownloader
=
ContentDownloader
.
getInstance
();
protected
ContentDownloader
contentDownloader
=
ContentDownloader
.
getInstance
();
protected
ContentRefresher
contentRefresher
=
ContentRefresher
.
getInstance
();
protected
ContentRefresher
contentRefresher
=
ContentRefresher
.
getInstance
();
/**
* {@link ContentRefreshApiProfile}。デフォルトは従来一括(FULL)。
* @see jp.agentec.abook.abv.bl.download.ContentRefreshApiProfile
*/
protected
ContentRefreshApiProfile
getContentRefreshApiProfile
()
{
return
ContentRefreshApiProfile
.
FULL
;
}
private
ExecutorService
initilizeExecutor
=
Executors
.
newFixedThreadPool
(
2
);
// DL後の初期化専用
private
ExecutorService
initilizeExecutor
=
Executors
.
newFixedThreadPool
(
2
);
// DL後の初期化専用
protected
ImageButton
btnDownload
;
protected
ImageButton
btnDownload
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
decce445
...
@@ -50,6 +50,7 @@ import jp.agentec.abook.abv.bl.data.ABVDataCache;
...
@@ -50,6 +50,7 @@ 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.AbstractDao
;
import
jp.agentec.abook.abv.bl.data.dao.TaskReportDao
;
import
jp.agentec.abook.abv.bl.data.dao.TaskReportDao
;
import
jp.agentec.abook.abv.bl.download.ContentFileExtractor
;
import
jp.agentec.abook.abv.bl.download.ContentFileExtractor
;
import
jp.agentec.abook.abv.bl.download.ContentRefreshApiProfile
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.MydataDto
;
import
jp.agentec.abook.abv.bl.dto.MydataDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
...
@@ -97,6 +98,12 @@ import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskRep
...
@@ -97,6 +98,12 @@ import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskRep
public
abstract
class
ABVContentViewActivity
extends
ABVAuthenticatedActivity
{
public
abstract
class
ABVContentViewActivity
extends
ABVAuthenticatedActivity
{
private
static
final
String
TAG
=
"ABVContentViewActivity"
;
private
static
final
String
TAG
=
"ABVContentViewActivity"
;
/** 報告・閲覧コンテンツ側の新着更新は画面別APIセット(事業者共通)。 */
@Override
protected
ContentRefreshApiProfile
getContentRefreshApiProfile
()
{
return
ContentRefreshApiProfile
.
REPORT_LIST_SCREEN
;
}
public
final
static
int
ABOOK_CHECK_TASK_IMAGE
=
103
;
public
final
static
int
ABOOK_CHECK_TASK_IMAGE
=
103
;
public
final
static
int
ABOOK_CHECK_TASK_VIDEO
=
104
;
public
final
static
int
ABOOK_CHECK_TASK_VIDEO
=
104
;
protected
final
static
int
ABOOK_CHECK_SELECT_SCENE
=
105
;
protected
final
static
int
ABOOK_CHECK_SELECT_SCENE
=
105
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
View file @
decce445
...
@@ -168,7 +168,7 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
...
@@ -168,7 +168,7 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
// contentDownloadObserverがnullだと更新マークのアニメーションが完了しない TODO 2014/11/12 Jang
// contentDownloadObserverがnullだと更新マークのアニメーションが完了しない TODO 2014/11/12 Jang
// onCreateでrefresh処理をcallしたときに起きる
// onCreateでrefresh処理をcallしたときに起きる
contentRefresher
.
refreshContentList
(
this
);
contentRefresher
.
refreshContentList
(
this
,
getContentRefreshApiProfile
()
);
}
}
}
catch
(
NetworkDisconnectedException
e
)
{
}
catch
(
NetworkDisconnectedException
e
)
{
refreshContentException
();
refreshContentException
();
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
decce445
...
@@ -25,6 +25,8 @@ public interface AppDefType {
...
@@ -25,6 +25,8 @@ public interface AppDefType {
String
CURSOR_ENABLE
=
"cursorEnable"
;
String
CURSOR_ENABLE
=
"cursorEnable"
;
String
DISPLAY_MARKING
=
"displayMarking"
;
String
DISPLAY_MARKING
=
"displayMarking"
;
String
APP_VERSIONUP_PROCESSING
=
"appVersionProcessingFlag"
;
String
APP_VERSIONUP_PROCESSING
=
"appVersionProcessingFlag"
;
/** 作業一覧の自動同期(DefaultSharedPreferences・事業者オプション187がYのときのみ設定に表示) */
String
OPERATION_AUTO_SYNC
=
"operationAutoSync"
;
}
}
interface
UserPrefKey
{
interface
UserPrefKey
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
View file @
decce445
...
@@ -17,9 +17,9 @@ import android.os.Environment;
...
@@ -17,9 +17,9 @@ import android.os.Environment;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.preference.Preference
;
import
android.preference.Preference
;
import
android.preference.Preference.OnPreferenceClickListener
;
import
android.preference.Preference.OnPreferenceClickListener
;
import
android.preference.PreferenceCategory
;
import
android.preference.PreferenceFragment
;
import
android.preference.PreferenceFragment
;
import
android.preference.PreferenceGroup
;
import
android.preference.PreferenceGroup
;
import
android.preference.PreferenceManager
;
import
android.preference.PreferenceScreen
;
import
android.preference.PreferenceScreen
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
...
@@ -83,24 +83,24 @@ public class ABookSettingFragment extends PreferenceFragment {
...
@@ -83,24 +83,24 @@ public class ABookSettingFragment extends PreferenceFragment {
protected
Handler
handler
=
new
Handler
();
protected
Handler
handler
=
new
Handler
();
protected
AlertDialog
alertDialog
=
null
;
protected
AlertDialog
alertDialog
=
null
;
private
SharedPreferences
pref
;
// 機器連携(ペアリング)
// 機器連携(ペアリング)
private
static
final
String
SET_CHINO_PAIRING
=
"setChinoPairing"
;
// CHINO機器
private
static
final
String
SET_CHINO_PAIRING
=
"setChinoPairing"
;
// CHINO機器
private
static
final
String
SET_SPP_PAIRING
=
"setSppPairing"
;
// SPP通信機器
private
static
final
String
SET_SPP_PAIRING
=
"setSppPairing"
;
// SPP通信機器
private
static
final
String
OPERATION_SYNC_CATEGORY
=
"operation_sync_category"
;
private
PreferenceCategory
operationSyncCategory
;
@Override
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
handler
=
new
Handler
();
handler
=
new
Handler
();
pref
=
PreferenceManager
.
getDefaultSharedPreferences
(
getActivity
());
// 設定XMLから削除した CheckBox(operationAutoSync)の残キーを掃除
if
(
pref
.
contains
(
"operationAutoSync"
))
{
pref
.
edit
().
remove
(
"operationAutoSync"
).
apply
();
}
addPreferencesFromResource
(
R
.
xml
.
pref
);
addPreferencesFromResource
(
R
.
xml
.
pref
);
operationSyncCategory
=
(
PreferenceCategory
)
findPreference
(
OPERATION_SYNC_CATEGORY
);
applyOperationAutoSyncCategoryVisibility
();
// アカウント
// アカウント
setAccountSetting
();
setAccountSetting
();
// ログ情報
// ログ情報
...
@@ -121,6 +121,27 @@ public class ABookSettingFragment extends PreferenceFragment {
...
@@ -121,6 +121,27 @@ public class ABookSettingFragment extends PreferenceFragment {
@Override
@Override
public
void
onResume
()
{
public
void
onResume
()
{
super
.
onResume
();
super
.
onResume
();
applyOperationAutoSyncCategoryVisibility
();
}
/**
* 事業者オプション187(自動同期)が CMS で Y のときのみ「自動同期」設定を表示する。
*/
private
void
applyOperationAutoSyncCategoryVisibility
()
{
if
(
operationSyncCategory
==
null
||
getPreferenceScreen
()
==
null
)
{
return
;
}
PreferenceScreen
root
=
getPreferenceScreen
();
boolean
show
=
ABVDataCache
.
getInstance
().
serviceOption
.
isEnterpriseAutoSyncOptionUsed
();
if
(
show
)
{
if
(
operationSyncCategory
.
getParent
()
==
null
)
{
root
.
addPreference
(
operationSyncCategory
);
}
}
else
{
if
(
operationSyncCategory
.
getParent
()
!=
null
)
{
root
.
removePreference
(
operationSyncCategory
);
}
}
}
}
@Override
@Override
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/DashboardActivity.java
View file @
decce445
...
@@ -102,6 +102,9 @@ public class DashboardActivity extends OperationActivity {
...
@@ -102,6 +102,9 @@ public class DashboardActivity extends OperationActivity {
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
Logger
.
d
(
TAG
,
"ReloadUrl"
);
Logger
.
d
(
TAG
,
"ReloadUrl"
);
webView
.
loadUrl
(
DASHBOARD_URL
);
webView
.
loadUrl
(
DASHBOARD_URL
);
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
dataRefresh
(
true
);
}
}
}
});
});
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
View file @
decce445
...
@@ -18,6 +18,7 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
...
@@ -18,6 +18,7 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.dto.PushMessageDto
;
import
jp.agentec.abook.abv.bl.dto.PushMessageDto
;
import
jp.agentec.abook.abv.bl.download.ContentRefreshApiProfile
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.PushMessageLogic
;
import
jp.agentec.abook.abv.bl.logic.PushMessageLogic
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.launcher.android.R
;
...
@@ -36,6 +37,12 @@ import jp.agentec.adf.util.DateTimeUtil;
...
@@ -36,6 +37,12 @@ import jp.agentec.adf.util.DateTimeUtil;
public
class
OperationActivity
extends
ABVUIActivity
{
public
class
OperationActivity
extends
ABVUIActivity
{
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
private
static
final
String
TAG
=
"OperationActivity"
;
private
static
final
String
TAG
=
"OperationActivity"
;
/** 作業一覧ツールバー由来の新着更新は画面別APIセット(事業者共通)。 */
@Override
protected
ContentRefreshApiProfile
getContentRefreshApiProfile
()
{
return
ContentRefreshApiProfile
.
OPERATION_LIST_SCREEN
;
}
protected
ImageButton
mOperationHomeButton
;
// ホームボタン
protected
ImageButton
mOperationHomeButton
;
// ホームボタン
protected
ImageButton
mDashboardButton
;
// ダッシュボード
protected
ImageButton
mDashboardButton
;
// ダッシュボード
protected
ImageButton
mCommonContentButton
;
// 関連資料
protected
ImageButton
mCommonContentButton
;
// 関連資料
...
@@ -103,10 +110,16 @@ public class OperationActivity extends ABVUIActivity {
...
@@ -103,10 +110,16 @@ public class OperationActivity extends ABVUIActivity {
}
}
}
}
/** 作業一覧へ戻る。SO187 で表示される「自動同期」がオンなら新着+一覧同期、オフまたは187無効なら新着のみ。 */
private
void
backHome
()
{
private
void
backHome
()
{
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
setClass
(
this
,
OperationListActivity
.
class
);
intent
.
setClass
(
this
,
OperationListActivity
.
class
);
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
()
&&
OperationListActivity
.
isUnscopedAutoSyncAllowed
(
this
))
{
intent
.
putExtra
(
OperationListActivity
.
EXTRA_RESUME_MODE
,
OperationListActivity
.
RESUME_REFRESH_AND_BATCH
);
}
else
{
intent
.
putExtra
(
OperationListActivity
.
EXTRA_RESUME_MODE
,
OperationListActivity
.
RESUME_NEW_CONTENT_ONLY
);
intent
.
putExtra
(
OperationListActivity
.
EXTRA_RESUME_MODE
,
OperationListActivity
.
RESUME_NEW_CONTENT_ONLY
);
}
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
startActivity
(
intent
);
startActivity
(
intent
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
decce445
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment