|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");3 G4 b: L) k' E" T c, a5 e
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");6 A# `9 h1 L: i2 D: d) x
, E& b8 Z6 }8 r, r7 t DataManagementService dmService = DataManagementService.getService(connection);
1 n8 M1 k4 x/ c9 O1 @* |) a! _
2 }! k3 O- z/ C# |/ @2 U1 f5 D ModelObject[] models = new ModelObject[] { user };
: n8 b* X Q# x2 B7 u$ {0 [ try {# a/ F" d b9 @ [6 w/ ?& L
String[] str = new String[] { "taskinbox" };4 ?$ D% t) c2 k1 M
dmService.getProperties(models, str);$ w+ I, w1 T% e7 a
TaskInbox inbox = (TaskInbox) user.get_taskinbox();; s# q# @4 _+ E/ j8 b8 w6 e
$ }4 y2 \+ Y) a g. ~. {
models = new ModelObject[] { inbox };
" D$ t" o8 U1 l5 m5 {! ]' u+ e2 a str = new String[] { "tasks_to_perform" };8 r/ ]9 a3 Q, ~* M: Q- u
dmService.getProperties(models, str);
+ }3 o; U; j- M models = inbox.get_tasks_to_perform();
9 c* f8 T7 H7 O# `& U str = new String[] { "object_type", "object_name" };! U A; g' L8 n9 \5 s9 B5 H
dmService.getProperties(models, str);
3 ?5 D3 H& N/ j6 S, E& q0 { System.out.println("---------------:" + models.length);: U i; t( X# `! S
for (int i = 0; i < models.length; i++) {
. V& c. d7 G2 D/ d" [+ G4 ] System.out.println("------------------------------");
8 s: @$ L! i( ]' Z0 A7 z System.out.println(models[i].getUid());
7 A) D1 D. R3 ~4 O8 G: } System.out.println(models[i].getPropertyDisplayableValue("object_type"));
' R* x9 j2 W% z% j: Z System.out.println(models[i].getPropertyDisplayableValue("object_name"));
! ^9 |2 m" N1 z7 B1 R; [ }; l7 P& {' h. }( \5 s8 y
/ ]$ v# U. L( L* {# y. ]4 \ A } caTCh (Exception e) {
! G1 ?4 N4 {. }# Z' g" Z1 o/ q // TODO Auto-generated catch block
% Z# w. N5 H4 r" k e.printStackTrace();
; @% L5 p. O3 r: E& @! g }8 [8 y3 H. F H. d- a4 m
H/ {7 h" ?" a7 G. o! M# K
|
|