|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
: o+ H9 o% G4 V2 [, L* h Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");$ g9 Z1 v, u( g$ r% l" [8 g! S t
6 ]- h, |) A+ n9 Q, l7 k
DataManagementService dmService = DataManagementService.getService(connection);
: n! A( I& {1 S9 g' d/ H2 ?7 A) _( _. E; J. `+ v
ModelObject[] models = new ModelObject[] { user };
- ?3 F6 N; [0 ~+ u& S3 ~ try {' w" S& I" L; B9 ]: {
String[] str = new String[] { "taskinbox" };
( o- J5 f& }* b/ i dmService.getProperties(models, str);7 H9 j% R1 I6 t& X
TaskInbox inbox = (TaskInbox) user.get_taskinbox();
1 F" e1 c& M. O; H6 _2 e' q, W" t" L; T8 f* t# z X* M
models = new ModelObject[] { inbox };) ^0 w8 s. k; F% l
str = new String[] { "tasks_to_perform" };( ~& Y: \# m# J1 n( {
dmService.getProperties(models, str);
+ Q' ]- r) Z6 V- J5 l models = inbox.get_tasks_to_perform();8 O: s% z; Q# Z5 l2 m2 o
str = new String[] { "object_type", "object_name" };5 d6 P* ~& P9 ^: p& [' ^
dmService.getProperties(models, str);
4 ?; g; ^: d6 O" `# H8 a: a System.out.println("---------------:" + models.length);/ ?' R7 `$ [; x6 B! ~3 j
for (int i = 0; i < models.length; i++) {; J6 U% D9 h V7 x4 ~- i
System.out.println("------------------------------");$ K3 n2 d8 @* i4 L
System.out.println(models[i].getUid());
+ [ N- I# b* l' ^; e System.out.println(models[i].getPropertyDisplayableValue("object_type"));
( R, L% J" G! _ d# r3 Q System.out.println(models[i].getPropertyDisplayableValue("object_name"));
0 i0 `$ D* I8 X+ q2 _1 _% J( [. T } k7 q$ h6 A$ F: ?# p! Y
6 p6 _+ ?$ D" M, e
} caTCh (Exception e) {& ? K9 k8 U/ d/ `. D) h- L1 a( s
// TODO Auto-generated catch block
; [9 F# n9 y# `3 v* ]9 \ e.printStackTrace();
( E4 j" }6 i/ u" l0 {# G' [8 g }, P! k, k! V% d5 S& K
$ w9 Q- |, ~1 H `$ b: c |
|