01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/mailtool/tags/sakai_2-4-1/mailtool/src/java/org/sakaiproject/tool/mailtool/TreeSelector.java $
03: * $Id: TreeSelector.java 27662 2007-03-22 19:44:57Z kimsooil@bu.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006, 2007 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.tool.mailtool;
21:
22: import java.util.List;
23:
24: import javax.faces.model.DataModel;
25:
26: /**
27: * TreeSelector, an implementation of RecipientSelector (commented by kimsooil@bu.edu)
28: * It calls SelectByTree which calls SelectByUserTable)
29: *
30: * @author sgithens
31: *
32: */
33: public class TreeSelector implements RecipientSelector {
34: SelectByTree m_tree = null;
35: List /* EmailGroup */m_initialgroups = null;
36:
37: public void populate(List emailgroups) {
38: m_initialgroups = emailgroups;
39:
40: m_tree = new SelectByTree(emailgroups);
41: }
42:
43: public List getSelectedUsers() {
44: return m_tree.getSelectedUsers();
45: }
46:
47: public List getSelectedUsersByGroup() {
48: // TODO Auto-generated method stub
49: return null;
50: }
51:
52: /** Methods for JSP Fragment **/
53: public DataModel getDataModel() {
54: return m_tree.getRows();
55: }
56:
57: }
|