KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > module > workflow > inbox > InboxListModel


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.module.workflow.inbox;
14
15 import info.magnolia.cms.gui.controlx.list.AbstractListModel;
16 import info.magnolia.module.workflow.WorkflowUtil;
17
18 import java.util.Collection JavaDoc;
19
20
21 /**
22  * @author Philipp Bracher
23  * @version $Revision: 6887 $ ($Author: nicolas $)
24  */

25 public class InboxListModel extends AbstractListModel {
26
27     private String JavaDoc userName;
28
29     /**
30      * @param userName
31      */

32     public InboxListModel(String JavaDoc userName) {
33         super();
34         this.userName = userName;
35         this.setValueProvider(new InboxValueProvider());
36     }
37
38     /**
39      * @see info.magnolia.cms.gui.controlx.list.AbstractListModel#getResult()
40      */

41     protected Collection JavaDoc getResult() throws Exception JavaDoc {
42         return WorkflowUtil.getUserInbox(this.userName);
43     }
44
45     /**
46      * @return Returns the userName.
47      */

48     public String JavaDoc getUserName() {
49         return this.userName;
50     }
51
52     /**
53      * @param userName The userName to set.
54      */

55     public void setUserName(String JavaDoc userName) {
56         this.userName = userName;
57     }
58
59 }
60
Popular Tags