Source Code Cross Referenced for GroupMemoryRealmForm.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » webapp » jonasadmin » security » 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 » JOnAS 4.8.6 » org.objectweb.jonas.webapp.jonasadmin.security 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JOnAS: Java(TM) Open Application Server
003:         * Copyright (C) 1999 Bull S.A.
004:         * Contact: jonas-team@objectweb.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:         * Initial developer(s): Michel-Ange ANTON
022:         * --------------------------------------------------------------------------
023:         * $Id: GroupMemoryRealmForm.java 6599 2005-04-21 08:59:54Z kemlerp $
024:         * --------------------------------------------------------------------------
025:         */
026:
027:        package org.objectweb.jonas.webapp.jonasadmin.security;
028:
029:        import java.util.ArrayList;
030:
031:        import javax.servlet.http.HttpServletRequest;
032:
033:        import org.apache.struts.action.ActionMessage;
034:        import org.apache.struts.action.ActionErrors;
035:        import org.apache.struts.action.ActionForm;
036:        import org.apache.struts.action.ActionMapping;
037:        import org.objectweb.jonas.webapp.jonasadmin.Jlists;
038:
039:        public class GroupMemoryRealmForm extends ActionForm {
040:
041:            // --------------------------------------------------------- Constants
042:
043:            // --------------------------------------------------------- Properties variables
044:
045:            private String action = null;
046:            private String group = null;
047:            private String description = null;
048:            private java.util.ArrayList listRolesGroup = new ArrayList();
049:            private java.util.ArrayList listRolesRealm = new ArrayList();
050:            private java.util.ArrayList listRolesUsed = new ArrayList();
051:            private java.util.ArrayList listRolesNotused = new ArrayList();
052:            private String rolesUsed = null;
053:            private String rolesNotused = null;
054:            private String[] rolesNotusedSelected = new String[0];
055:            private String[] rolesUsedSelected = new String[0];
056:
057:            // --------------------------------------------------------- Public Methods
058:
059:            /**
060:             * Reset all properties to their default values.
061:             *
062:             * @param mapping The mapping used to select this instance
063:             * @param request The servlet request we are processing
064:             */
065:            public void reset(ActionMapping mapping, HttpServletRequest request) {
066:                rolesUsed = null;
067:                rolesNotused = null;
068:                // Mandatory !
069:                rolesNotusedSelected = new String[0];
070:                rolesUsedSelected = new String[0];
071:            }
072:
073:            /**
074:             * Validate the properties that have been set from this HTTP request,
075:             * and return an <code>ActionErrors</code> object that encapsulates any
076:             * validation errors that have been found.  If no errors are found, return
077:             * <code>null</code> or an <code>ActionErrors</code> object with no
078:             * recorded error messages.
079:             *
080:             * @param mapping The mapping used to select this instance
081:             * @param request The servlet request we are processing
082:             */
083:            public ActionErrors validate(ActionMapping mapping,
084:                    HttpServletRequest request) {
085:                ActionErrors oErrors = new ActionErrors();
086:                // Create errors
087:                if (action.equals("create") == true) {
088:                    group = group.trim();
089:                    if (group.length() == 0) {
090:                        oErrors
091:                                .add(
092:                                        "group",
093:                                        new ActionMessage(
094:                                                "error.security.factory.memory.realm.group.name.required"));
095:                    }
096:                }
097:                // Replace the elements in their good place
098:                if (oErrors.size() > 0) {
099:                    listRolesUsed = Jlists.getArrayList(rolesUsed,
100:                            Jlists.SEPARATOR);
101:                    listRolesNotused = Jlists.getArrayList(rolesNotused,
102:                            Jlists.SEPARATOR);
103:                }
104:                return oErrors;
105:            }
106:
107:            // --------------------------------------------------------- Properties Methods
108:
109:            public String getGroup() {
110:                return group;
111:            }
112:
113:            public void setGroup(String group) {
114:                this .group = group;
115:            }
116:
117:            public String getDescription() {
118:                return description;
119:            }
120:
121:            public void setDescription(String description) {
122:                this .description = description;
123:            }
124:
125:            public java.util.ArrayList getListRolesGroup() {
126:                return listRolesGroup;
127:            }
128:
129:            public void setListRolesGroup(java.util.ArrayList listRolesGroup) {
130:                this .listRolesGroup = listRolesGroup;
131:            }
132:
133:            public java.util.ArrayList getListRolesRealm() {
134:                return listRolesRealm;
135:            }
136:
137:            public void setListRolesRealm(java.util.ArrayList listRolesRealm) {
138:                this .listRolesRealm = listRolesRealm;
139:            }
140:
141:            public java.util.ArrayList getListRolesUsed() {
142:                return listRolesUsed;
143:            }
144:
145:            public void setListRolesUsed(java.util.ArrayList listRolesUsed) {
146:                this .listRolesUsed = listRolesUsed;
147:            }
148:
149:            public java.util.ArrayList getListRolesNotused() {
150:                return listRolesNotused;
151:            }
152:
153:            public void setListRolesNotused(java.util.ArrayList listRolesNotused) {
154:                this .listRolesNotused = listRolesNotused;
155:            }
156:
157:            public String getRolesUsed() {
158:                return rolesUsed;
159:            }
160:
161:            public void setRolesUsed(String rolesUsed) {
162:                this .rolesUsed = rolesUsed;
163:            }
164:
165:            public String getRolesNotused() {
166:                return rolesNotused;
167:            }
168:
169:            public void setRolesNotused(String rolesNotused) {
170:                this .rolesNotused = rolesNotused;
171:            }
172:
173:            public String[] getRolesNotusedSelected() {
174:                return rolesNotusedSelected;
175:            }
176:
177:            public void setRolesNotusedSelected(String[] rolesNotusedSelected) {
178:                this .rolesNotusedSelected = rolesNotusedSelected;
179:            }
180:
181:            public String[] getRolesUsedSelected() {
182:                return rolesUsedSelected;
183:            }
184:
185:            public void setRolesUsedSelected(String[] rolesUsedSelected) {
186:                this .rolesUsedSelected = rolesUsedSelected;
187:            }
188:
189:            public String getAction() {
190:                return action;
191:            }
192:
193:            public void setAction(String action) {
194:                this.action = action;
195:            }
196:
197:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.