|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");$ s! c" Y' [$ i5 ~1 s C
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
# S* x1 b7 T6 q/ F( e7 J2 o
0 W5 Q6 x; E1 u" m& X9 Q5 I DataManagementService dmService = DataManagementService.getService(connection);6 o6 r, @/ W" ^3 H6 @) E+ F
% L; O3 ]' b L+ D; J) j* P: h ModelObject[] models = new ModelObject[] { user };' a" X9 m3 V0 f
try {
% t+ U6 y: C% i. t, z: i String[] str = new String[] { "taskinbox" };! V5 C2 Z, F3 x/ @+ N+ C
dmService.getProperties(models, str);; [. O8 D, |: v; n, U
TaskInbox inbox = (TaskInbox) user.get_taskinbox();- l- Q3 X% ]: N
, x' L& K. {3 G7 j Q models = new ModelObject[] { inbox };0 u# v0 E# B1 T' a3 @( v1 t q
str = new String[] { "tasks_to_perform" };
: o$ h6 J ]: y7 E6 e. w dmService.getProperties(models, str);
, I. o& x$ I1 F. W8 P4 O3 u models = inbox.get_tasks_to_perform();6 m2 ?' M! C0 b0 Q% H! h
str = new String[] { "object_type", "object_name" };
+ N, O# z9 a3 U1 R" ]5 Q+ h dmService.getProperties(models, str);
# u! r) I" Y( G# x' p0 J( c System.out.println("---------------:" + models.length);
' Y! y) O# E5 b% {. Q. g" w for (int i = 0; i < models.length; i++) {/ @- s7 ^1 k& X2 _9 K
System.out.println("------------------------------");% b/ @7 R- ?! n; B4 I( F; B. |2 T
System.out.println(models[i].getUid());2 L+ ]( \3 Q, X/ u; Q& v) W
System.out.println(models[i].getPropertyDisplayableValue("object_type"));" m6 i2 ^/ ~+ j
System.out.println(models[i].getPropertyDisplayableValue("object_name"));3 Z% U. n# |* Q* @9 N# r* M
}) K" I; t! D1 X5 S0 n6 x" y
. F8 W+ l, L$ A! V. I } caTCh (Exception e) {
r/ ^. }) P/ K5 s" n. N$ z // TODO Auto-generated catch block6 {. M: C' Y3 @, ?4 @
e.printStackTrace();3 l) j: t! C* \$ m/ Y0 m/ t
}
# r& q+ h& a7 Q+ W( U* k1 M) f- Q8 F" X2 _
|
|