KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hero > mapper > Sample1CustomAgentGroupMembers


1 /**
2  *
3  * Bonita
4  * Copyright (C) 1999 Bull S.A.
5  * Bull 68 route de versailles 78434 Louveciennes Cedex France
6  * Further information: bonita@objectweb.org
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21  * USA
22  *
23  *
24 --------------------------------------------------------------------------
25  * $Id: Sample1CustomAgentGroupMembers.java,v 1.2 2004/11/10 17:10:50 mvaldes Exp $
26  *
27 --------------------------------------------------------------------------
28  */

29
30 package hero.mapper;
31
32 import hero.util.HeroException;
33 import hero.interfaces.BnRoleLocal;
34
35 import java.util.*;
36
37
38 public class Sample1CustomAgentGroupMembers implements hero.mapper.RoleMapperI {
39
40     public Collection searchMembers(Object JavaDoc b,BnRoleLocal n, String JavaDoc userName) throws HeroException {
41         Collection users = new ArrayList();
42         String JavaDoc roleName=n.getName();
43         String JavaDoc projectName=n.getBnProject().getName();
44         
45         // logs trace
46
System.out.println("[CustomAgentGroupMembers] BnRole name:"+roleName + " - Project name = " + projectName);
47         
48         users.add("john");
49         return users;
50     }
51
52 }
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Popular Tags