|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");7 t2 q7 [' h5 X. k, `
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
6 X8 F; n! N5 Q' K/ a3 j V2 o5 \' L+ x7 k( |
DataManagementService dmService = DataManagementService.getService(connection);7 l8 o: c# j+ I. P8 ^
" A7 A+ P* O/ O M- k; O# P* _ ModelObject[] models = new ModelObject[] { user };
! Q9 z# L' J* f; B/ W try {9 \% a" S4 Q: B. v: c# [
String[] str = new String[] { "taskinbox" };9 R" g5 w& |6 Q* p4 Q
dmService.getProperties(models, str);
( V- c/ a5 X+ X TaskInbox inbox = (TaskInbox) user.get_taskinbox();0 i! S* f, g5 f8 C, ~* [
$ M* t' h2 e9 B" m( b
models = new ModelObject[] { inbox };
: U4 S1 C8 j3 P* n/ S str = new String[] { "tasks_to_perform" };
; ]9 F9 k, |# {5 u2 B2 `9 q dmService.getProperties(models, str);
7 ^ R0 |( A/ d: Y _; M' f models = inbox.get_tasks_to_perform();
" x* | o0 {; T$ _2 i' G3 c3 Z str = new String[] { "object_type", "object_name" };3 n' O, F- l2 m( h
dmService.getProperties(models, str);+ T5 v9 |$ a1 B3 [/ K! z' @
System.out.println("---------------:" + models.length);2 y2 S$ r+ M" ^. d3 O) o& e
for (int i = 0; i < models.length; i++) {1 ]4 s8 M* y9 H: Q7 A
System.out.println("------------------------------");
, z( D' F# u- f# l! Y5 q: V: M System.out.println(models[i].getUid());
# i- K3 i8 O. c3 J: M" g System.out.println(models[i].getPropertyDisplayableValue("object_type"));4 o. h* U8 G2 D" \
System.out.println(models[i].getPropertyDisplayableValue("object_name"));
& K6 i" d! B: U1 G8 O0 L }
& Y# [3 o( J- ^: F
# t' X; u/ e8 j9 w% c! S) q } caTCh (Exception e) {
- C& d" D! @4 m7 | // TODO Auto-generated catch block
; i/ v( ]* \; U e.printStackTrace();
$ ^, j& l* N3 S+ U8 D. d9 M2 } }/ \! J2 ^+ G/ U4 I5 K9 U3 D
, J# u) [. N8 @: w& i
|
|