|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");3 m$ k, n! N) V9 e, I
Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");7 e9 y" c n6 J6 T! l% S$ Y
; t" w5 f5 j1 H9 ^2 ^
DataManagementService dmService = DataManagementService.getService(connection);
5 m) u5 C$ M4 T9 {5 L& [9 O: d+ N$ g+ F R8 b' p3 R- l( x
ModelObject[] models = new ModelObject[] { user };
8 D( D3 I* m8 y try {
9 m8 W4 ?8 j6 W' t j String[] str = new String[] { "taskinbox" };
4 S' H& L1 A1 z1 B- I9 d dmService.getProperties(models, str);% V0 T7 u6 K5 t0 z8 \2 v
TaskInbox inbox = (TaskInbox) user.get_taskinbox();
4 ]; H) [/ M# E5 O9 G, O
! v8 W5 r) U# K* v% ] models = new ModelObject[] { inbox };
/ j) g. t9 @. n str = new String[] { "tasks_to_perform" };
9 L- |* B3 f2 e; W# l dmService.getProperties(models, str);
' ?8 e; @$ D% G1 v, G models = inbox.get_tasks_to_perform();6 `$ m# D+ ~( Z; _2 k
str = new String[] { "object_type", "object_name" };
3 f O- k' i5 n4 w, d7 Q dmService.getProperties(models, str);% B c/ a- {5 n/ w5 L
System.out.println("---------------:" + models.length);
# \, Z5 f% T0 { for (int i = 0; i < models.length; i++) {
! }5 z# L9 J+ o& ] System.out.println("------------------------------");& i1 Q# T$ v, w, A3 i% w" S
System.out.println(models[i].getUid());
* ~* U, m& t7 R* h" N8 Q% \ System.out.println(models[i].getPropertyDisplayableValue("object_type"));
3 R/ ?" K3 r+ D5 S8 d+ T System.out.println(models[i].getPropertyDisplayableValue("object_name"));
- C( X! g2 B! _ V$ E. O }
9 G" D! l. i+ D) R3 d2 ?: x
' _+ L! S! J* p" \ } caTCh (Exception e) {/ }9 v; H2 A Q, L
// TODO Auto-generated catch block" A. `, l/ P# N: g6 H) O
e.printStackTrace();
2 m) A5 i$ ^1 \3 Z R" a }) c# A7 L. [6 r+ M5 B& d( Q% M* p
5 `' e9 E# I2 g
|
|