1 /*
2 * EL4J, the Extension Library for the J2EE, adds incremental enhancements to
3 * the spring framework, http://el4j.sf.net
4 * Copyright (C) 2005 by ELCA Informatique SA, Av. de la Harpe 22-24,
5 * 1000 Lausanne, Switzerland, http://www.elca.ch
6 *
7 * EL4J is published under the GNU Lesser General Public License (LGPL)
8 * Version 2.1. See http://www.gnu.org/licenses/
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * For alternative licensing, please contact info@elca.ch
16 */
17
18 package ch.elca.el4j.util.metadata;
19
20 import java.lang.reflect.Method;
21 import java.util.Collection;
22 import java.util.List;
23
24 /**
25 * Interface for the metadata source.
26 *
27 * @svnLink $Revision: 4091 $;$Date: 2010-01-15 12:21:07 +0100 (Fr, 15. Jan 2010) $;$Author: jonasha $;$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/branches/el4j_3_1/el4j/framework/modules/core/src/main/java/ch/elca/el4j/util/metadata/GenericMetaDataSource.java $
28 *
29 * @author Raphael Boog (RBO)
30 * @author Martin Zeltner (MZE)
31 */
32 public interface GenericMetaDataSource {
33
34 /**
35 * Setter method to set the metadata implementation.
36 *
37 * @param attributes
38 * The attributes to set
39 */
40 public void setMetaDataDelegator(Attributes attributes);
41
42 /**
43 * Getter method to get the metadata implementation.
44 *
45 * @return Attributes
46 */
47 public Attributes getMetaDataDelegator();
48
49 /**
50 * Setter method for the list of metadata types where to apply the
51 * interceptor.
52 *
53 * @param interceptingAttributes
54 * Is the metadata type list.
55 */
56 public void setInterceptingMetaData(List<Class> interceptingAttributes);
57
58 /**
59 * @return Returns the metadata type list.
60 */
61 public List<Class> getInterceptingMetaData();
62
63 /**
64 * @param method
65 * Is the method for the current invocation. Must not be null.
66 * @param targetClass
67 * target class for this invocation. May be null.
68 * @return Returns a collection of the matching meta data for the given
69 * method and targetClass.
70 */
71 public Collection getMetaData(Method method, Class targetClass);
72
73 }