|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");+ @- O/ W9 y( B5 M$ e E* v
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");5 n$ _6 }; ]- m! u7 Y
" o# a, k3 T8 z* h- ?6 l
DataManagementService dmService = DataManagementService.getService(connection);
. {* \, L: W- N; L
: }8 C$ r0 E/ Z ModelObject[] models = new ModelObject[] { user };- g) I( y7 x" o% W+ z+ [+ q! @
try {4 N, E W7 w: o" U6 H
String[] str = new String[] { "taskinbox" };
5 H. H5 m3 ^5 J/ u" s dmService.getProperties(models, str);
- M* R7 T& f3 q0 y TaskInbox inbox = (TaskInbox) user.get_taskinbox();4 l3 }" U1 G" f/ v# `
n/ u+ {4 N# { }+ y- H2 u
models = new ModelObject[] { inbox };
$ a2 V# X2 w5 n. [ str = new String[] { "tasks_to_perform" };" z; M" R( Y# O/ }0 M2 w1 n
dmService.getProperties(models, str);5 E0 u( J5 r$ x6 A& M" L" A5 u
models = inbox.get_tasks_to_perform();
' p3 E" g& @0 H8 |) J1 }5 i7 t str = new String[] { "object_type", "object_name" };/ P! D P, Q9 @( d
dmService.getProperties(models, str);
+ S$ J* ~1 x# c. [; e System.out.println("---------------:" + models.length);; n1 }$ r7 C+ F/ o1 q# x" o
for (int i = 0; i < models.length; i++) {) c: m& b( }4 }" x; [8 O M
System.out.println("------------------------------");
, C: G9 v" `5 `/ O8 B1 D System.out.println(models[i].getUid());
6 B; M; V+ _! A7 l, |3 _ System.out.println(models[i].getPropertyDisplayableValue("object_type"));
& }" G1 K5 T8 g' o: R5 Q0 Q, n System.out.println(models[i].getPropertyDisplayableValue("object_name"));
: y4 [7 b4 r8 S }# k5 v4 N: @, n1 q- q/ N& p
- t( J8 N' Z2 p0 e" g6 y } caTCh (Exception e) {1 @. ]' W& K+ u9 b
// TODO Auto-generated catch block |; }. O2 F& V9 E. y
e.printStackTrace();1 e9 _; h4 I0 I9 ~7 J, g
}
' X% ]3 E( Y0 `8 F! x# ~- C$ Z2 b' ^1 ]# `! T5 [+ ^. w# l/ U( I' ^
|
|