|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
. A) r4 ^7 z! T$ F$ K! o Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");& ]1 U8 G& { K, }+ N1 }
$ E0 L) w. y% P/ a3 z+ r DataManagementService dmService = DataManagementService.getService(connection);
) K- B/ L, r" Z, \+ W1 i! h
. t8 u4 `$ U R: U T t ModelObject[] models = new ModelObject[] { user };9 t3 `/ l6 G) ~. X0 E c+ C
try {) \ U; L" ~8 v& k3 k
String[] str = new String[] { "taskinbox" };4 p& c6 [7 W4 o! C6 a
dmService.getProperties(models, str);
; A$ {7 {9 L9 I3 c TaskInbox inbox = (TaskInbox) user.get_taskinbox();
! e3 W) X" ?; e" s5 W# l8 M
+ R9 ^% r( K2 [" t8 N models = new ModelObject[] { inbox };
+ i. y& N7 l2 T$ B$ x d+ u str = new String[] { "tasks_to_perform" };$ R7 V. j: O% g) }+ D6 ~( P5 ^ Z
dmService.getProperties(models, str);
1 e+ m$ D! D( [ models = inbox.get_tasks_to_perform();
. Q. o, I8 z, H2 o str = new String[] { "object_type", "object_name" };
+ W5 Z5 G0 u, Y dmService.getProperties(models, str);
8 Y) g) V- k, | System.out.println("---------------:" + models.length);$ Y8 |- c, [" r: j0 L& @. G
for (int i = 0; i < models.length; i++) {
+ _$ v8 R6 n3 G' C, R' W System.out.println("------------------------------");
5 j5 ]% E1 ~0 F- {6 G" z6 Q# I4 u System.out.println(models[i].getUid());
4 g e1 g1 f7 s$ g1 W5 V/ y8 V) I# ~ System.out.println(models[i].getPropertyDisplayableValue("object_type"));: ^# ? A3 e0 T! W
System.out.println(models[i].getPropertyDisplayableValue("object_name"));+ G7 D/ N5 F9 v7 Z9 o/ T1 B3 [
}, E0 q- Z# Y) K, N) c+ j5 V
- L4 S; r4 a! ^2 n$ u0 ^' U2 F } caTCh (Exception e) {
6 u, A4 h/ d; c8 l; L% Q1 S // TODO Auto-generated catch block5 A3 M4 ^* W0 h% E. I9 b9 Q" w; V
e.printStackTrace();
: A7 \5 j- N+ ^7 V V }
`8 h* ~8 O) O( y& Y" o- b( o
# M! [, D, Y f" I |
|