Source Code Cross Referenced for CreatorConfig.java in  » Ajax » dwr » org » directwebremoting » spring » 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 » Ajax » dwr » org.directwebremoting.spring 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005 Joe Walker
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.directwebremoting.spring;
017:
018:        import java.util.List;
019:        import java.util.Properties;
020:        import java.util.ArrayList;
021:
022:        import org.directwebremoting.AjaxFilter;
023:        import org.directwebremoting.extend.Creator;
024:
025:        /**
026:         * The configuration for a creator. <br>
027:         * You can either specify the creator directly or specify one of the build in creator types,
028:         * for instance "new".
029:         *
030:         * It allows the specification of the following optional configuration parameters:
031:         * <ul>
032:         *  <li>includes - the list of method names to include</li>
033:         *  <li>excludes - the list of method names to exclude</li>
034:         *  <li>auth - the <code>Properties</code> object containing method names and corresponding
035:         *      required role</li>
036:         *  <li>filters - the list of filter objects</li>
037:         * </ul>
038:         *
039:         * @see org.directwebremoting.extend.AccessControl#addIncludeRule(String, String)
040:         * @see org.directwebremoting.extend.AccessControl#addExcludeRule(String, String)
041:         * @see org.directwebremoting.extend.AccessControl#addRoleRestriction(String, String, String)
042:         * @see org.directwebremoting.AjaxFilter
043:         * @see org.directwebremoting.extend.AjaxFilterManager#addAjaxFilter(org.directwebremoting.AjaxFilter, String)
044:         *
045:         * @author Bram Smeets
046:         * @author Joe Walker [joe at getahead dot ltd dot uk]
047:         */
048:        public class CreatorConfig extends AbstractConfig {
049:            /**
050:             * The creator type that will be used to create new objects for remoting
051:             * @return Returns the creator type.
052:             */
053:            public String getCreatorType() {
054:                return creatorType;
055:            }
056:
057:            /**
058:             * The creator that will be used to create new objects for remoting
059:             * @param creatorType The creator type to set.
060:             */
061:            public void setCreatorType(String creatorType) {
062:                this .creatorType = creatorType;
063:            }
064:
065:            /**
066:             * The creator that will be used to create new objects for remoting
067:             * @return Returns the creator.
068:             */
069:            public Creator getCreator() {
070:                return creator;
071:            }
072:
073:            /**
074:             * The creator type that will be used to create new objects for remoting
075:             * @param creator The creator to set.
076:             */
077:            public void setCreator(Creator creator) {
078:                this .creator = creator;
079:            }
080:
081:            /**
082:             * Sets the authentication parameters for this creator.
083:             * @return the map containing the method name and the corrosponding required role
084:             * @see org.directwebremoting.extend.AccessControl#addRoleRestriction(String, String, String)
085:             */
086:            public Properties getAuth() {
087:                return auth;
088:            }
089:
090:            /**
091:             * Sets the authentication parameters for this creator.
092:             * @param auth the map containing the method name and the corrosponding required role
093:             * @see org.directwebremoting.extend.AccessControl#addRoleRestriction(String, String, String)
094:             */
095:            public void setAuth(Properties auth) {
096:                this .auth = auth;
097:            }
098:
099:            /**
100:             * Gets the list of all filters for this creator.
101:             * @return the list containing all filters
102:             * @see org.directwebremoting.AjaxFilter
103:             * @see org.directwebremoting.extend.AjaxFilterManager#addAjaxFilter(org.directwebremoting.AjaxFilter, String)
104:             */
105:            public List<?> getFilters() {
106:                return filters;
107:            }
108:
109:            /**
110:             * Sets the list of all filters for this creator.
111:             * @param filters the list containing all filters
112:             * @see org.directwebremoting.AjaxFilter
113:             * @see org.directwebremoting.extend.AjaxFilterManager#addAjaxFilter(org.directwebremoting.AjaxFilter, String)
114:             */
115:            public void setFilters(List<Object> filters) {
116:                this .filters = filters;
117:            }
118:
119:            /**
120:             * Convenience method for adding an authentication rule.
121:             * @param method the method to add the authentication rule
122:             * @param role the role to add the authentication constraint for
123:             * @throws IllegalArgumentException in case the specified argument is null
124:             */
125:            public void addAuth(String method, String role) {
126:                auth.setProperty(method, role);
127:            }
128:
129:            /**
130:             * Convenience method for adding a filter.
131:             * @param filter the filter to add for this creator
132:             * @throws IllegalArgumentException in case the specified argument is null
133:             */
134:            public void addFilter(AjaxFilter filter) {
135:                filters.add(filter);
136:            }
137:
138:            /**
139:             * The creator type to use
140:             */
141:            private String creatorType;
142:
143:            /**
144:             * The creator to use
145:             */
146:            private Creator creator;
147:
148:            /**
149:             * The properties containing the method name and the corresponding required role.
150:             */
151:            private Properties auth = new Properties();
152:
153:            /**
154:             * The list of filter objects for this creator.
155:             */
156:            private List<Object> filters = new ArrayList<Object>();
157:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.