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
bf61e732
Commit
bf61e732
authored
Feb 16, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ロック要求時は404でもエラーにならないようにした。
parent
3d97a019
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
+13
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/LockReportLogic.java
+1
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
View file @
bf61e732
...
...
@@ -739,7 +739,7 @@ public class AcmsClient implements AcmsClientResponseListener {
}
public
LockReportJSON
sendLockReport
(
LockReportParameters
param
)
throws
NetworkDisconnectedException
,
AcmsException
{
HttpResponse
response
=
send
(
AcmsApis
.
ApiLockReport
,
param
);
HttpResponse
response
=
send
(
AcmsApis
.
ApiLockReport
,
param
,
true
);
String
json
=
response
.
httpResponseBody
;
return
new
LockReportJSON
(
json
);
}
...
...
@@ -798,11 +798,15 @@ public class AcmsClient implements AcmsClientResponseListener {
* @since 1.0.0
*/
private
HttpResponse
send
(
String
methodName
,
HttpParameterObject
param
)
throws
NetworkDisconnectedException
,
AcmsException
{
return
send
(
methodName
,
param
,
false
);
}
private
HttpResponse
send
(
String
methodName
,
HttpParameterObject
param
,
boolean
ignore404
)
throws
NetworkDisconnectedException
,
AcmsException
{
Logger
.
d
(
TAG
,
"call api : %s"
,
methodName
);
String
apiUrl
=
AcmsApis
.
getApiUrl
(
env
.
acmsAddress
,
urlPath
,
methodName
);
HttpResponse
response
=
send
(
apiUrl
,
methodName
,
param
);
HttpResponse
response
=
send
(
apiUrl
,
methodName
,
param
,
ignore404
);
// 最終アクセス時間更新
MemberInfoDao
dao
=
AbstractDao
.
getDao
(
MemberInfoDao
.
class
);
...
...
@@ -817,6 +821,10 @@ public class AcmsClient implements AcmsClientResponseListener {
}
public
HttpResponse
send
(
String
apiUrl
,
String
methodName
,
HttpParameterObject
param
)
throws
NetworkDisconnectedException
,
AcmsException
{
return
send
(
apiUrl
,
methodName
,
param
,
false
);
}
public
HttpResponse
send
(
String
apiUrl
,
String
methodName
,
HttpParameterObject
param
,
boolean
ignore404
)
throws
NetworkDisconnectedException
,
AcmsException
{
if
(!
networkAdapter
.
isNetworkConnected
())
{
Logger
.
w
(
TAG
,
"network is disconnected."
);
throw
new
NetworkDisconnectedException
();
...
...
@@ -854,7 +862,9 @@ public class AcmsClient implements AcmsClientResponseListener {
if
(
httpTaskThread
.
response
.
httpResponseCode
==
401
&&
httpTaskThread
.
response
.
httpResponseBody
==
null
)
{
// 401の場合bodyが取れない場合があるのでvalidationはしない
throw
new
AcmsException
(
ABVExceptionCode
.
S_E_ACMS_0401
,
null
);
}
if
(
httpTaskThread
.
response
.
httpResponseCode
!=
304
)
{
// 変更なし
boolean
isNot304
=
httpTaskThread
.
response
.
httpResponseCode
!=
304
;
// 変更なし
boolean
is404
=
httpTaskThread
.
response
.
httpResponseCode
==
404
&&
!
ignore404
;
if
(
isNot304
&&
is404
)
{
validateHttpResponse
(
httpTaskThread
.
response
,
methodName
);
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/LockReportLogic.java
View file @
bf61e732
...
...
@@ -98,7 +98,7 @@ public class LockReportLogic extends AbstractLogic {
result
.
result
=
reportJSON
.
httpStatus
==
HTTP_OK
||
reportJSON
.
httpStatus
==
HTTP_NOT_FOUND
?
0
:
1
;
result
.
message
=
""
;
result
.
extParam
=
new
ExtParam
(
reportJSON
.
getReportStatus
()
,
reportJSON
.
httpStatus
==
HTTP_OK
?
reportJSON
.
getReportStatus
()
:
0
,
reportJSON
.
getReportLockUserId
(),
reportJSON
.
getReportLockUserName
(),
reportJSON
.
getReportLockTime
(),
...
...
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