|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
; r& K: ~. C/ \, r' u6 N+ V Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
6 R( X5 D7 N* O, }8 o, S. \8 w: `2 U, M
DataManagementService dmService = DataManagementService.getService(connection);
9 H, k: a; o8 d) ^2 m6 o
$ ?" s) ]! }2 \ ModelObject[] models = new ModelObject[] { user };
`9 ?, G3 |0 K try {
, O0 I$ u: L5 G2 U String[] str = new String[] { "taskinbox" };
. [8 K2 ?6 Z4 s' @+ }) K6 n dmService.getProperties(models, str);
' q- O" f5 @8 @4 F" f5 q5 u0 y# f TaskInbox inbox = (TaskInbox) user.get_taskinbox();
7 ?- p0 A0 |- z5 o/ z0 w( {
$ q. f F( f; @' i models = new ModelObject[] { inbox };) w/ F/ G* f% z- ~% C
str = new String[] { "tasks_to_perform" };
( P4 {* y: K! Y2 L0 `* k dmService.getProperties(models, str);
) x" N3 O1 u' t. } models = inbox.get_tasks_to_perform();' u4 i, V5 l2 M
str = new String[] { "object_type", "object_name" };
: M/ j X% L3 ~* K0 R) K/ a# { dmService.getProperties(models, str);9 D* f) Z$ L* V
System.out.println("---------------:" + models.length);. K7 s* |8 J% I
for (int i = 0; i < models.length; i++) {
7 ^$ e7 _, h) ]( y2 Y$ u System.out.println("------------------------------");
5 u0 M- R0 T) m& R' b. Z" R System.out.println(models[i].getUid());
N* Z+ Y8 N9 c) P System.out.println(models[i].getPropertyDisplayableValue("object_type"));( C0 c R- J" V; P& |
System.out.println(models[i].getPropertyDisplayableValue("object_name"));
5 y m; G4 I! x. Q; o& T: i }
1 N; \! E3 c( O+ c; A" d
; m/ e6 {9 G2 c7 F } caTCh (Exception e) {% \1 d: k' e! x* {! O
// TODO Auto-generated catch block
# J) n0 f( Q- E) K9 K: l! W e.printStackTrace();
0 x" E9 a, k0 U* h# U }6 k0 u9 i4 | L) @5 L) N
% {/ X0 w3 `: s |
|