|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");2 T0 i0 [: q6 [) J
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");% v: v0 i( r8 B L) d+ P
P; Z7 d5 j' g' F: N
DataManagementService dmService = DataManagementService.getService(connection);- f$ ?: p8 w& r/ l* T
# N% P3 g. y0 y ModelObject[] models = new ModelObject[] { user };3 v) \" U- e0 h% T
try {
4 x' {0 w2 D6 j, h, g3 l String[] str = new String[] { "taskinbox" };
4 d1 ]' ^7 j5 S dmService.getProperties(models, str);0 {+ q+ E; n. h5 j% f
TaskInbox inbox = (TaskInbox) user.get_taskinbox();
( H3 H7 ?6 o% Y& \
# R# N. M% G1 ^2 c1 H) X models = new ModelObject[] { inbox };
$ Y+ k! v4 g4 p) ^: B) K9 W( r str = new String[] { "tasks_to_perform" };
+ b. F- T$ k7 l! w dmService.getProperties(models, str);5 i6 W, e2 C8 C! S+ H9 e$ v* o0 T; N6 l
models = inbox.get_tasks_to_perform();
5 o6 w, z5 u/ I3 h! ^, P str = new String[] { "object_type", "object_name" };# X) M. ~0 }) {' @* z% M. T0 }
dmService.getProperties(models, str);
4 k: A6 X X: f; C! R System.out.println("---------------:" + models.length);" ]- A8 K% @+ r; |% o
for (int i = 0; i < models.length; i++) {8 @$ Z; A% u/ w9 k; q
System.out.println("------------------------------");
) {7 f- o$ j8 v6 G System.out.println(models[i].getUid());
( k$ z y0 \0 `5 q8 u System.out.println(models[i].getPropertyDisplayableValue("object_type"));( j- b' S2 B9 b. A1 p
System.out.println(models[i].getPropertyDisplayableValue("object_name"));
- I0 c/ |+ E A3 _5 u; Q }
% u# N! v! i3 \" o7 j8 f$ q7 E
5 ?6 x8 {+ U i- c& j; w7 [8 |) f } caTCh (Exception e) {
1 U+ S, N |& j' o% _% y // TODO Auto-generated catch block
6 Q- m3 `# R, ^* A+ j* v& }& M8 h9 y e.printStackTrace();
5 `4 ~( ?) J3 _" p }# R* Q. g1 t- c) o
5 x4 J' T( D. w, t, r% c
|
|