|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
+ I9 o$ c: U3 k% V- p/ I3 N Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
9 p/ W S6 `0 j$ ?% }# ]$ c4 c) O0 y7 f; |( Z, _7 C
DataManagementService dmService = DataManagementService.getService(connection);
# v) ]9 y6 S+ n9 }+ a# J$ Y
/ p9 c( H$ b# t ModelObject[] models = new ModelObject[] { user };
8 ~6 z+ V% e0 `, J! ` try {5 v d8 d# S4 J) H. a
String[] str = new String[] { "taskinbox" };
7 }6 C8 n( F' A0 y+ u dmService.getProperties(models, str);- X% v* k. A% C! x9 R3 u
TaskInbox inbox = (TaskInbox) user.get_taskinbox();8 k O- A" w2 i; v% l/ ^
p3 \; p/ J! n, u6 Z' p; R) Q models = new ModelObject[] { inbox };
5 u/ ?4 B7 ~; S! W, B9 |( F& r str = new String[] { "tasks_to_perform" };2 J7 N8 i- b$ C0 y% m
dmService.getProperties(models, str);
1 K% c) t0 e" W, s5 _: P, y models = inbox.get_tasks_to_perform();
2 C4 q7 o- N2 v) m, ] str = new String[] { "object_type", "object_name" };
8 q& m1 _7 e/ h- b dmService.getProperties(models, str);; f; S5 _" s$ s. d) C/ \
System.out.println("---------------:" + models.length);; u2 x& h4 F" y; p1 w D3 ~
for (int i = 0; i < models.length; i++) {
8 i* A9 E# Q. A+ x$ P System.out.println("------------------------------");) Z6 `7 E: d4 U. y9 w; F
System.out.println(models[i].getUid());; X2 L& y0 q V8 ~4 C* i
System.out.println(models[i].getPropertyDisplayableValue("object_type"));7 E" \7 [9 v d4 ]/ e* d$ B( I% D# z
System.out.println(models[i].getPropertyDisplayableValue("object_name"));
8 P" s6 V! ~2 o }+ M% x# i) w$ V% S: ]& o6 q
5 i$ A- N; @. H } caTCh (Exception e) {
4 d+ l- \7 U3 z- o, i* j // TODO Auto-generated catch block
/ z+ i9 G3 q, f K2 O e.printStackTrace();
9 ?$ Y& Z. a7 ~2 i- q7 u }
* Q4 W! `% b' v0 j4 p& t( V* W8 x
|
|