001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: BeanInfo.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.container.info;
025:
026: import java.util.Map;
027:
028: import javax.ejb.ApplicationException;
029: import javax.ejb.TransactionManagementType;
030:
031: import org.ow2.easybeans.api.bean.info.IBeanInfo;
032: import org.ow2.easybeans.api.bean.info.ISecurityInfo;
033:
034: import static javax.ejb.TransactionManagementType.CONTAINER;
035:
036: /**
037: * This class contains description for a bean.
038: * It is used at the runtime.
039: * @author Florent Benoit
040: */
041: public class BeanInfo implements IBeanInfo {
042:
043: /**
044: * Bean's name.
045: */
046: private String name;
047:
048: /**
049: * Security info.
050: */
051: private ISecurityInfo securityInfo = null;
052:
053: /**
054: * Management type for the bean.
055: */
056: private TransactionManagementType transactionManagementType = CONTAINER;
057:
058: /**
059: * List of application exceptions used on this ejb-jar.
060: */
061: private Map<String, ApplicationException> applicationExceptions = null;
062:
063: /**
064: * Gets the list of application exceptions defined on this ejb jar metadata.
065: * @return the list of application exceptions defined on this ejb jar metadata.
066: */
067: public Map<String, ApplicationException> getApplicationExceptions() {
068: return applicationExceptions;
069: }
070:
071: /**
072: * Sets the list of application exceptions defined on this ejb jar metadata.
073: * @param applicationExceptions the list of application exceptions defined on this ejb jar metadata.
074: */
075: public void setApplicationExceptions(
076: final Map<String, ApplicationException> applicationExceptions) {
077: this .applicationExceptions = applicationExceptions;
078: }
079:
080: /**
081: * Gets the type of transaction for the given bean.
082: * @return transaction management type.
083: */
084: public TransactionManagementType getTransactionManagementType() {
085: return transactionManagementType;
086: }
087:
088: /**
089: * Sets the type of transaction for the given bean.
090: * @param transactionManagementType transaction management type.
091: */
092: public void setTransactionManagementType(
093: final TransactionManagementType transactionManagementType) {
094: this .transactionManagementType = transactionManagementType;
095: }
096:
097: /**
098: * Sets the security info.
099: * @param securityInfo security info.
100: */
101: public void setSecurityInfo(final ISecurityInfo securityInfo) {
102: this .securityInfo = securityInfo;
103: }
104:
105: /**
106: * Gets the security info.
107: * @return security info.
108: */
109: public ISecurityInfo getSecurityInfo() {
110: return securityInfo;
111: }
112:
113: /**
114: * Gets the name of the bean.
115: * @return the name of the bean.
116: */
117: public String getName() {
118: return name;
119: }
120:
121: /**
122: * Sets the name of the bean.
123: * @param name the bean's name.
124: */
125: public void setName(final String name) {
126: this.name = name;
127: }
128: }
|