01: package hero.mapper;
02:
03: /*
04: * 02/01/2002 - 15:24:07
05: *
06: * LdapMapper.java -
07: * Copyright (C) 2002 Ecoo Team
08: * charoy@loria.fr
09: *
10: *
11: * This program is free software; you can redistribute it and/or
12: * modify it under the terms of the GNU Lesser General Public License
13: * as published by the Free Software Foundation; either version 2
14: * of the License, or (at your option) any later version.
15: *
16: * This program is distributed in the hope that it will be useful,
17: * but WITHOUT ANY WARRANTY; without even the implied warranty of
18: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19: * GNU Lesser General Public License for more details.
20: *
21: * You should have received a copy of the GNU Lesser General Public License
22: * along with this program; if not, write to the Free Software
23: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24: */
25:
26: import hero.interfaces.BnRoleLocal;
27: import hero.util.HeroException;
28:
29: import org.apache.log4j.Category;
30: import java.util.Collection;
31: import java.util.ArrayList;
32:
33: public class PropertiesMapper extends Mapper {
34:
35: // Utility variable
36: private static final Category log = Category
37: .getInstance(LdapMapper.class);
38:
39: public PropertiesMapper(String name, int type) {
40: super (name, type);
41: }
42:
43: public Collection execute(Object bean, int type, BnRoleLocal role,
44: String userName) throws HeroException {
45: // logs trace
46: log.debug("execute: type=" + type + " role=" + role.getName()
47: + " instance creator =" + userName);
48: Collection user = new ArrayList();
49: user.add(userName);
50: return (user);
51: }
52:
53: }
|