|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
! `4 ^* [. W) _" J2 T; U; r9 ~% A Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");! @0 \# B! A/ w& N5 B
; q( ~ j [* X" U# N) B! P DataManagementService dmService = DataManagementService.getService(connection);
) P9 B3 ?: C+ y6 B0 R$ H
~& s0 X2 J& u0 B ModelObject[] models = new ModelObject[] { user };
: r( K& |. O6 N3 ^. G6 d F. s try {
: u H- _* ~3 M5 f9 d* ^9 n# X String[] str = new String[] { "taskinbox" };- Q& H9 a: R A2 B) w' E
dmService.getProperties(models, str);
8 T0 h# i' x% F2 K TaskInbox inbox = (TaskInbox) user.get_taskinbox();
$ g$ y% w2 y3 L3 ^ f6 @1 K
) d* Q0 h$ m, Q$ F3 D models = new ModelObject[] { inbox };
9 w3 |* I4 f. _- O' k' U4 N str = new String[] { "tasks_to_perform" };! m) N5 n: c1 Y
dmService.getProperties(models, str);
/ E/ C8 C* @* v# ~( H# c models = inbox.get_tasks_to_perform();3 @( F& E+ {- K B( w. ]: k
str = new String[] { "object_type", "object_name" };
, D2 o- ^# L' b- r3 |5 j dmService.getProperties(models, str);
$ ]/ ?% f. E& y( |. v; m System.out.println("---------------:" + models.length);
0 k/ H; D" z. m" l3 ?) T9 M" E9 O) h* O for (int i = 0; i < models.length; i++) {
: s) a/ {9 R; E7 B# V; n, Y System.out.println("------------------------------");% X. a) U. M" {* @- s, J3 ~: u
System.out.println(models[i].getUid());
/ u" P7 F9 x; U7 X, W. { System.out.println(models[i].getPropertyDisplayableValue("object_type"));
/ b. [- u0 x- s7 L; ?. L System.out.println(models[i].getPropertyDisplayableValue("object_name"));
3 V, t J# Y U$ w+ f1 R }
+ ~8 Y3 _/ t- L# b
% T& p7 A3 ], N+ x, b } caTCh (Exception e) {; V* A! ^- q; ^& ~, \
// TODO Auto-generated catch block
1 H! h0 W3 }* ]& a- j6 f e.printStackTrace();
6 Z! S. \3 w3 f$ l+ t. U }
0 h5 @2 k; B$ F- p0 V( H; \
. {4 x+ t( Z" S) }: A/ Z |
|