|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
. {) @" n4 w$ D0 f5 h2 \ Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
+ ?* H& c; F" x' O& N# q' d; V) X( k. i" M( f3 y% V* \1 E
DataManagementService dmService = DataManagementService.getService(connection);
$ k6 w; }. W$ Z" I, B& I/ Z: w3 G
ModelObject[] models = new ModelObject[] { user };
4 C( i9 c+ ^4 f, L# j. x5 A+ W try {4 \ O& Y/ O, d9 V+ C9 a
String[] str = new String[] { "taskinbox" };
6 ^+ Q- U7 y/ n( S dmService.getProperties(models, str);
! S& F; [- k: f% p1 j TaskInbox inbox = (TaskInbox) user.get_taskinbox();
' N8 h, t4 j; _2 ^2 `7 b' \7 s& Y8 R" Q; m8 d4 h
models = new ModelObject[] { inbox };7 ?" J2 a+ g3 J1 N9 Q
str = new String[] { "tasks_to_perform" };
2 t* Q8 Q6 V% Y) k. o* M8 E; a dmService.getProperties(models, str);+ q9 s4 t' B# x' j, c$ G' q0 f% C x
models = inbox.get_tasks_to_perform();: Q# o+ R' p) s& G B6 a
str = new String[] { "object_type", "object_name" };; J4 g! j$ W$ P, Y) b* k0 L
dmService.getProperties(models, str);
2 @! n+ G; D7 J3 O. M' g4 A System.out.println("---------------:" + models.length);
7 W7 e: i3 ?: i& b r! a% J( o5 J7 s' R for (int i = 0; i < models.length; i++) {
8 b. t" Y, @ V9 c. K& W System.out.println("------------------------------");* |$ T6 T& V" L8 W6 H
System.out.println(models[i].getUid());
# S7 ~. N0 U: z System.out.println(models[i].getPropertyDisplayableValue("object_type"));
4 r! [5 ~0 M! O System.out.println(models[i].getPropertyDisplayableValue("object_name"));
6 ] i$ L7 Y; q7 ~' j) ?; u }
$ e2 g( {7 T3 N2 d a: C
& n# i# e1 @! z3 H } caTCh (Exception e) {
3 A3 k, X* j8 q- C! s# z0 t/ w" X // TODO Auto-generated catch block8 I7 G) @( s, S# D: i& w4 s
e.printStackTrace();
+ W+ }2 e e7 Z0 C }
1 n% V) u0 H8 Y
0 Y0 L! |* T3 s |
|