|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
User user = (User) session.getAttribute("activeUser");
- a. L6 N5 C" ^9 F Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");2 P+ I/ C4 ~: `/ Q" x+ q" I& t% ]! t
4 f0 S( W! k) u5 i( Q) M1 z* }
DataManagementService dmService = DataManagementService.getService(connection);
: l# f( j7 B( V6 E {
1 ?1 g' p3 x' {8 m1 V ModelObject[] models = new ModelObject[] { user };
7 E- B/ U5 j- ?9 c2 I; M7 R P4 ]( h try {
$ d8 Z" P1 |" D$ z) ? String[] str = new String[] { "taskinbox" };( ^" [2 ? R$ j2 h1 M+ B7 } b
dmService.getProperties(models, str);- O1 O$ A3 F# T, k
TaskInbox inbox = (TaskInbox) user.get_taskinbox();
/ K4 l* _' p8 s7 ?0 a+ }. R8 f8 T' N1 M$ X* @
models = new ModelObject[] { inbox };! h* P% D( g6 U! r: b
str = new String[] { "tasks_to_perform" };
u2 @1 u8 j2 L9 ^8 C. M- G dmService.getProperties(models, str);4 D4 j# w' z" h& }: L# U
models = inbox.get_tasks_to_perform();- A7 w" ?! p2 z1 i# K0 R
str = new String[] { "object_type", "object_name" };9 ~0 x( u0 a! x) }, d4 T% P6 A
dmService.getProperties(models, str);
3 Q3 r; m8 L" [+ j V System.out.println("---------------:" + models.length);
: g2 E; w5 j/ F for (int i = 0; i < models.length; i++) {
8 W: ]+ R3 ^, Y+ ?9 b System.out.println("------------------------------");
5 E$ f! n( Z0 Y) T1 Y( Y& e" X System.out.println(models[i].getUid());; }( X7 Y( C6 b9 L. \7 l
System.out.println(models[i].getPropertyDisplayableValue("object_type"));- E; t! O/ Z$ x( f' R
System.out.println(models[i].getPropertyDisplayableValue("object_name"));' ?2 @9 ?7 ?8 W- n3 U% `! ] k
}
' x* ^9 d* ^( j; R& E8 x0 d+ N/ b3 A# } F) ~$ E
} caTCh (Exception e) {: @8 S( f& |) `% x9 ?* o# T
// TODO Auto-generated catch block/ p& q) }$ v3 }* l+ D
e.printStackTrace();
) }- L' @6 x) h$ ^ }
5 |. E5 t* O$ J$ O9 Y0 _2 o
3 x' N; q& V/ \* W1 V) R9 ` |
|