Source Code Cross Referenced for UserManager.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » 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 » Portal » jetspeed 2.1.3 » org.apache.jetspeed.security 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.jetspeed.security;
018:
019:        import java.sql.Date;
020:        import java.util.Collection;
021:        import java.util.Iterator;
022:
023:        /**
024:         * <p>
025:         * Describes the interface for managing users and provides access to the
026:         * {@link User}.
027:         * </p>
028:         * 
029:         * @author <a href="mailto:dlestrat@apache.org">David Le Strat </a>
030:         */
031:        public interface UserManager {
032:            /**
033:             * @return the name of the anonymous user
034:             */
035:            String getAnonymousUser();
036:
037:            /**
038:             * <p>
039:             * Authenticate a user.
040:             * </p>
041:             * 
042:             * @param username The user name.
043:             * @param password The user password.
044:             * @return Whether or not a user is authenticated.
045:             */
046:            boolean authenticate(String username, String password);
047:
048:            /**
049:             * <p>
050:             * Add a new user provided a username and password.
051:             * </p>
052:             * 
053:             * @param username The user name.
054:             * @param password The password.
055:             * @throws Throws a security exception.
056:             */
057:            void addUser(String username, String password)
058:                    throws SecurityException;
059:
060:            /**
061:             * <p>
062:             * Add a new user provided a username and password in the specified authentication
063:             * provider store.
064:             * </p>
065:             * 
066:             * @param username The user name.
067:             * @param password The password.
068:             * @param atnProviderName The authentication provider name.
069:             * @throws Throws a security exception.
070:             */
071:            void addUser(String username, String password,
072:                    String atnProviderName) throws SecurityException;
073:
074:            /**
075:             * <p>
076:             * Import a new user with username and password and allow to bypass the enconding algorithm
077:             * </p>
078:             * 
079:             * @param username The user name.
080:             * @param password The password.
081:             * @param passThrough If true the provided password will not be validated/encoded
082:             * @throws Throws a security exception.
083:             */
084:            void importUser(String username, String password,
085:                    boolean passThrough) throws SecurityException;
086:
087:            /**
088:             * <p>
089:             * Import a new user with username and password in the specified authentication
090:             * provider store and allow to bypass the enconding algorithm
091:             * </p>
092:             * 
093:             * @param username The user name.
094:             * @param password The password.
095:             * @param atnProviderName The authentication provider name.
096:             * @param passThrough If true the provided password will not be validated/encoded
097:             * @throws Throws a security exception.
098:             */
099:            void importUser(String username, String password,
100:                    String atnProviderName, boolean passThrough)
101:                    throws SecurityException;
102:
103:            /**
104:             * <p>
105:             * Remove a user. If there is a {@link java.util.prefs.Preferences}node for
106:             * profile properties associated to this user, it will be removed as well.
107:             * </p>
108:             * <p>
109:             * {@link java.security.Permission}for this user will be removed as well.
110:             * </p>
111:             * 
112:             * @param username The user name.
113:             * @throws Throws a security exception.
114:             */
115:            void removeUser(String username) throws SecurityException;
116:
117:            /**
118:             * <p>
119:             * Whether or not a user exists.
120:             * </p>
121:             * 
122:             * @param username The user name.
123:             * @return Whether or not a user exists.
124:             */
125:            boolean userExists(String username);
126:
127:            /**
128:             * <p>
129:             * Get a {@link User}for a given username.
130:             * </p>
131:             * 
132:             * @param username The username.
133:             * @return The {@link User}.
134:             * @throws Throws a security exception if the user cannot be found.
135:             */
136:            User getUser(String username) throws SecurityException;
137:
138:            /**
139:             * <p>
140:             * An iterator of {@link User}finding users matching the corresponding
141:             * filter criteria.
142:             * </p>
143:             * TODO Complete filter implementation.
144:             * 
145:             * @param filter The filter used to retrieve matching users.
146:             * @return The Iterator of {@link User}.
147:             */
148:            Iterator getUsers(String filter) throws SecurityException;
149:
150:            /**
151:             * <p>
152:             * An iterator of user names, finding users matching the corresponding
153:             * filter criteria.
154:             * </p>
155:             * TODO Complete filter implementation.
156:             * 
157:             * @param filter The filter used to retrieve matching users.
158:             * @return The Iterator of {@link User}.
159:             */
160:            Iterator getUserNames(String filter) throws SecurityException;
161:
162:            /**
163:             * <p>
164:             * A collection of {@link User}for all the users in a specific role.
165:             * </p>
166:             * 
167:             * @param roleFullPathName The role name full path (e.g.
168:             *            theRoleName.theRoleNameChild).
169:             * @return A Collection of {@link User}.
170:             * @throws Throws a security exception if the role does not exist.
171:             */
172:            Collection getUsersInRole(String roleFullPathName)
173:                    throws SecurityException;
174:
175:            /**
176:             * <p>A collection of {@link User} for a specific group.</p>
177:             * @param groupFullPathName The group name full path
178:             *                          (e.g. theGroupName.theGroupChildName).
179:             * @return A collection of {@link User}.
180:             * @throws Throws security exception if the group does not exist.
181:             */
182:            Collection getUsersInGroup(String groupFullPathName)
183:                    throws SecurityException;
184:
185:            /**
186:             * <p>
187:             * Set the user password.
188:             * </p>
189:             * 
190:             * @param username The user name.
191:             * @param oldPassword The old password.
192:             * @param newPassword The new password.
193:             * @throws Throws a security exception.
194:             */
195:            void setPassword(String username, String oldPassword,
196:                    String newPassword) throws SecurityException;
197:
198:            /**
199:             * <p>
200:             * Set the update required state of the user password credential.
201:             * </p>
202:             * 
203:             * @param userName The user name.
204:             * @param updateRequired The update required state.
205:             * @throws Throws a security exception.
206:             */
207:            void setPasswordUpdateRequired(String userName,
208:                    boolean updateRequired) throws SecurityException;
209:
210:            /**
211:             * <p>
212:             * Set the enabled state of the user password credential.
213:             * </p>
214:             * 
215:             * @param userName The user name.
216:             * @param enabled The enabled state.
217:             * @throws Throws a security exception.
218:             */
219:            void setPasswordEnabled(String userName, boolean enabled)
220:                    throws SecurityException;
221:
222:            /**
223:             * Enable or disable a user.
224:             * @param userName The user name
225:             * @param enabled enabled flag for the user
226:             */
227:            void setUserEnabled(String userName, boolean enabled)
228:                    throws SecurityException;
229:
230:            /**
231:             * <p>
232:             * Set the expiration date and the expired flag of the password credential.</p>
233:             * <p>
234:             * If a date equal or before the current date is provided, the expired flag will be set to true,
235:             * otherwise to false.</p>
236:             * 
237:             * @param userName The user name.
238:             * @param expirationDate The expiration date to set.
239:             * @throws Throws a security exception.
240:             */
241:            void setPasswordExpiration(String userName, Date expirationDate)
242:                    throws SecurityException;
243:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.