View Javadoc
1   /*
2    * Copyright (c) 2002-2017, Mairie de Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.plugins.selfregistration.business;
35  
36  import fr.paris.lutece.plugins.selfregistration.utils.SelfRegistrationUtils;
37  
38  import java.util.Hashtable;
39  import java.util.Properties;
40  
41  import javax.naming.Context;
42  import javax.naming.NamingEnumeration;
43  import javax.naming.NamingException;
44  import javax.naming.directory.Attribute;
45  import javax.naming.directory.Attributes;
46  import javax.naming.directory.BasicAttribute;
47  import javax.naming.directory.BasicAttributes;
48  import javax.naming.directory.DirContext;
49  import javax.naming.directory.InitialDirContext;
50  import javax.naming.directory.SearchResult;
51  
52  import javax.servlet.http.HttpServletRequest;
53  
54  
55  /**
56   *
57   * LdapUserDAO Class
58   *
59   */
60  public class LdapUserDAO implements ILdapUserDAO
61  {
62      // Properties
63      private static final String PROPERTY_CIVILITY_ITEMS_NUMBER = "selfregistration.civility.items.numbers";
64      private static final String PROPERTY_LABEL_CIVYLITY = "selfregistration.xpage.registration.civility";
65      private static final String PROPERTY_STREET_SUFFIX_ITEMS_NUMBER = "selfregistration.streetNumberSuffix.items.numbers";
66      private static final String PROPERTY_LABEL_STREET_SUFFIX = "selfregistration.xpage.registration.streetNumberSuffix";
67      private static final String PROPERTY_STREET_TYPE_ITEMS_NUMBER = "selfregistration.streetType.items.numbers";
68      private static final String PROPERTY_LABEL_STREET_TYPE = "selfregistration.xpage.registration.streetType";
69  
70      // Ldap properties
71      private static final String LDAP_CNX_POOL = "com.sun.jndi.ldap.connect.pool";
72      private static final String LDAP_CNX_POOL_MAXSIZE = "com.sun.jndi.ldap.connect.pool.maxsize";
73      private static final String LDAP_CNX_POOL_PREFSIZE = "com.sun.jndi.ldap.connect.pool.prefsize";
74      private static final String LDAP_CNX_POOL_TIMEOUT = "com.sun.jndi.ldap.connect.pool.timeout";
75      private static final String LDAP_ATTRIBUTE_UID = "ldap.attribute.uid";
76      private static final String LDAP_ATTRIBUTE_CN = "ldap.attribute.cn";
77      private static final String LDAP_ATTRIBUTE_OBJECT_CLASS = "ldap.attribute.objectClass";
78      private static final String LDAP_ATTRIBUTE_OBJECT_CLASS_PERSON = "ldap.attribute.objectClass.person";
79      private static final String LDAP_ATTRIBUTE_OBJECT_CLASS_TOP = "ldap.attribute.objectClass.top";
80      private static final String LDAP_ATTRIBUTE_OBJECT_CLASS_ORG_PERSON = "ldap.attribute.objectClass.orgPerson";
81      private static final String LDAP_ATTRIBUTE_OBJECT_CLASS_INET_ORG_PERSON = "ldap.attribute.objectClass.inetOrgPerson";
82      private static final String LDAP_ATTRIBUTE_OBJECT_CLASS_PARIS_PERSON = "ldap.attribute.objectClass.parisPerson";
83      private static final String LDAP_ATTRIBUTE_CIVILITY = "ldap.attribute.civility";
84      private static final String LDAP_ATTRIBUTE_LAST_NAME = "ldap.attribute.lastName";
85      private static final String LDAP_ATTRIBUTE_GIVEN_NAME = "ldap.attribute.givenName";
86      private static final String LDAP_ATTRIBUTE_EMAIL = "ldap.attribute.mail";
87      private static final String LDAP_ATTRIBUTE_PASSWD = "ldap.attribute.userPassword";
88      private static final String LDAP_ATTRIBUTE_PHONE_NUMBER = "ldap.attribute.phoneNumber";
89      private static final String LDAP_ATTRIBUTE_STREET_NUMBER = "ldap.attribute.streetNumber";
90      private static final String LDAP_ATTRIBUTE_STREET_NUMBER_SUFFIX = "ldap.attribute.streetNumberSuffix";
91      private static final String LDAP_ATTRIBUTE_STREET_TYPE = "ldap.attribute.streetType";
92      private static final String LDAP_ATTRIBUTE_STREET = "ldap.attribute.streetName";
93      private static final String LDAP_ATTRIBUTE_DISTRICT_NUMBER = "ldap.attribute.districtNumber";
94      private static final String LDAP_ATTRIBUTE_POSTAL_CODE = "ldap.attribute.postalCode";
95      private static final String LDAP_ATTRIBUTE_STATE_PROV = "ldap.attribute.stateProv";
96      private static final String LDAP_ATTRIBUTE_CITY = "ldap.attribute.city";
97      private static final String LDAP_ATTRIBUTE_COUNTRY = "ldap.attribute.country";
98      private String _strContextFactory;
99      private String _strProviderUrl;
100     private String _strOu;
101     private String _strSecurityAuthentication;
102     private String _strLogin;
103     private String _strPassword;
104     private String _strPoolMaxSize;
105     private String _strPoolPrefSize;
106     private String _strPoolTimeout;
107     private Properties _ldapAttributes;
108 
109     /**
110      * Open connexion to the ldap
111      * @return the ldap context
112      * @throws NamingException the namming exception
113      */
114     public DirContext openConnexion(  ) throws NamingException
115     {
116         Hashtable ldapEnv = new Hashtable(  );
117         ldapEnv.put( Context.INITIAL_CONTEXT_FACTORY, getContextFactory(  ) );
118         ldapEnv.put( Context.PROVIDER_URL, getProviderUrl(  ) );
119         ldapEnv.put( Context.SECURITY_AUTHENTICATION, getSecurityAuthentication(  ) );
120         ldapEnv.put( Context.SECURITY_PRINCIPAL, getLogin(  ) );
121         ldapEnv.put( Context.SECURITY_CREDENTIALS, getPassword(  ) );
122         ldapEnv.put( LDAP_CNX_POOL, Boolean.TRUE.toString(  ) );
123         ldapEnv.put( LDAP_CNX_POOL_MAXSIZE, getPoolMaxSize(  ) );
124         ldapEnv.put( LDAP_CNX_POOL_PREFSIZE, getPoolPrefSize(  ) );
125         ldapEnv.put( LDAP_CNX_POOL_TIMEOUT, getPoolTimeout(  ) );
126 
127         DirContext ldapContext = new InitialDirContext( ldapEnv );
128 
129         return ldapContext;
130     }
131 
132     /**
133      * Close connexion to the ldap
134      * @param ldapContext the ldap context
135      * @throws NamingException the namming exception
136      */
137     public void closeConnexion( DirContext ldapContext )
138         throws NamingException
139     {
140         ldapContext.close(  );
141     }
142 
143     /**
144      * Add an user into the ldap
145      * @param ldapUser the user to add in ldap
146      * @throws NamingException the namming exception
147      */
148     public void registration( LdapUser ldapUser ) throws NamingException
149     {
150         Attributes attributes = getAttributes( ldapUser, false );
151 
152         DirContext ldapContext = openConnexion(  );
153         ldapContext.createSubcontext( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_UID ) + "=" +
154             ldapUser.getMail(  ) + "," + _strOu, attributes );
155         closeConnexion( ldapContext );
156     }
157 
158     /**
159      * Test if user exist
160      * @param strUid the uid of user
161      * @return true if user exist
162      * @throws NamingException the namming exception
163      */
164     public boolean uidExit( String strUid ) throws NamingException
165     {
166         NamingEnumeration objs = null;
167 
168         BasicAttributes searchAttrs = new BasicAttributes(  );
169         searchAttrs.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_UID ), strUid );
170 
171         DirContext ldapContext = openConnexion(  );
172         objs = ldapContext.search( _strOu, searchAttrs );
173         closeConnexion( ldapContext );
174 
175         return objs.hasMoreElements(  );
176     }
177 
178     /**
179      * check if the Old Password equals the password associete to the uid
180      * @param strUid the uid of user
181      * @param strOldPassword the password to check
182      * @return true if the Old Password equals the password associete to the uid
183      * @throws NamingException the namming exception
184      */
185     public boolean checkOldPassword( String strUid, String strOldPassword )
186         throws NamingException
187     {
188         NamingEnumeration objs = null;
189 
190         BasicAttributes searchAttrs = new BasicAttributes(  );
191         searchAttrs.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_UID ), strUid );
192         searchAttrs.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_PASSWD ), strOldPassword );
193 
194         DirContext ldapContext = openConnexion(  );
195         objs = ldapContext.search( _strOu, searchAttrs );
196         closeConnexion( ldapContext );
197 
198         return objs.hasMoreElements(  );
199     }
200 
201     /**
202      * Return the ldapuser if exist
203      * @param strUid the uid of user
204      * @param request the http request
205      * @return the ldap user if exist null other
206      * @throws NamingException the namming exception
207      */
208     public LdapUser getLdapUserByUid( HttpServletRequest request, String strUid )
209         throws NamingException
210     {
211         NamingEnumeration objs = null;
212 
213         BasicAttributes searchAttrs = new BasicAttributes(  );
214         searchAttrs.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_UID ), strUid );
215 
216         DirContext ldapContext = openConnexion(  );
217         objs = ldapContext.search( _strOu, searchAttrs );
218         closeConnexion( ldapContext );
219 
220         if ( objs.hasMoreElements(  ) )
221         {
222             SearchResult match = (SearchResult) objs.nextElement(  );
223 
224             return createLdapUser( request, match.getAttributes(  ) );
225         }
226         else
227         {
228             return null;
229         }
230     }
231 
232     /**
233      * Modify the attribute of the ldapUser in the ldap
234      * @param ldapUser the ldapUser
235      * @throws NamingException the namming exception
236      */
237     public void modification( LdapUser ldapUser ) throws NamingException
238     {
239         Attributes attributes = getAttributes( ldapUser, true );
240 
241         DirContext ldapContext = openConnexion(  );
242         ldapContext.modifyAttributes( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_UID ) + "=" +
243             ldapUser.getMail(  ) + "," + _strOu, DirContext.REPLACE_ATTRIBUTE, attributes );
244     }
245 
246     /**
247      * Create and build a LdapUIser with attributes
248      * @param request the http request
249      * @param attrs the ldap Attributes
250      * @return return an instance of LdapUser
251      * @throws NamingException the namming exception
252      */
253     private LdapUser createLdapUser( HttpServletRequest request, Attributes attrs )
254         throws NamingException
255     {
256         LdapUser ldapUser = new LdapUser(  );
257         ldapUser.setTitleLabel( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_CIVILITY ) ).get(  ) );
258 
259         if ( ldapUser.getTitleLabel(  ) != null )
260         {
261             String strTitleCode = SelfRegistrationUtils.getCodeOfLabel( request, PROPERTY_CIVILITY_ITEMS_NUMBER,
262                     PROPERTY_LABEL_CIVYLITY, ldapUser.getTitleLabel(  ) );
263             ldapUser.setTitle( strTitleCode );
264         }
265 
266         ldapUser.setSn( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_LAST_NAME ) ).get(  ) );
267         ldapUser.setGivenName( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_GIVEN_NAME ) ).get(  ) );
268         ldapUser.setMail( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_EMAIL ) ).get(  ) );
269 
270         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_PHONE_NUMBER ) ) != null )
271         {
272             ldapUser.setTelephoneNumber( (String) attrs.get( getLdapAttributes(  )
273                                                                  .getProperty( LDAP_ATTRIBUTE_PHONE_NUMBER ) ).get(  ) );
274         }
275 
276         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STREET_NUMBER ) ) != null )
277         {
278             ldapUser.setStreetNumber( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STREET_NUMBER ) )
279                                                     .get(  ) );
280         }
281 
282         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STREET_NUMBER_SUFFIX ) ) != null )
283         {
284             ldapUser.setStreetNumberSuffixLabel( (String) attrs.get( getLdapAttributes(  )
285                                                                          .getProperty( LDAP_ATTRIBUTE_STREET_NUMBER_SUFFIX ) )
286                                                                .get(  ) );
287         }
288 
289         if ( ldapUser.getStreetNumberSuffixLabel(  ) != null )
290         {
291             String strStreetNumberSuffixCode = SelfRegistrationUtils.getCodeOfLabel( request,
292                     PROPERTY_STREET_SUFFIX_ITEMS_NUMBER, PROPERTY_LABEL_STREET_SUFFIX,
293                     ldapUser.getStreetNumberSuffixLabel(  ) );
294             ldapUser.setStreetNumberSuffix( strStreetNumberSuffixCode );
295         }
296 
297         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STREET_TYPE ) ) != null )
298         {
299             ldapUser.setStreetTypeLabel( (String) attrs.get( getLdapAttributes(  )
300                                                                  .getProperty( LDAP_ATTRIBUTE_STREET_TYPE ) ).get(  ) );
301         }
302 
303         if ( ldapUser.getStreetTypeLabel(  ) != null )
304         {
305             String strStreetTypeCode = SelfRegistrationUtils.getCodeOfLabel( request,
306                     PROPERTY_STREET_TYPE_ITEMS_NUMBER, PROPERTY_LABEL_STREET_TYPE, ldapUser.getStreetTypeLabel(  ) );
307             ldapUser.setStreetType( strStreetTypeCode );
308         }
309 
310         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STREET ) ) != null )
311         {
312             ldapUser.setStreet( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STREET ) ).get(  ) );
313         }
314 
315         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_DISTRICT_NUMBER ) ) != null )
316         {
317             ldapUser.setDistrictNumber( (String) attrs.get( getLdapAttributes(  )
318                                                                 .getProperty( LDAP_ATTRIBUTE_DISTRICT_NUMBER ) ).get(  ) );
319         }
320 
321         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_POSTAL_CODE ) ) != null )
322         {
323             ldapUser.setPostalCode( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_POSTAL_CODE ) )
324                                                   .get(  ) );
325         }
326 
327         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_CITY ) ) != null )
328         {
329             ldapUser.setLn( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_CITY ) ).get(  ) );
330         }
331 
332         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STATE_PROV ) ) != null )
333         {
334             ldapUser.setSt( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_STATE_PROV ) ).get(  ) );
335         }
336 
337         if ( attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_COUNTRY ) ) != null )
338         {
339             ldapUser.setCo( (String) attrs.get( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_COUNTRY ) ).get(  ) );
340         }
341 
342         return ldapUser;
343     }
344 
345     /**
346      * return the ldap user on the Attributes
347      * @param ldapUser the ldap user
348      * @param isModification creation or modification
349      * @return the attributes of the ldap user
350      */
351     private Attributes getAttributes( LdapUser ldapUser, boolean isModification )
352     {
353         Attributes attributes = new BasicAttributes(  );
354 
355         attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_CN ),
356             ldapUser.getSn(  ) + " " + ldapUser.getGivenName(  ) );
357 
358         Attribute classes = new BasicAttribute( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_OBJECT_CLASS ) );
359         classes.add( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_OBJECT_CLASS_PERSON ) );
360         classes.add( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_OBJECT_CLASS_TOP ) );
361         classes.add( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_OBJECT_CLASS_ORG_PERSON ) );
362         classes.add( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_OBJECT_CLASS_INET_ORG_PERSON ) );
363         classes.add( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_OBJECT_CLASS_PARIS_PERSON ) );
364 
365         attributes.put( classes );
366         attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_CIVILITY ), ldapUser.getTitleLabel(  ) );
367         attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_LAST_NAME ), ldapUser.getSn(  ) );
368         attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_GIVEN_NAME ), ldapUser.getGivenName(  ) );
369         attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_EMAIL ), ldapUser.getMail(  ) );
370 
371         if ( ( ldapUser.getPasswd(  ) != null ) && !ldapUser.getPasswd(  ).equals( "" ) )
372         {
373             attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_PASSWD ), ldapUser.getPasswd(  ) );
374         }
375 
376         putAttribute( attributes, LDAP_ATTRIBUTE_PHONE_NUMBER, ldapUser.getTelephoneNumber(  ), isModification );
377         putAttribute( attributes, LDAP_ATTRIBUTE_STREET_NUMBER, ldapUser.getStreetNumber(  ), isModification );
378         putAttribute( attributes, LDAP_ATTRIBUTE_STREET_NUMBER_SUFFIX, ldapUser.getStreetNumberSuffixLabel(  ),
379             isModification );
380         putAttribute( attributes, LDAP_ATTRIBUTE_STREET_TYPE, ldapUser.getStreetTypeLabel(  ), isModification );
381         putAttribute( attributes, LDAP_ATTRIBUTE_STREET, ldapUser.getStreet(  ), isModification );
382 
383         if ( ( ldapUser.getDistrictNumber(  ) != null ) && !ldapUser.getDistrictNumber(  ).equals( "0" ) )
384         {
385             attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_DISTRICT_NUMBER ),
386                 ldapUser.getDistrictNumber(  ) );
387         }
388         else if ( isModification )
389         {
390             attributes.put( getLdapAttributes(  ).getProperty( LDAP_ATTRIBUTE_DISTRICT_NUMBER ), null );
391         }
392 
393         putAttribute( attributes, LDAP_ATTRIBUTE_POSTAL_CODE, ldapUser.getPostalCode(  ), isModification );
394         putAttribute( attributes, LDAP_ATTRIBUTE_CITY, ldapUser.getLn(  ), isModification );
395         putAttribute( attributes, LDAP_ATTRIBUTE_STATE_PROV, ldapUser.getSt(  ), isModification );
396         putAttribute( attributes, LDAP_ATTRIBUTE_COUNTRY, ldapUser.getCo(  ), isModification );
397 
398         return attributes;
399     }
400 
401     /**
402      *
403      * @param attributes the list attribute for put
404      * @param attribute the attribute to put
405      * @param strValue the value to put
406      * @param isModification creation or modification
407      */
408     private void putAttribute( Attributes attributes, String attribute, String strValue, boolean isModification )
409     {
410         if ( ( strValue != null ) && !strValue.equals( "" ) )
411         {
412             attributes.put( getLdapAttributes(  ).getProperty( attribute ), strValue );
413         }
414         else if ( isModification )
415         {
416             attributes.put( getLdapAttributes(  ).getProperty( attribute ), null );
417         }
418     }
419 
420     /**
421      * @return the _strLogin
422      */
423     public String getLogin(  )
424     {
425         return _strLogin;
426     }
427 
428     /**
429      * @param strLogin the _strLogin to set
430      */
431     public void setLogin( String strLogin )
432     {
433         _strLogin = strLogin;
434     }
435 
436     /**
437      * @return the _strPassword
438      */
439     public String getPassword(  )
440     {
441         return _strPassword;
442     }
443 
444     /**
445      * @param strPassword the _strPassword to set
446      */
447     public void setPassword( String strPassword )
448     {
449         _strPassword = strPassword;
450     }
451 
452     /**
453      * @return the _strContextFactory
454      */
455     public String getContextFactory(  )
456     {
457         return _strContextFactory;
458     }
459 
460     /**
461      * @param strContextFactory the _strContextFactory to set
462      */
463     public void setContextFactory( String strContextFactory )
464     {
465         _strContextFactory = strContextFactory;
466     }
467 
468     /**
469      * @return the _strPoolMaxSize
470      */
471     public String getPoolMaxSize(  )
472     {
473         return _strPoolMaxSize;
474     }
475 
476     /**
477      * @param strPoolMaxSize the _strPoolMaxSize to set
478      */
479     public void setPoolMaxSize( String strPoolMaxSize )
480     {
481         _strPoolMaxSize = strPoolMaxSize;
482     }
483 
484     /**
485      * @return the _strPoolPrefSize
486      */
487     public String getPoolPrefSize(  )
488     {
489         return _strPoolPrefSize;
490     }
491 
492     /**
493      * @param strPoolPrefSize the _strPoolPrefSize to set
494      */
495     public void setPoolPrefSize( String strPoolPrefSize )
496     {
497         _strPoolPrefSize = strPoolPrefSize;
498     }
499 
500     /**
501      * @return the _strPoolTimeout
502      */
503     public String getPoolTimeout(  )
504     {
505         return _strPoolTimeout;
506     }
507 
508     /**
509      * @param strPoolTimeout the _strPoolTimeout to set
510      */
511     public void setPoolTimeout( String strPoolTimeout )
512     {
513         _strPoolTimeout = strPoolTimeout;
514     }
515 
516     /**
517      * @return the _strProviderUrl
518      */
519     public String getProviderUrl(  )
520     {
521         return _strProviderUrl;
522     }
523 
524     /**
525      * @param strProviderUrl the _strProviderUrl to set
526      */
527     public void setProviderUrl( String strProviderUrl )
528     {
529         _strProviderUrl = strProviderUrl;
530     }
531 
532     /**
533      * @return the _strSecurityAuthentication
534      */
535     public String getSecurityAuthentication(  )
536     {
537         return _strSecurityAuthentication;
538     }
539 
540     /**
541      * @param strSecurityAuthentication the _strSecurityAuthentication to set
542      */
543     public void setSecurityAuthentication( String strSecurityAuthentication )
544     {
545         _strSecurityAuthentication = strSecurityAuthentication;
546     }
547 
548     /**
549      * @return the _strOu
550      */
551     public String getOu(  )
552     {
553         return _strOu;
554     }
555 
556     /**
557      * @param strOu the _strOu to set
558      */
559     public void setOu( String strOu )
560     {
561         _strOu = strOu;
562     }
563 
564     /**
565      * @return the ldapAttributes
566      */
567     public Properties getLdapAttributes(  )
568     {
569         return _ldapAttributes;
570     }
571 
572     /**
573      * @param ldapAttributes the ldapAttributes to set
574      */
575     public void setLdapAttributes( Properties ldapAttributes )
576     {
577         _ldapAttributes = ldapAttributes;
578     }
579 }