KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > security > authentication > ntlm > NullMutableAuthenticationDao


1 /*
2  * Copyright (C) 2006 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.security.authentication.ntlm;
18
19 import java.util.Date JavaDoc;
20
21 import net.sf.acegisecurity.UserDetails;
22 import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
23
24 import org.alfresco.error.AlfrescoRuntimeException;
25 import org.alfresco.repo.security.authentication.AuthenticationException;
26 import org.alfresco.repo.security.authentication.MutableAuthenticationDao;
27 import org.alfresco.service.cmr.repository.NodeService;
28 import org.alfresco.service.cmr.repository.StoreRef;
29 import org.springframework.dao.DataAccessException;
30
31 /**
32  * Null Mutable Authentication Dao Class
33  *
34  * <p>Mutable authentication implementation that does nothing.
35  *
36  * @author GKSpencer
37  */

38 public class NullMutableAuthenticationDao implements MutableAuthenticationDao
39 {
40     // Node service
41

42     private NodeService m_nodeService;
43     
44     /**
45      * Set the node service
46      *
47      * @param nodeService NodeService
48      */

49     public void setNodeService(NodeService nodeService)
50     {
51         m_nodeService = nodeService;
52     }
53     
54     /**
55      * Create a user with the given userName and password
56      *
57      * @param userName
58      * @param rawPassword
59      * @throws AuthenticationException
60      */

61     public void createUser(String JavaDoc userName, char[] rawPassword) throws AuthenticationException
62     {
63         throw new AlfrescoRuntimeException("Not implemented");
64         
65         // Nothing to do
66
}
67     
68     /**
69      * Update a user's password.
70      *
71      * @param userName
72      * @param rawPassword
73      * @throws AuthenticationException
74      */

75     public void updateUser(String JavaDoc userName, char[] rawPassword) throws AuthenticationException
76     {
77         throw new AlfrescoRuntimeException("Not implemented");
78         
79         // Nothing to do
80
}
81     
82     /**
83      * Delete a user.
84      *
85      * @param userName
86      * @throws AuthenticationException
87      */

88     public void deleteUser(String JavaDoc userName) throws AuthenticationException
89     {
90         throw new AlfrescoRuntimeException("Not implemented");
91         
92         // Nothing to do
93
}
94     
95     /**
96      * Check is a user exists.
97      *
98      * @param userName
99      * @return
100      */

101     public boolean userExists(String JavaDoc userName)
102     {
103         return true;
104     }
105     
106     /**
107      * Enable/disable a user.
108      *
109      * @param userName
110      * @param enabled
111      */

112     public void setEnabled(String JavaDoc userName, boolean enabled)
113     {
114         throw new AlfrescoRuntimeException("Not implemented");
115         
116         // Nothing to do
117
}
118     
119     /**
120      * Getter for user enabled
121      *
122      * @param userName
123      * @return
124      */

125     public boolean getEnabled(String JavaDoc userName)
126     {
127         throw new AlfrescoRuntimeException("Not implemented");
128         
129 // return true;
130
}
131     
132     /**
133      * Set if the account should expire
134      *
135      * @param userName
136      * @param expires
137      */

138     public void setAccountExpires(String JavaDoc userName, boolean expires)
139     {
140         throw new AlfrescoRuntimeException("Not implemented");
141         
142         // Nothing to do
143
}
144     
145     /**
146      * Does the account expire?
147      *
148      * @param userName
149      * @return
150      */

151             
152     public boolean getAccountExpires(String JavaDoc userName)
153     {
154         throw new AlfrescoRuntimeException("Not implemented");
155         
156 // return false;
157
}
158     
159     /**
160      * Has the account expired?
161      *
162      * @param userName
163      * @return
164      */

165     public boolean getAccountHasExpired(String JavaDoc userName)
166     {
167         throw new AlfrescoRuntimeException("Not implemented");
168         
169 // return false;
170
}
171   
172     /**
173      * Set if the password expires.
174      *
175      * @param userName
176      * @param expires
177      */

178     public void setCredentialsExpire(String JavaDoc userName, boolean expires)
179     {
180         throw new AlfrescoRuntimeException("Not implemented");
181         
182         // Nothing to do
183
}
184   
185     /**
186      * Do the credentials for the user expire?
187      *
188      * @param userName
189      * @return
190      */

191     public boolean getCredentialsExpire(String JavaDoc userName)
192     {
193         throw new AlfrescoRuntimeException("Not implemented");
194         
195 // return false;
196
}
197     
198     /**
199      * Have the credentials for the user expired?
200      *
201      * @param userName
202      * @return
203      */

204     public boolean getCredentialsHaveExpired(String JavaDoc userName)
205     {
206         throw new AlfrescoRuntimeException("Not implemented");
207         
208 // return false;
209
}
210     
211     /**
212      * Set if the account is locked.
213      *
214      * @param userName
215      * @param locked
216      */

217     public void setLocked(String JavaDoc userName, boolean locked)
218     {
219         throw new AlfrescoRuntimeException("Not implemented");
220         
221         // Nothing to do
222
}
223     
224     /**
225      * Is the account locked?
226      *
227      * @param userName
228      * @return
229      */

230     public boolean getAccountlocked(String JavaDoc userName)
231     {
232         throw new AlfrescoRuntimeException("Not implemented");
233         
234 // return false;
235
}
236     
237     /**
238      * Set the date on which the account expires
239      *
240      * @param userName
241      * @param exipryDate
242      */

243     public void setAccountExpiryDate(String JavaDoc userName, Date JavaDoc exipryDate)
244     {
245         throw new AlfrescoRuntimeException("Not implemented");
246         
247         // Nothing to do
248
}
249     
250     /**
251      * Get the date when this account expires.
252      *
253      * @param userName
254      * @return
255      */

256     public Date JavaDoc getAccountExpiryDate(String JavaDoc userName)
257     {
258         throw new AlfrescoRuntimeException("Not implemented");
259         
260 // return null;
261
}
262     
263     /**
264      * Set the date when credentials expire.
265      *
266      * @param userName
267      * @param exipryDate
268      */

269     public void setCredentialsExpiryDate(String JavaDoc userName, Date JavaDoc exipryDate)
270     {
271         throw new AlfrescoRuntimeException("Not implemented");
272         
273         // Nothing to do
274
}
275     
276     /**
277      * Get the date when the credentials/password expire.
278      *
279      * @param userName
280      * @return
281      */

282     public Date JavaDoc getCredentialsExpiryDate(String JavaDoc userName)
283     {
284         throw new AlfrescoRuntimeException("Not implemented");
285         
286 // return null;
287
}
288     
289     /**
290      * Get the MD4 password hash
291      *
292      * @param userName
293      * @return
294      */

295     public String JavaDoc getMD4HashedPassword(String JavaDoc userName)
296     {
297         throw new AlfrescoRuntimeException("Not implemented");
298         
299 // return null;
300
}
301     
302     /**
303      * Are user names case sensitive?
304      *
305      * @return
306      */

307     public boolean getUserNamesAreCaseSensitive()
308     {
309         throw new AlfrescoRuntimeException("Not implemented");
310         
311 // return false;
312
}
313
314     /**
315      * Return the user details for the specified user
316      *
317      * @param user String
318      * @return UserDetails
319      * @exception UsernameNotFoundException
320      * @exception DataAccessException
321      */

322     public UserDetails loadUserByUsername(String JavaDoc arg0) throws UsernameNotFoundException, DataAccessException
323     {
324         throw new AlfrescoRuntimeException("Not implemented");
325         
326 // return null;
327
}
328
329     /**
330      * Return salt for user
331      *
332      * @param user UserDetails
333      * @return Object
334      */

335     public Object JavaDoc getSalt(UserDetails user)
336     {
337         throw new AlfrescoRuntimeException("Not implemented");
338         
339 // return null;
340
}
341 }
342
Popular Tags