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
15236d5c
Commit
15236d5c
authored
3 years ago
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
javaScriptの新しいクラスに対応した
userInfo.js serverInfo.js roomInfo.js deviceInfo.js
parent
66352a60
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
36 deletions
+122
-36
ABVJE_UI_Android/src/jp/agentec/abook/abv/data/ChatData.java
+98
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
+1
-10
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/view/ChatWebView.java
+23
-25
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/data/ChatData.java
View file @
15236d5c
...
...
@@ -23,11 +23,13 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import
jp.agentec.abook.abv.bl.common.constant.ABookCommConstants
;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.dto.ArchiveDto
;
import
jp.agentec.abook.abv.bl.dto.ChatMessageDto
;
import
jp.agentec.abook.abv.bl.dto.ChatRoomDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.CommunicationLogic
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.adf.util.CollectionUtil
;
import
jp.agentec.adf.util.StringUtil
;
...
...
@@ -54,6 +56,7 @@ public class ChatData {
private
String
chatServerUrl
;
private
String
cmsServerUrl
;
private
int
mCollaborationType
;
private
int
mHostRequestFlg
=
0
;
private
CommunicationLogic
communicationLogic
=
AbstractLogic
.
getLogic
(
CommunicationLogic
.
class
);
...
...
@@ -323,7 +326,7 @@ public class ChatData {
}
public
String
getStrCollaborationType
()
{
return
this
.
getStrCollaborationType
()
;
return
strCollaborationType
;
}
public
String
getToMoveGroupId
()
{
...
...
@@ -343,6 +346,10 @@ public class ChatData {
}
public
String
getServerInfo
()
{
chatServerUrl
=
ABVEnvironment
.
getInstance
().
websocketServerHttpUrl
;
chatServerUrl
=
chatServerUrl
.
substring
(
0
,
chatServerUrl
.
length
()
-
3
);
cmsServerUrl
=
ABVEnvironment
.
getInstance
().
acmsAddress
+
ABVDataCache
.
getInstance
().
getUrlPath
();
JSONObject
jsonObj
=
new
JSONObject
();
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
CHAT_URL
,
chatServerUrl
);
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
CMS_URL
,
cmsServerUrl
);
...
...
@@ -351,6 +358,7 @@ public class ChatData {
}
public
String
getMyUserInfo
()
{
languageCode
=
ActivityHandlingHelper
.
getInstance
().
getLocaleFileName
();
JSONObject
jsonObj
=
new
JSONObject
();
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
SID
,
sid
);
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
LOGIN_ID
,
loginId
);
...
...
@@ -363,6 +371,7 @@ public class ChatData {
JSONObject
jsonObj
=
new
JSONObject
();
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
ROOM_ID_UPPERCASE_D
,
roomId
);
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
ROOM_NAME
,
roomName
);
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
ROOM_TYPE
,
roomType
);
return
jsonObj
.
toString
();
}
...
...
@@ -372,4 +381,92 @@ public class ChatData {
jsonObj
.
put
(
ABookCommConstants
.
KEY
.
PLATFORM
,
"android"
);
return
jsonObj
.
toString
();
}
public
String
getMessageList
(
String
roomId
)
{
return
communicationLogic
.
getMessages
(
Integer
.
parseInt
(
roomId
));
}
public
String
getFavoriteUsers
()
{
return
communicationLogic
.
getFavoriteUsers
();
}
public
String
getMyInfo
()
{
return
communicationLogic
.
getMyInfo
();
}
public
String
getUsersInRoom
(
String
roomId
)
{
return
communicationLogic
.
getUsersInRoom
(
Integer
.
parseInt
(
roomId
));
}
public
String
getMyGroupUsers
()
{
return
communicationLogic
.
getMyGroupUsers
();
}
public
String
getMyGroupShopMemberByName
(
String
keyword
)
{
return
communicationLogic
.
getMyGroupUserByName
(
keyword
);
}
public
String
getAllGroupShopMemberByName
(
String
shopMemberName
)
{
return
communicationLogic
.
getAllGroupShopMemberByName
(
shopMemberName
);
}
public
String
getGroupByName
(
String
keyword
)
{
return
communicationLogic
.
getGroupByName
(
keyword
);
}
public
String
getFavoriteGroups
()
{
return
communicationLogic
.
getFavoriteGroups
();
}
public
String
getGroupInfo
(
String
groupId
)
{
return
communicationLogic
.
getGroupSearchData
(
Integer
.
parseInt
(
groupId
));
}
public
String
getNameCardData
(
String
shopMemberId
)
{
return
communicationLogic
.
getNameCardInfo
(
Integer
.
parseInt
(
shopMemberId
));
}
public
String
getFavoriteGroupsList
()
{
return
communicationLogic
.
getFavoriteGroups
();
}
public
String
getArchiveList
()
{
return
communicationLogic
.
getAllArchive
();
}
public
String
getArchiveListByName
(
String
keyword
)
{
return
communicationLogic
.
getArchiveListByName
(
keyword
);
}
public
String
getUserInfo
(
String
shopMemberId
)
{
return
communicationLogic
.
getUserInfo
(
Integer
.
parseInt
(
shopMemberId
));
}
public
String
getUserInfoList
(
String
shopMemberIds
)
{
return
communicationLogic
.
getUserList
(
shopMemberIds
);
}
public
String
getArchiveDetail
(
String
archiveId
)
{
return
communicationLogic
.
getArchiveDetail
(
Integer
.
parseInt
(
archiveId
));
}
public
String
getContentList
()
{
return
communicationLogic
.
getContentList
();
}
public
String
getUserListByLoginId
(
String
loginIdList
)
{
return
communicationLogic
.
getUserListByLoginId
(
loginIdList
);
}
public
String
getRoomList
(
String
roomType
,
String
keyword
)
{
return
communicationLogic
.
getChatRoomList
(
Integer
.
parseInt
(
roomType
),
keyword
);
}
public
int
getJoinCollaborationType
()
{
return
mCollaborationType
;
}
public
void
setJoinCollaborationType
(
int
collaborationType
)
{
mCollaborationType
=
collaborationType
;
}
}
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
View file @
15236d5c
...
...
@@ -122,7 +122,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private
BroadcastReceiver
receiver
;
private
CommunicationLogic
communicationLogic
=
AbstractLogic
.
getLogic
(
CommunicationLogic
.
class
);
public
int
mCollaborationType
;
public
boolean
needHostAlert
=
false
;
...
...
@@ -862,7 +861,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
mChatWebView
.
loadUrl
(
"javascript:alert(getLocalizedString('not_support_version'));"
);
return
;
}
mCollaborationType
=
collaborationType
;
chatData
.
setJoinCollaborationType
(
collaborationType
.
intValue
())
;
mChatWebView
.
loadChatViewUrl
(
ABookCommConstants
.
COLLABORATION_PAGE_URL
);
}
...
...
@@ -1295,14 +1294,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
finishPIPmode
();
}
public
int
getJoinCollaborationType
()
{
return
mCollaborationType
;
}
public
void
setJoinCollaborationType
(
int
collaborationType
)
{
mCollaborationType
=
collaborationType
;
}
public
void
finishPip
()
{
finishPIPmode
();
}
...
...
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/view/ChatWebView.java
View file @
15236d5c
...
...
@@ -13,8 +13,6 @@ import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.CommunicationLogic
;
import
jp.agentec.abook.abv.data.ChatData
;
import
jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity
;
import
jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity
;
...
...
@@ -22,7 +20,6 @@ import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
public
class
ChatWebView
extends
WebView
{
private
CommunicationLogic
communicationLogic
=
AbstractLogic
.
getLogic
(
CommunicationLogic
.
class
);
private
ChatWebViewActivity
chatActivity
;
private
ChatData
chatData
;
...
...
@@ -139,7 +136,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getRoomList
(
String
roomType
,
String
keyword
)
{
return
c
ommunicationLogic
.
getChatRoomList
(
Integer
.
parseInt
(
roomType
)
,
keyword
);
return
c
hatData
.
getRoomList
(
roomType
,
keyword
);
}
@JavascriptInterface
...
...
@@ -210,7 +207,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getMessageList
(
String
roomId
)
{
return
c
ommunicationLogic
.
getMessages
(
Integer
.
parseInt
(
roomId
)
);
return
c
hatData
.
getMessageList
(
roomId
);
}
@JavascriptInterface
...
...
@@ -220,7 +217,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getFavoriteUsers
()
{
return
c
ommunicationLogic
.
getFavoriteUsers
();
return
c
hatData
.
getFavoriteUsers
();
}
@JavascriptInterface
...
...
@@ -230,17 +227,17 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getMyInfo
()
{
return
c
ommunicationLogic
.
getMyInfo
();
return
c
hatData
.
getMyInfo
();
}
@JavascriptInterface
public
String
getUsersInRoom
(
String
roomId
)
{
return
c
ommunicationLogic
.
getUsersInRoom
(
Integer
.
parseInt
(
roomId
)
);
return
c
hatData
.
getUsersInRoom
(
roomId
);
}
@JavascriptInterface
public
String
getMyGroupUsers
()
{
return
c
ommunicationLogic
.
getMyGroupUsers
();
return
c
hatData
.
getMyGroupUsers
();
}
@JavascriptInterface
...
...
@@ -250,7 +247,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getMyGroupShopMemberByName
(
String
keyword
)
{
return
c
ommunicationLogic
.
getMyGroupUs
erByName
(
keyword
);
return
c
hatData
.
getMyGroupShopMemb
erByName
(
keyword
);
}
@JavascriptInterface
...
...
@@ -260,7 +257,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getAllGroupShopMemberByName
(
String
shopMemberName
)
{
return
c
ommunicationLogic
.
getAllGroupShopMemberByName
(
shopMemberName
);
return
c
hatData
.
getAllGroupShopMemberByName
(
shopMemberName
);
}
@JavascriptInterface
...
...
@@ -270,13 +267,14 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getGroupByName
(
String
keyword
)
{
return
c
ommunicationLogic
.
getGroupByName
(
keyword
);
return
c
hatData
.
getGroupByName
(
keyword
);
}
@JavascriptInterface
public
String
getFavoriteGroups
()
{
return
c
ommunicationLogic
.
getFavoriteGroups
();
return
c
hatData
.
getFavoriteGroups
();
}
@JavascriptInterface
public
void
updateUserInfo
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
chatActivity
.
updateUserInfo
(
shopMemberId
);
...
...
@@ -284,7 +282,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getGroupInfo
(
String
groupId
)
{
return
c
ommunicationLogic
.
getGroupSearchData
(
Integer
.
parseInt
(
groupId
)
);
return
c
hatData
.
getGroupInfo
(
groupId
);
}
@JavascriptInterface
...
...
@@ -294,12 +292,12 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getNameCardData
(
String
shopMemberId
)
{
return
c
ommunicationLogic
.
getNameCardInfo
(
Integer
.
parseInt
(
shopMemberId
)
);
return
c
hatData
.
getNameCardData
(
shopMemberId
);
}
@JavascriptInterface
public
String
getFavoriteGroupsList
()
{
return
c
ommunicationLogic
.
getFavoriteGroups
();
return
c
hatData
.
getFavoriteGroupsList
();
}
@JavascriptInterface
...
...
@@ -334,27 +332,27 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getArchiveList
()
{
return
c
ommunicationLogic
.
getAllArchive
();
return
c
hatData
.
getArchiveList
();
}
@JavascriptInterface
public
String
getArchiveListByName
(
String
keyword
)
{
return
c
ommunicationLogic
.
getArchiveListByName
(
keyword
);
return
c
hatData
.
getArchiveListByName
(
keyword
);
}
@JavascriptInterface
public
String
getUserInfo
(
String
shopMemberId
)
{
return
c
ommunicationLogic
.
getUserInfo
(
Integer
.
parseInt
(
shopMemberId
)
);
return
c
hatData
.
getUserInfo
(
shopMemberId
);
}
@JavascriptInterface
public
String
getUserInfoList
(
String
shopMemberIds
)
{
return
c
ommunicationLogic
.
getUser
List
(
shopMemberIds
);
return
c
hatData
.
getUserInfo
List
(
shopMemberIds
);
}
@JavascriptInterface
public
String
getArchiveDetail
(
String
archiveId
)
{
return
c
ommunicationLogic
.
getArchiveDetail
(
Integer
.
parseInt
(
archiveId
)
);
return
c
hatData
.
getArchiveDetail
(
archiveId
);
}
@JavascriptInterface
...
...
@@ -414,12 +412,12 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getContentList
()
{
return
c
ommunicationLogic
.
getContentList
();
return
c
hatData
.
getContentList
();
}
@JavascriptInterface
public
String
getUserListByLoginId
(
String
loginIdList
)
{
return
c
ommunicationLogic
.
getUserListByLoginId
(
loginIdList
);
return
c
hatData
.
getUserListByLoginId
(
loginIdList
);
}
...
...
@@ -455,12 +453,12 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
int
getJoinCollaborationType
()
{
return
chat
Activity
.
getJoinCollaborationType
();
return
chat
Data
.
getJoinCollaborationType
();
}
@JavascriptInterface
public
void
setJoinCollaborationType
(
int
collaborationType
)
{
chat
Activity
.
setJoinCollaborationType
(
collaborationType
);
chat
Data
.
setJoinCollaborationType
(
collaborationType
);
}
@JavascriptInterface
...
...
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