|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
7 [0 [1 i% i# I `- t# e0 S$ M$ E- } Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");7 w0 ]: T' q H2 L$ E$ V
* Z3 w4 ?7 E4 a6 b {. E
DataManagementService dmService = DataManagementService.getService(connection);; K. o) B3 ^+ O7 s, N7 H: a
+ h" b, O* O9 y% D* a% b- K# Y- H
ModelObject[] models = new ModelObject[] { user };% F9 V0 @7 i% p2 i
try {3 J. |8 s9 Z9 ~* Q$ H! g/ f6 D
String[] str = new String[] { "taskinbox" };( {# c( l8 Z# }1 B: c
dmService.getProperties(models, str);
7 n8 x& C/ B, v& Y8 |& k2 F TaskInbox inbox = (TaskInbox) user.get_taskinbox();$ E' t! p! y6 k- }
. D- }4 g$ A; O7 I# b+ P
models = new ModelObject[] { inbox };; @3 z6 f F% o8 K K( J
str = new String[] { "tasks_to_perform" };
0 R/ z* a" K' V4 s9 m dmService.getProperties(models, str);, u! G u+ K0 @; S2 p8 {4 S0 H4 J0 E
models = inbox.get_tasks_to_perform();) A0 s$ W; K1 O2 e3 a
str = new String[] { "object_type", "object_name" };6 `/ L p% V" J: v8 p1 T, m4 q
dmService.getProperties(models, str);
% D% _% J2 w T. `( K: b/ y System.out.println("---------------:" + models.length);
" g( D, a" J; B ` for (int i = 0; i < models.length; i++) {
4 A: m0 K7 F& h+ ]' n System.out.println("------------------------------");8 v" h" n7 N k9 t
System.out.println(models[i].getUid());
9 R. z/ Q; x/ p0 ]2 l: q* v9 u System.out.println(models[i].getPropertyDisplayableValue("object_type"));' l1 v7 S+ a3 |3 q
System.out.println(models[i].getPropertyDisplayableValue("object_name"));
: q7 k% o# H4 M6 r( F8 [- E }( p7 A) N3 Y, c# g9 y( d! d% o
; C# c/ a) t5 d) P- g } caTCh (Exception e) {2 Q# h' b6 `: v- q
// TODO Auto-generated catch block
) `) _/ V! S& H C% y! K e.printStackTrace();" O% g4 s) I- P1 l. h+ |
}
% e4 Q2 v; _# F9 k( A5 G# h
5 I( p; _4 q5 K |
|