KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > container > info > BeanInfo


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: BeanInfo.java 1121 2006-09-27 08:51:06Z benoitf $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.container.info;
27
28 import java.util.Map JavaDoc;
29
30 import javax.ejb.ApplicationException JavaDoc;
31 import javax.ejb.TransactionManagementType JavaDoc;
32
33 import org.objectweb.easybeans.api.bean.info.IBeanInfo;
34 import org.objectweb.easybeans.api.bean.info.ISecurityInfo;
35
36 import static javax.ejb.TransactionManagementType.CONTAINER JavaDoc;
37
38 /**
39  * This class contains description for a bean.
40  * It is used at the runtime.
41  * @author Florent Benoit
42  */

43 public class BeanInfo implements IBeanInfo {
44
45     /**
46      * Bean's name.
47      */

48     private String JavaDoc name;
49
50     /**
51      * Security info.
52      */

53     private ISecurityInfo securityInfo = null;
54
55     /**
56      * Management type for the bean.
57      */

58     private TransactionManagementType JavaDoc transactionManagementType = CONTAINER;
59
60     /**
61      * List of application exceptions used on this ejb-jar.
62      */

63     private Map JavaDoc<String JavaDoc, ApplicationException JavaDoc> applicationExceptions = null;
64
65
66     /**
67      * Gets the list of application exceptions defined on this ejb jar metadata.
68      * @return the list of application exceptions defined on this ejb jar metadata.
69      */

70     public Map JavaDoc<String JavaDoc, ApplicationException JavaDoc> getApplicationExceptions() {
71         return applicationExceptions;
72     }
73
74     /**
75      * Sets the list of application exceptions defined on this ejb jar metadata.
76      * @param applicationExceptions the list of application exceptions defined on this ejb jar metadata.
77      */

78     public void setApplicationExceptions(final Map JavaDoc<String JavaDoc, ApplicationException JavaDoc> applicationExceptions) {
79         this.applicationExceptions = applicationExceptions;
80     }
81
82     /**
83      * Gets the type of transaction for the given bean.
84      * @return transaction management type.
85      */

86     public TransactionManagementType JavaDoc getTransactionManagementType() {
87         return transactionManagementType;
88     }
89
90     /**
91      * Sets the type of transaction for the given bean.
92      * @param transactionManagementType transaction management type.
93      */

94     public void setTransactionManagementType(final TransactionManagementType JavaDoc transactionManagementType) {
95         this.transactionManagementType = transactionManagementType;
96     }
97
98     /**
99      * Sets the security info.
100      * @param securityInfo security info.
101      */

102     public void setSecurityInfo(final ISecurityInfo securityInfo) {
103         this.securityInfo = securityInfo;
104     }
105
106
107     /**
108      * Gets the security info.
109      * @return security info.
110      */

111     public ISecurityInfo getSecurityInfo() {
112         return securityInfo;
113     }
114
115     /**
116      * Gets the name of the bean.
117      * @return the name of the bean.
118      */

119     public String JavaDoc getName() {
120         return name;
121     }
122
123     /**
124      * Sets the name of the bean.
125      * @param name the bean's name.
126      */

127     public void setName(final String JavaDoc name) {
128         this.name = name;
129     }
130 }
131
Popular Tags