|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
7 E9 ^) W6 ~9 y- M$ W Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
0 H5 Q l4 L, l5 e6 ?1 N* s0 C% F! q% r1 S+ X+ ~- s% l& E+ l! E, L
DataManagementService dmService = DataManagementService.getService(connection);
6 ]1 @9 G0 v* w+ ` M1 c3 s/ m6 x+ m' z$ Y2 n7 A& L9 Z
ModelObject[] models = new ModelObject[] { user };
% B6 J; C" X" q$ Y try {
: E% u g- p: X, S+ } String[] str = new String[] { "taskinbox" };
/ r, c% F3 S& i G: } dmService.getProperties(models, str);# Z: w( W. S) i
TaskInbox inbox = (TaskInbox) user.get_taskinbox();& A0 b9 W+ e3 g3 {# @) i
0 r4 A. d/ @6 D+ J5 ^5 _( J& L. \; _. ~: S
models = new ModelObject[] { inbox };
3 M& O$ p( y$ \. x; Y! d, y str = new String[] { "tasks_to_perform" };
: T5 d2 C9 _; b; X9 l dmService.getProperties(models, str);0 b4 f- L( r/ P; \1 G: m) F
models = inbox.get_tasks_to_perform();* ?0 |/ p: t( T- }3 ] [
str = new String[] { "object_type", "object_name" };: i$ Y/ \' Y: x4 R$ t
dmService.getProperties(models, str);
: y+ g$ J0 P: Q( b System.out.println("---------------:" + models.length);
8 I1 J. w' D0 M1 F+ u& m for (int i = 0; i < models.length; i++) {% a X3 @5 B+ d
System.out.println("------------------------------");0 G4 U6 v A6 j( z" j
System.out.println(models[i].getUid());
9 A$ G! l* ]: Y- R$ z System.out.println(models[i].getPropertyDisplayableValue("object_type"));/ |4 x' v% P6 y& J2 S
System.out.println(models[i].getPropertyDisplayableValue("object_name"));
( w0 p& |( Q3 Q8 C8 [; ~$ ^+ c }! Q/ Q! I, h, G' _, ?& |
3 R, n+ y5 V& C8 u
} caTCh (Exception e) {# b7 `. w" h* x+ P
// TODO Auto-generated catch block
/ o$ \. U/ N0 L# N# j! b: q e.printStackTrace();
* M4 J$ P! M7 G }
6 Q) Z6 M3 M) A( b4 M$ F! C t
- W: {( q/ E1 H: ] |
|