|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");$ B7 H# H/ e @9 q3 R, T) R# Q
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
. u: U) ]- l# h: k. _
0 T, m3 R1 G% q4 k: k) ]" O DataManagementService dmService = DataManagementService.getService(connection);
* w) \) O9 n: ]3 w& _! O
! A' _8 s1 d8 x0 z ModelObject[] models = new ModelObject[] { user };
" h" l. s0 D) O, p6 Q# {; a, h/ y try {
. _3 Z6 W" v/ m9 O9 G' d6 M' @5 R& {3 Y/ } String[] str = new String[] { "taskinbox" };% j. a4 b$ H0 ^
dmService.getProperties(models, str);2 a- }6 u% w! h8 u
TaskInbox inbox = (TaskInbox) user.get_taskinbox();( [& M0 I3 c) P" Q8 q
- \# P+ H8 H7 j0 I5 G: v! } models = new ModelObject[] { inbox };( A) u% h6 y6 g* D1 E5 @2 K, ^
str = new String[] { "tasks_to_perform" };
/ N9 E* X; b' l( V8 Z& {5 D5 ? dmService.getProperties(models, str);
& U3 Y$ w# C9 v8 u- C# | models = inbox.get_tasks_to_perform();
3 \7 |/ c- `# R$ U$ T str = new String[] { "object_type", "object_name" };, y3 \ d% @ O5 P) h2 V) C
dmService.getProperties(models, str);
; d$ u; b2 B" X' C( }- q+ U System.out.println("---------------:" + models.length);4 o B0 ~1 @' w3 \( b& l4 P7 T
for (int i = 0; i < models.length; i++) {
$ V/ Z$ z. U& B System.out.println("------------------------------");
: x- K2 @) ?7 {6 g6 d3 J System.out.println(models[i].getUid());# h. x# }9 f# {" `. Z" Y# v0 D3 w
System.out.println(models[i].getPropertyDisplayableValue("object_type"));
0 E C9 r% C, u {2 l System.out.println(models[i].getPropertyDisplayableValue("object_name"));
; V, |8 V& z. t: |% H, x }- ~ _' T/ |! _2 M* t) \- Q
t+ O8 f; e" ^& L } caTCh (Exception e) {
' w$ F( D6 @1 \ // TODO Auto-generated catch block
: t2 o7 o( U. l* R. d5 j9 z- ^% e e.printStackTrace();
8 t3 @- F% q3 x, \ }
9 _' g/ l+ ^/ p5 i% o
. l% k9 f% N: q |
|