Source Code Cross Referenced for AuthModuleDefinition.java in  » Portal » gridsphere » org » gridsphere » services » core » security » auth » modules » impl » descriptor » 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 » Portal » gridsphere » org.gridsphere.services.core.security.auth.modules.impl.descriptor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
003:         * @version $Id: AuthModuleDefinition.java 6385 2007-10-25 14:02:26Z wehrens $
004:         */package org.gridsphere.services.core.security.auth.modules.impl.descriptor;
005:
006:        import org.gridsphere.portlet.service.spi.impl.descriptor.ConfigParam;
007:
008:        import java.util.*;
009:
010:        /**
011:         * The <code>AuthModuleDefinition</code> defines
012:         */
013:        public class AuthModuleDefinition {
014:
015:            protected AuthModulesDescriptor authDescriptor = null;
016:            private String oid = null;
017:            protected String moduleName = "";
018:            private List moduleDescriptions = new Vector();
019:            private List moduleErrors = new Vector();
020:
021:            protected int priority = 100;
022:            protected String moduleImplementation = "";
023:            protected boolean moduleActive = false;
024:
025:            protected List configParamList = new Vector();
026:            protected Map attributes = new HashMap();
027:            protected Properties configProps = null;
028:
029:            public String getOid() {
030:                return oid;
031:            }
032:
033:            public void setOid(String oid) {
034:                this .oid = oid;
035:            }
036:
037:            /**
038:             * Sets the auth module descriptor
039:             *
040:             * @param descriptor the auth module descriptor
041:             */
042:            public void setDescriptor(AuthModulesDescriptor descriptor) {
043:                this .authDescriptor = descriptor;
044:            }
045:
046:            /**
047:             * Returns the auth module descriptor
048:             *
049:             * @return descriptor the auth module descriptor
050:             */
051:            public AuthModulesDescriptor getDescriptor() {
052:                return authDescriptor;
053:            }
054:
055:            /**
056:             * Sets the portlet service name
057:             *
058:             * @param moduleName the portlet service name
059:             */
060:            public void setModuleName(String moduleName) {
061:                this .moduleName = moduleName;
062:            }
063:
064:            /**
065:             * Returns the portlet service name
066:             *
067:             * @return the portlet service name
068:             */
069:            public String getModuleName() {
070:                return this .moduleName;
071:            }
072:
073:            /**
074:             * Sets the list of module descriptions
075:             *
076:             * @param moduleDescriptions the list of module descriptions
077:             */
078:            public void setModuleDescriptions(List moduleDescriptions) {
079:                this .moduleDescriptions = moduleDescriptions;
080:            }
081:
082:            /**
083:             * Returns the module descriptions
084:             *
085:             * @return the module descriptions
086:             */
087:            public List getModuleDescriptions() {
088:                return this .moduleDescriptions;
089:            }
090:
091:            /**
092:             * Sets the list of module errors
093:             *
094:             * @param moduleErrors the list of module errors
095:             */
096:            public void setModuleErrors(List moduleErrors) {
097:                this .moduleErrors = moduleErrors;
098:            }
099:
100:            /**
101:             * Returns the module errors
102:             *
103:             * @return the module errors
104:             */
105:            public List getModuleErrors() {
106:                return this .moduleErrors;
107:            }
108:
109:            /**
110:             * Returns the portlet service implementation
111:             *
112:             * @return the portlet service implementation
113:             */
114:            public String getModuleImplementation() {
115:                return this .moduleImplementation;
116:            }
117:
118:            /**
119:             * Sets the portlet service implementation
120:             *
121:             * @param moduleImplementation the portlet service implementation
122:             */
123:            public void setModuleImplementation(String moduleImplementation) {
124:                this .moduleImplementation = moduleImplementation;
125:            }
126:
127:            /**
128:             * Returns the module priority
129:             *
130:             * @return the module priority
131:             */
132:            public int getModulePriority() {
133:                return priority;
134:            }
135:
136:            /**
137:             * Sets the module priority
138:             *
139:             * @param priority
140:             */
141:            public void setModulePriority(int priority) {
142:                this .priority = priority;
143:            }
144:
145:            /**
146:             * Returns true of this module is turned on for all users
147:             *
148:             * @return true of this module is turned on for all users
149:             */
150:            public boolean getModuleActive() {
151:                return moduleActive;
152:            }
153:
154:            /**
155:             * If true, this module will be active for all users
156:             *
157:             * @param moduleActive if true, this module will be active for all users
158:             */
159:            public void setModuleActive(boolean moduleActive) {
160:                this .moduleActive = moduleActive;
161:            }
162:
163:            /**
164:             * Sets the service configuration parameter list
165:             *
166:             * @param configParamList the configuration parameter list
167:             */
168:            public void setConfigParamList(List configParamList) {
169:                this .configParamList = configParamList;
170:            }
171:
172:            /**
173:             * Returns the service configuration parameter list
174:             *
175:             * @return the configuration parameter list
176:             */
177:            public List getConfigParamList() {
178:                return this .configParamList;
179:            }
180:
181:            public String getAttribute(String name) {
182:                return (String) attributes.get(name);
183:            }
184:
185:            public Map getAttributes() {
186:                return attributes;
187:            }
188:
189:            public void setAttributes(Map attributes) {
190:                this .attributes = attributes;
191:            }
192:
193:            /**
194:             * Creates a properties from the  ConfigParamList
195:             *
196:             * @see #getConfigParamList
197:             */
198:            private void createProperties() {
199:                configProps = new Properties();
200:                Iterator it = this .configParamList.iterator();
201:                ConfigParam param;
202:                while (it.hasNext()) {
203:                    param = (ConfigParam) it.next();
204:                    configProps.setProperty(param.getParamName(), param
205:                            .getParamValue());
206:                }
207:            }
208:
209:            /**
210:             * Return the configuration properties
211:             *
212:             * @return the configuration properties
213:             */
214:            public Properties getConfigProperties() {
215:                if (configProps == null)
216:                    createProperties();
217:                return configProps;
218:            }
219:
220:            /**
221:             * Sets the configuration properties
222:             *
223:             * @param props the configuration properties
224:             */
225:            public void setConfigProperties(Properties props) {
226:                Enumeration e = props.keys();
227:                if (!props.isEmpty()) {
228:                    configParamList = new Vector();
229:                }
230:                while (e.hasMoreElements()) {
231:                    String key = (String) e.nextElement();
232:                    ConfigParam param = new ConfigParam(key, props
233:                            .getProperty(key));
234:                    configParamList.add(param);
235:                }
236:            }
237:
238:            /**
239:             * Returns a <code>String</code> representation if this auth module
240:             * definition
241:             *
242:             * @return the auth module definition as a <code>String</code>
243:             */
244:            public String toString() {
245:                StringBuffer sb = new StringBuffer("\n");
246:                sb.append("auth module name: " + this .moduleName + "\n");
247:                sb.append("auth module description: "
248:                        + this .moduleDescriptions.get(0) + "\n");
249:                //sb.append("auth module error: " + this.moduleErrors.get(0) + "\n");
250:                sb.append("auth module implementation: "
251:                        + this .moduleImplementation + "\n");
252:                sb.append("auth module priority: " + this .priority + "\n");
253:                sb.append("config properties: ");
254:                Iterator it = this .configParamList.iterator();
255:                ConfigParam c;
256:                while (it.hasNext()) {
257:                    c = (ConfigParam) it.next();
258:                    sb.append("\tname: " + c.getParamName() + "\tvalue: "
259:                            + c.getParamValue());
260:                }
261:                return sb.toString();
262:            }
263:
264:        }
w__ww__.j_a_v__a__2s___.__c___o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.