Source Code Cross Referenced for InterceptorBinding.java in  » J2EE » ow2-easybeans » org » ow2 » easybeans » deployment » xml » struct » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » ow2 easybeans » org.ow2.easybeans.deployment.xml.struct 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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: InterceptorBinding.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.xml.struct.common.MethodDD;
030:
031:        /**
032:         * This class represents the <interceptor-binding> element.
033:         * @author Florent Benoit
034:         */
035:        public class InterceptorBinding {
036:            /**
037:             * Name of this element.
038:             */
039:            public static final String NAME = "interceptor-binding";
040:
041:            /**
042:             * Name of the EJB. (if * = default interceptor: apply to all beans)
043:             */
044:            private String ejbName = null;
045:
046:            /**
047:             * List of interceptor-class.
048:             */
049:            private List<String> interceptorClassList = null;
050:
051:            /**
052:             * Interceptor-order element.<br>
053:             * (which contains a list of interceptor-classList)
054:             */
055:            private List<String> orderInterceptorClassList = null;
056:
057:            /**
058:             * Exclude the default interceptors for this bean ?
059:             */
060:            private boolean excludeDefaultInterceptors = false;
061:
062:            /**
063:             * Exclude class interceptors for a method on a bean.
064:             */
065:            private boolean excludeClassInterceptors = false;
066:
067:            /**
068:             * setExcludeClassInterceptors() called.
069:             */
070:            private boolean excludeClassInterceptorsCalled = false;
071:
072:            /**
073:             * setExcludeClassInterceptors() called.
074:             */
075:            private boolean excludeDefaultInterceptorsCalled = false;
076:
077:            /**
078:             * Method on which apply the interceptors.
079:             */
080:            private MethodDD method = null;
081:
082:            /**
083:             * Default constructor.<br>
084:             * orderInterceptorClassList is null by default.
085:             */
086:            public InterceptorBinding() {
087:                this .interceptorClassList = new ArrayList<String>();
088:            }
089:
090:            /**
091:             * @return the name of the EJB.
092:             */
093:            public String getEjbName() {
094:                return ejbName;
095:            }
096:
097:            /**
098:             * Sets the name of this ejb (or wildcard).
099:             * @param ejbName the name of the ejb.
100:             */
101:            public void setEjbName(final String ejbName) {
102:                this .ejbName = ejbName;
103:            }
104:
105:            /**
106:             * @return the method element
107:             */
108:            public MethodDD getMethod() {
109:                return method;
110:            }
111:
112:            /**
113:             * Method on which define the interceptors.
114:             * @param method the given method.
115:             */
116:            public void setMethod(final MethodDD method) {
117:                this .method = method;
118:            }
119:
120:            /**
121:             * @return true if the class interceptors are excluded for the given method
122:             */
123:            public boolean isExcludeClassInterceptors() {
124:                return excludeClassInterceptors;
125:            }
126:
127:            /**
128:             * Exclude or not class interceptors ?
129:             * @param excludeClassInterceptors true/false
130:             */
131:            public void setExcludeClassInterceptors(
132:                    final boolean excludeClassInterceptors) {
133:                this .excludeClassInterceptors = excludeClassInterceptors;
134:                this .excludeClassInterceptorsCalled = true;
135:            }
136:
137:            /**
138:             * @return true if method setExcludeClassInterceptors has been called (with false or true)
139:             */
140:            public boolean isExcludeClassInterceptorsCalled() {
141:                return excludeClassInterceptorsCalled;
142:            }
143:
144:            /**
145:             * @return true if the default interceptors are excluded for the given bean
146:             */
147:            public boolean isExcludeDefaultInterceptors() {
148:                return excludeDefaultInterceptors;
149:            }
150:
151:            /**
152:             * Exclude or not default interceptors ?
153:             * @param excludeDefaultInterceptors true/false
154:             */
155:            public void setExcludeDefaultInterceptors(
156:                    final boolean excludeDefaultInterceptors) {
157:                this .excludeDefaultInterceptors = excludeDefaultInterceptors;
158:                this .excludeDefaultInterceptorsCalled = true;
159:            }
160:
161:            /**
162:             * @return true if method setExcludeDefaultInterceptors has been called (with false or true)
163:             */
164:            public boolean isExcludeDefaultInterceptorsCalled() {
165:                return excludeDefaultInterceptorsCalled;
166:            }
167:
168:            /**
169:             * @return list of the interceptor classes.
170:             */
171:            public List<String> getInterceptorClassList() {
172:                return interceptorClassList;
173:            }
174:
175:            /**
176:             * @return list of ordered interceptor classes.
177:             */
178:            public List<String> getOrderInterceptorClassList() {
179:                return orderInterceptorClassList;
180:            }
181:
182:            /**
183:             * Add the given interceptor to the list.
184:             * @param interceptorClassName the name of the interceptor's class
185:             */
186:            public void addInterceptorClass(final String interceptorClassName) {
187:                interceptorClassList.add(interceptorClassName);
188:            }
189:
190:            /**
191:             * Add the given interceptor to the ordered list.
192:             * @param interceptorClassName the name of the interceptor's class
193:             */
194:            public synchronized void addOrderedInterceptorClass(
195:                    final String interceptorClassName) {
196:                if (orderInterceptorClassList == null) {
197:                    orderInterceptorClassList = new ArrayList<String>();
198:                }
199:                orderInterceptorClassList.add(interceptorClassName);
200:            }
201:
202:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.