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: AssemblyDescriptor.java 2059 2007-11-22 17:22:33Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.deployment.xml.struct;
025:
026: import java.util.ArrayList;
027: import java.util.List;
028:
029: import org.ow2.easybeans.deployment.annotations.impl.JApplicationException;
030: import org.ow2.easybeans.deployment.xml.struct.common.MethodDD;
031:
032: /**
033: * This class defines the implementation of the element assembly-descriptor.
034: * @author Florent Benoit
035: */
036: public class AssemblyDescriptor {
037:
038: /**
039: * Name of this element.
040: */
041: public static final String NAME = "assembly-descriptor";
042:
043: /**
044: * List of <application-exception> elements.
045: */
046: private List<JApplicationException> applicationExceptionList = null;
047:
048: /**
049: * List of <interceptor-binding> elements.
050: */
051: private List<InterceptorBinding> interceptorBindingList = null;
052:
053: /**
054: * List of <container-transaction> elements.
055: */
056: private List<ContainerTransaction> containerTransactionList = null;
057:
058: /**
059: * List of <method-permission> elements.
060: */
061: private List<MethodPermission> methodPermissionList = null;
062:
063: /**
064: * List of <exclude-list> elements.
065: */
066: private List<MethodDD> excludeListMethods = null;
067:
068: /**
069: * List of <security-role> elements.
070: */
071: private List<String> securityRoleList = null;
072:
073: /**
074: * Constructor.
075: */
076: public AssemblyDescriptor() {
077: this .applicationExceptionList = new ArrayList<JApplicationException>();
078: this .interceptorBindingList = new ArrayList<InterceptorBinding>();
079: this .containerTransactionList = new ArrayList<ContainerTransaction>();
080: this .securityRoleList = new ArrayList<String>();
081: this .excludeListMethods = new ArrayList<MethodDD>();
082: this .methodPermissionList = new ArrayList<MethodPermission>();
083: }
084:
085: /**
086: * Gets the list of <application-exception> elements.
087: * @return list of <application-exception> elements.
088: */
089: public List<JApplicationException> getApplicationExceptionList() {
090: return applicationExceptionList;
091: }
092:
093: /**
094: * Adds a new <application-exception> element to assembly descriptor.
095: * @param applicationException the <application-exception> element
096: */
097: public void addApplicationException(
098: final JApplicationException applicationException) {
099: applicationExceptionList.add(applicationException);
100: }
101:
102: /**
103: * Gets the list of <container-transaction> elements.
104: * @return list of <container-transaction> elements.
105: */
106: public List<ContainerTransaction> getContainerTransactionList() {
107: return containerTransactionList;
108: }
109:
110: /**
111: * Adds a new <container-transaction> element to assembly descriptor.
112: * @param containerTransaction the <application-exception> element
113: */
114: public void addContainerTransaction(
115: final ContainerTransaction containerTransaction) {
116: containerTransactionList.add(containerTransaction);
117: }
118:
119: /**
120: * Gets the list of <interceptor-binding> elements.
121: * @return list of <interceptor-binding> elements.
122: */
123: public List<InterceptorBinding> getInterceptorBindingList() {
124: return interceptorBindingList;
125: }
126:
127: /**
128: * Adds a new <interceptor-binding> element to assembly descriptor.
129: * @param interceptorBinding the <interceptor-binding> element
130: */
131: public void addInterceptorBinding(
132: final InterceptorBinding interceptorBinding) {
133: interceptorBindingList.add(interceptorBinding);
134: }
135:
136: /**
137: * Gets the list of <method-permission> elements.
138: * @return list of <method-permission> elements.
139: */
140: public List<MethodPermission> getMethodPermissionList() {
141: return methodPermissionList;
142: }
143:
144: /**
145: * Adds a new <method-permission> element to assembly descriptor.
146: * @param methodPermission the <method-permission> element
147: */
148: public void addMethodPermission(
149: final MethodPermission methodPermission) {
150: methodPermissionList.add(methodPermission);
151: }
152:
153: /**
154: * Gets the list of <exclude-list> elements.
155: * @return list of <exclude-list> elements.
156: */
157: public List<MethodDD> getExcludeListMethods() {
158: return excludeListMethods;
159: }
160:
161: /**
162: * Adds a new <exclude-list> element to assembly descriptor.
163: * @param excludeListMethod the <exclude-list> element
164: */
165: public void addExcludeList(final MethodDD excludeListMethod) {
166: excludeListMethods.add(excludeListMethod);
167: }
168:
169: /**
170: * Gets the list of <security-role> elements.
171: * @return list of <security-role> elements.
172: */
173: public List<String> getSecurityRoleList() {
174: return securityRoleList;
175: }
176:
177: /**
178: * Adds a new <security-role> element to assembly descriptor.
179: * @param securityRole the <security-role> element
180: */
181: public void addSecurityRole(final String securityRole) {
182: securityRoleList.add(securityRole);
183: }
184: }
|