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
d75dff25
Commit
d75dff25
authored
Jun 09, 2020
by
yuichiro ogawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#38496 担当グループ参照
parent
c2abc033
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
50 deletions
+76
-50
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/GroupLogic.java
+69
-49
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+6
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
View file @
d75dff25
...
...
@@ -34,6 +34,7 @@ public class ABookKeys {
public
static
final
String
CMD_MOVE_PAGE
=
"movePage"
;
public
static
final
String
CMD_SHOW_RELATED_CONTENT
=
"showRelatedContent"
;
public
static
final
String
CMD_PAGE_NUM
=
"pageNum"
;
public
static
final
String
CMD_GET_GROUP_TREE_INFO
=
"getGroupTreeInfo"
;
public
static
final
String
GPS_TYPE
=
"gpsType"
;
public
static
final
String
STATUS_CODE
=
"statusCode"
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/GroupLogic.java
View file @
d75dff25
package
jp
.
agentec
.
abook
.
abv
.
bl
.
logic
;
import
org.json.adf.JSONObject
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Locale
;
...
...
@@ -25,30 +27,31 @@ import jp.agentec.adf.util.StringUtil;
public
class
GroupLogic
extends
AbstractLogic
{
private
static
final
java
.
lang
.
String
TAG
=
"GroupLogic"
;
private
GroupDao
groupDao
=
AbstractDao
.
getDao
(
GroupDao
.
class
);
private
ContentDao
contentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
private
ContentDao
contentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
private
OperationDao
mOperationDao
=
AbstractDao
.
getDao
(
OperationDao
.
class
);
public
Integer
[]
getServerUserGroupIds
(
String
sid
)
throws
NetworkDisconnectedException
,
ABVException
{
AcmsParameters
param
=
new
AcmsParameters
(
sid
);
return
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
userGroup
(
param
);
}
/**
* グループ情報をサーバから受信し、ローカルに保存します。既存のデータは上書きされます。また、サーバにないグループがローカルにある場合、そのグループは削除されます。
* @throws ABVException キャッシュにユーザ情報がありません。再度ログインする必要があります。
* @throws AcmsException
* @throws Exception その他、例外です。
* @since 1.0.0
*/
public
void
initializeGroups
()
throws
NetworkDisconnectedException
,
AcmsException
{
AcmsParameters
param
=
new
AcmsParameters
(
cache
.
getMemberInfo
().
sid
);
List
<
GroupDto
>
serverGroups
=
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
group
(
param
);
ContentGroupDao
contentGroupDao
=
AbstractDao
.
getDao
(
ContentGroupDao
.
class
);
if
(
serverGroups
==
null
||
serverGroups
.
size
()
==
0
)
{
public
Integer
[]
getServerUserGroupIds
(
String
sid
)
throws
NetworkDisconnectedException
,
ABVException
{
AcmsParameters
param
=
new
AcmsParameters
(
sid
);
return
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
userGroup
(
param
);
}
/**
* グループ情報をサーバから受信し、ローカルに保存します。既存のデータは上書きされます。また、サーバにないグループがローカルにある場合、そのグループは削除されます。
*
* @throws ABVException キャッシュにユーザ情報がありません。再度ログインする必要があります。
* @throws AcmsException
* @throws Exception その他、例外です。
* @since 1.0.0
*/
public
void
initializeGroups
()
throws
NetworkDisconnectedException
,
AcmsException
{
AcmsParameters
param
=
new
AcmsParameters
(
cache
.
getMemberInfo
().
sid
);
List
<
GroupDto
>
serverGroups
=
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
group
(
param
);
ContentGroupDao
contentGroupDao
=
AbstractDao
.
getDao
(
ContentGroupDao
.
class
);
if
(
serverGroups
==
null
||
serverGroups
.
size
()
==
0
)
{
Logger
.
w
(
TAG
,
"Group Data is Nothing"
);
return
;
}
return
;
}
try
{
groupDao
.
beginTransaction
();
...
...
@@ -126,32 +129,49 @@ public class GroupLogic extends AbstractLogic {
throw
new
RuntimeException
(
e
);
}
finally
{
}
}
//해당 콘텐츠 아이디를 가지고 있는 그룹정보
public
ArrayList
<
String
>
getExistContentsGroupInfo
(
long
contentId
)
{
List
<
GroupDto
>
groupDtoList
=
groupDao
.
getExistContentGroup
(
contentId
);
ArrayList
<
String
>
groupList
=
new
ArrayList
<
String
>();
for
(
GroupDto
groupDto
:
groupDtoList
)
{
groupList
.
add
(
groupDto
.
groupName
);
}
return
groupList
;
}
public
Integer
[]
getLocalUserGroupIds
()
{
List
<
GroupDto
>
userGroupList
=
groupDao
.
getUserGroups
();
TreeSet
<
Integer
>
userGroupIdSet
=
new
TreeSet
<
Integer
>();
for
(
GroupDto
groupDto
:
userGroupList
)
{
userGroupIdSet
.
add
(
groupDto
.
groupId
);
}
return
userGroupIdSet
.
toArray
(
new
Integer
[
userGroupIdSet
.
size
()]);
}
public
AcmsMessageJSON
addMemberGroup
(
String
groupName
)
throws
AcmsException
,
NetworkDisconnectedException
{
AddMemberGroupParameters
param
=
new
AddMemberGroupParameters
(
cache
.
getMemberInfo
().
sid
,
groupName
,
Locale
.
getDefault
().
getLanguage
());
return
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
addMemberGroup
(
param
);
}
}
//해당 콘텐츠 아이디를 가지고 있는 그룹정보
public
ArrayList
<
String
>
getExistContentsGroupInfo
(
long
contentId
)
{
List
<
GroupDto
>
groupDtoList
=
groupDao
.
getExistContentGroup
(
contentId
);
ArrayList
<
String
>
groupList
=
new
ArrayList
<
String
>();
for
(
GroupDto
groupDto
:
groupDtoList
)
{
groupList
.
add
(
groupDto
.
groupName
);
}
return
groupList
;
}
public
Integer
[]
getLocalUserGroupIds
()
{
List
<
GroupDto
>
userGroupList
=
groupDao
.
getUserGroups
();
TreeSet
<
Integer
>
userGroupIdSet
=
new
TreeSet
<
Integer
>();
for
(
GroupDto
groupDto
:
userGroupList
)
{
userGroupIdSet
.
add
(
groupDto
.
groupId
);
}
return
userGroupIdSet
.
toArray
(
new
Integer
[
userGroupIdSet
.
size
()]);
}
public
AcmsMessageJSON
addMemberGroup
(
String
groupName
)
throws
AcmsException
,
NetworkDisconnectedException
{
AddMemberGroupParameters
param
=
new
AddMemberGroupParameters
(
cache
.
getMemberInfo
().
sid
,
groupName
,
Locale
.
getDefault
().
getLanguage
());
return
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
addMemberGroup
(
param
);
}
public
List
<
JSONObject
>
getAllGroupsJson
()
{
List
<
JSONObject
>
groupList
=
new
ArrayList
<
JSONObject
>();
List
<
GroupDto
>
groups
=
groupDao
.
getUserGroups
();
if
(
groups
!=
null
)
{
for
(
GroupDto
groupDto
:
groups
)
{
JSONObject
group
=
new
JSONObject
();
group
.
put
(
"groupId"
,
groupDto
.
groupId
);
group
.
put
(
"groupName"
,
groupDto
.
groupName
);
group
.
put
(
"groupLevel"
,
groupDto
.
groupLevel
);
group
.
put
(
"parentGroupId"
,
groupDto
.
parentGroupId
);
group
.
put
(
"contentCount"
,
groupDto
.
contentCount
);
groupList
.
add
(
group
);
}
}
return
groupList
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
d75dff25
...
...
@@ -13,7 +13,6 @@ import android.provider.MediaStore;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.MotionEvent
;
import
android.view.OrientationEventListener
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.AdapterView
;
...
...
@@ -52,6 +51,7 @@ import jp.agentec.abook.abv.bl.dto.OperationDto;
import
jp.agentec.abook.abv.bl.dto.OperationTaskDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic
;
import
jp.agentec.abook.abv.bl.logic.GroupLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.bl.websocket.MeetingManager
;
import
jp.agentec.abook.abv.cl.environment.DeviceInfo
;
...
...
@@ -85,6 +85,8 @@ import jp.agentec.adf.util.StringUtil;
public
abstract
class
ABVContentViewActivity
extends
ABVAuthenticatedActivity
{
protected
static
GroupLogic
groupLogic
=
AbstractLogic
.
getLogic
(
GroupLogic
.
class
);
private
static
final
String
TAG
=
"ABVContentViewActivity"
;
public
final
static
int
ABOOK_CHECK_TASK_IMAGE
=
103
;
public
final
static
int
ABOOK_CHECK_TASK_VIDEO
=
104
;
...
...
@@ -1088,6 +1090,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger
.
e
(
TAG
,
"startContentActivity failed."
,
e
);
ErrorMessage
.
showErrorMessageToast
(
getApplicationContext
(),
ErrorCode
.
E107
);
}
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_GET_GROUP_TREE_INFO
))
{
List
<
JSONObject
>
groups
=
groupLogic
.
getAllGroupsJson
();
afterABookCheckApi
(
mCmd
,
null
,
0
,
"getAllGroups"
,
groups
.
toString
());
}
}
...
...
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