|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");/ b. e5 _8 u5 z! ?: Q
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
- E2 w: K; Q3 ~! f& P* a5 G- @# M5 s+ o/ f% s" Y
DataManagementService dmService = DataManagementService.getService(connection);
* d- p/ J% W9 h6 ?" E; m
4 h, G. E3 ^* b3 `9 n6 X# x# b. o: J" R ModelObject[] models = new ModelObject[] { user };
6 X7 Y2 w3 U8 `! n. f' D: e try {4 q2 q: n7 b% A6 S& V
String[] str = new String[] { "taskinbox" };3 V V8 y3 U, c
dmService.getProperties(models, str);
$ Q, n! j, B+ z TaskInbox inbox = (TaskInbox) user.get_taskinbox();
+ f [! M* K; ?1 O9 M5 e8 T
0 q8 A9 ]2 P2 e( _ models = new ModelObject[] { inbox };1 M) v" `( q. B" {+ |7 q
str = new String[] { "tasks_to_perform" };
" e6 ?. s' [8 n' l; ]( c0 x# @. D dmService.getProperties(models, str);
1 r8 f. s5 }1 U- T$ W! S models = inbox.get_tasks_to_perform();
7 p3 K# b9 g2 _9 V4 Y# N str = new String[] { "object_type", "object_name" };
& N$ b3 w) o# j) X, I0 m7 A A& a c dmService.getProperties(models, str);0 d+ V; H4 ?( |$ @5 ]
System.out.println("---------------:" + models.length);
5 g. M d- |# Z! h/ o" n; m for (int i = 0; i < models.length; i++) {6 L/ n2 M, [! d( \* K8 K3 q
System.out.println("------------------------------");
# E; U9 B5 I8 b" L" [9 r System.out.println(models[i].getUid());
* T7 }/ S2 f, [/ R3 n: I) F) P% n System.out.println(models[i].getPropertyDisplayableValue("object_type"));
% p8 [5 g: P% m System.out.println(models[i].getPropertyDisplayableValue("object_name"));0 N4 t( o7 O' C* J8 F# V
}
7 e0 e% |" m5 G4 ^# P& s. x4 B) T6 [. R* d5 f; g4 ^6 n$ M3 X
} caTCh (Exception e) {
2 }, ~" K5 T2 a // TODO Auto-generated catch block8 o; f4 F8 ~% V
e.printStackTrace();
- _3 m2 Y3 h- a! v5 y }
+ {9 X. N; G9 _; S, c% T; c. g
& c" @* I, F$ T! \ |
|