|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");6 |; y0 e: T$ w: Z; Y) r( R
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
% z* D' |! [8 h8 r# X/ M' q1 L; l3 N$ ]! ?, ^$ ^
DataManagementService dmService = DataManagementService.getService(connection);, r' G/ ?7 w5 L2 f/ R$ K0 f. \: Z
% Z& Y) a: Q; a2 E( }4 R ModelObject[] models = new ModelObject[] { user };8 y# r& [; e* E
try {- \8 U6 t7 J( ^* |1 [8 p
String[] str = new String[] { "taskinbox" };
$ [, f0 E" m2 U+ r% q" {) O dmService.getProperties(models, str);: i7 |6 F9 I, t9 z* K& |
TaskInbox inbox = (TaskInbox) user.get_taskinbox();, _. j% L0 G, [7 Y: S6 C
5 w3 {8 ?# ]: J
models = new ModelObject[] { inbox };
, U& o n6 j0 U5 a: G& B! D5 w str = new String[] { "tasks_to_perform" };
2 p6 B2 U" u9 h) ^( s/ X dmService.getProperties(models, str);
: r* t& s/ d+ v' Z models = inbox.get_tasks_to_perform();* z& v2 b( e O) n9 _# t
str = new String[] { "object_type", "object_name" };
1 G1 x6 X- f& c* I/ ~! a dmService.getProperties(models, str);7 r2 S7 U' J7 d+ j) z
System.out.println("---------------:" + models.length);8 N9 _9 j$ }# W2 F5 h# h( S/ o; g
for (int i = 0; i < models.length; i++) {+ ^' ^& f o% _' c
System.out.println("------------------------------");
! c2 U8 V. b, D5 ], g System.out.println(models[i].getUid());# l2 E2 ?! E) @& R' g' U u0 Q
System.out.println(models[i].getPropertyDisplayableValue("object_type"));! a3 J% q8 N& ~4 k% f1 F/ W
System.out.println(models[i].getPropertyDisplayableValue("object_name"));
: v) V( }& H. I5 p }4 C1 @/ i" `5 h! d
N8 c4 h5 F; a9 k* @ } caTCh (Exception e) {1 Y; U! i9 n6 P- q$ V& ~3 \, m7 v& _3 m
// TODO Auto-generated catch block B3 h1 `* R, i3 e
e.printStackTrace();
6 Q% B! W5 M% s }. F, M5 S2 n% X1 Q* ]/ o. `- ? n( z8 P
" o' K2 C; P" A% Q |
|