|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
' [# C y. V9 T Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");6 D, e1 u! o9 c) Y* B- x
/ Q: E* s! n" ]1 H5 G7 m2 u DataManagementService dmService = DataManagementService.getService(connection);
4 M. f2 X4 m/ [9 Q. l( p$ x3 G4 b$ b$ O# ^5 \
ModelObject[] models = new ModelObject[] { user };
: g8 U) ]! h6 ]4 x try {9 Y- C* [% P2 w f+ i1 v5 ]8 f1 R
String[] str = new String[] { "taskinbox" };
& X! L* `; x( I# y0 `7 O8 Z dmService.getProperties(models, str);! l/ X; i7 c( b* O9 s9 J3 u& A, @, {
TaskInbox inbox = (TaskInbox) user.get_taskinbox();# l1 O' T j$ b0 ~
4 Y& n: ]9 H* p/ e. I7 V- T models = new ModelObject[] { inbox };
( C) s1 I8 Y% h6 s0 N) o( M- g str = new String[] { "tasks_to_perform" };" b8 C- w! G. f/ [" G4 x
dmService.getProperties(models, str);4 w- b9 ^9 P8 e2 i8 h& i. ` p( d* Y! g
models = inbox.get_tasks_to_perform();6 Q0 A% W- P( z- q
str = new String[] { "object_type", "object_name" };
' t! @' V7 i- v! \, j( Y+ } dmService.getProperties(models, str);% g$ Q) Y3 i1 w- I
System.out.println("---------------:" + models.length);2 k& D8 Y% R6 T( N
for (int i = 0; i < models.length; i++) {* }% o& I- {6 n3 n" ?
System.out.println("------------------------------");
4 d9 i& F, ~2 `2 d8 ]3 m) A# u System.out.println(models[i].getUid());
, r/ e1 j5 f( J. Y6 j% T% M System.out.println(models[i].getPropertyDisplayableValue("object_type"));
( ?. t9 \" Q( V' C" i* e System.out.println(models[i].getPropertyDisplayableValue("object_name"));
C, Z9 I- l7 \& Z ?& I, o8 E }- }0 F$ A7 U2 k. d
% |1 W7 K+ p5 I. K3 L) {. k
} caTCh (Exception e) {8 z) |2 {' Q4 ~- U
// TODO Auto-generated catch block# U5 g6 w3 y8 p. p; ?
e.printStackTrace();
5 S* J. K" l) c: o6 V9 M7 P3 ]" ^8 Q }
2 {* G8 b2 L. l: h: k
2 t, d8 i1 V: r2 e |
|