01: /**
02: *
03: * Bonita
04: * Copyright (C) 1999 Bull S.A.
05: * Bull 68 route de versailles 78434 Louveciennes Cedex France
06: * Further information: bonita@objectweb.org
07: *
08: * This library is free software; you can redistribute it and/or
09: * 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: CustomGroupMembers.java,v 1.2 2004/11/10 17:10:50 mvaldes Exp $
26: *
27: --------------------------------------------------------------------------
28: */package hero.mapper;
29:
30: import hero.util.HeroException;
31: import hero.interfaces.BnRoleLocal;
32:
33: import java.util.*;
34:
35: public class CustomGroupMembers implements hero.mapper.RoleMapperI {
36:
37: public Collection searchMembers(Object b, BnRoleLocal n,
38: String userName) throws HeroException {
39: Collection users = new ArrayList();
40: String roleName = n.getName();
41: String projectName = n.getBnProject().getName();
42:
43: // logs trace
44: System.out.println("[CustomGroupMembers] BnRole name:"
45: + roleName + " - Project name = " + projectName);
46: System.out
47: .println("[CustomGroupMembers] Not implemented ..... ");
48: try {
49:
50: // Some operations...
51: // ...
52: users.add("userName");
53: return users;
54: } catch (Exception e) {
55: throw new HeroException("Error setting role : " + roleName
56: + " with mapper " + e.getMessage());
57: }
58: }
59:
60: }
|