[Castore-commits] AuthentificationFactory.java 1.3 1.4 FlatAuthentification.java 1.6 1.7 LdapAuthentification.java 1.5 1.6

Arnaud Thimel thimel at adullact1.hosting.cri74.org
Lun 24 Avr 19:49:16 CEST 2006


Update of /cvsroot/castore/castore-core/src/java/fr/emn/castor/users/authentification
In directory adullact1:/tmp/cvs-serv20262/src/java/fr/emn/castor/users/authentification

Modified Files:
	AuthentificationFactory.java FlatAuthentification.java 
	LdapAuthentification.java 
Log Message:
- Retrait des Iterator sur la facade des users
- Rajout de generics par endroits

Index: AuthentificationFactory.java
===================================================================
RCS file: /cvsroot/castore/castore-core/src/java/fr/emn/castor/users/authentification/AuthentificationFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AuthentificationFactory.java	23 Jan 2006 10:27:46 -0000	1.3
--- AuthentificationFactory.java	24 Apr 2006 17:49:14 -0000	1.4
***************
*** 40,44 ****
  package fr.emn.castor.users.authentification;
  
! import java.util.Collection;
  import java.util.Map;
  
--- 40,44 ----
  package fr.emn.castor.users.authentification;
  
! import java.util.List;
  import java.util.Map;
  
***************
*** 80,88 ****
       * La liste est sous la forme d'une collection de Map.
       * @param query la requete ( morceau de nom ou de prenom)
!      * @return une collection de Map contenant le nom entier et le login
       * de l'utilisateur.
!      * @throws AuthentificationException si une reeur survient.
       */
!     public abstract Collection searchUser(String query)
              throws AuthentificationException;
  
--- 80,88 ----
       * La liste est sous la forme d'une collection de Map.
       * @param query la requete ( morceau de nom ou de prenom)
!      * @return une liste de Map contenant le nom entier et le login
       * de l'utilisateur.
!      * @throws AuthentificationException si une erreur survient.
       */
!     public abstract List<Map<String, String>> searchUser(String query)
              throws AuthentificationException;
  

Index: FlatAuthentification.java
===================================================================
RCS file: /cvsroot/castore/castore-core/src/java/fr/emn/castor/users/authentification/FlatAuthentification.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FlatAuthentification.java	22 Mar 2006 09:56:03 -0000	1.6
--- FlatAuthentification.java	24 Apr 2006 17:49:14 -0000	1.7
***************
*** 43,48 ****
  import java.io.IOException;
  import java.util.ArrayList;
- import java.util.Collection;
  import java.util.HashMap;
  import java.util.Map;
  
--- 43,48 ----
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.HashMap;
+ import java.util.List;
  import java.util.Map;
  
***************
*** 276,283 ****
       * searchUser(java.lang.String)
       */
!     public final Collection<HashMap<String, String>> searchUser(
              final String query) throws AuthentificationException {
          // on doit chercher le ou les utilisateurs dans le fichier plat fourni
!         ArrayList<HashMap<String, String>> results = new ArrayList<HashMap<String, String>>();
          NodeList nodeList = null;
          try {
--- 276,284 ----
       * searchUser(java.lang.String)
       */
!     public final List<Map<String, String>> searchUser(
              final String query) throws AuthentificationException {
          // on doit chercher le ou les utilisateurs dans le fichier plat fourni
!         ArrayList<Map<String, String>> results =
!             new ArrayList<Map<String, String>>();
          NodeList nodeList = null;
          try {
***************
*** 292,296 ****
                  String tutorName = node
                      .getAttributes().getNamedItem("nom").getNodeValue();
!                 HashMap<String, String> result = new HashMap<String, String>();
                  result.put(UsersConstants.SEARCH_TUTOR_LOGIN, tutorLogin);
                  result.put(UsersConstants.SEARCH_TUTOR_NAME, tutorName);
--- 293,297 ----
                  String tutorName = node
                      .getAttributes().getNamedItem("nom").getNodeValue();
!                 Map<String, String> result = new HashMap<String, String>();
                  result.put(UsersConstants.SEARCH_TUTOR_LOGIN, tutorLogin);
                  result.put(UsersConstants.SEARCH_TUTOR_NAME, tutorName);

Index: LdapAuthentification.java
===================================================================
RCS file: /cvsroot/castore/castore-core/src/java/fr/emn/castor/users/authentification/LdapAuthentification.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LdapAuthentification.java	9 Mar 2006 11:05:22 -0000	1.5
--- LdapAuthentification.java	24 Apr 2006 17:49:14 -0000	1.6
***************
*** 41,47 ****
  
  import java.util.ArrayList;
- import java.util.Collection;
  import java.util.HashMap;
  import java.util.Hashtable;
  import java.util.Map;
  
--- 41,47 ----
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.Hashtable;
+ import java.util.List;
  import java.util.Map;
  
***************
*** 423,429 ****
  
      /**
!      * @see fr.emn.castor.users.authentification.AuthentificationFactory#searchUser(java.lang.String)
       */
!     public Collection searchUser(final String query)
              throws AuthentificationException {
          try {
--- 423,430 ----
  
      /**
!      * @see fr.emn.castor.users.authentification.AuthentificationFactory
!      * #searchUser(java.lang.String)
       */
!     public List<Map<String, String>> searchUser(final String query)
              throws AuthentificationException {
          try {
***************
*** 448,454 ****
              if (results == null || !(results.hasMore())) {
                  // on a pas trouve d'identifiant correspondant
!                 return new ArrayList();
              }
!             ArrayList resultList = new ArrayList();
              // on a trouvé des gens !
              while (results.hasMoreElements()) {
--- 449,456 ----
              if (results == null || !(results.hasMore())) {
                  // on a pas trouve d'identifiant correspondant
!                 return new ArrayList<Map<String, String>>();
              }
!             ArrayList<Map<String, String>> resultList =
!                 new ArrayList<Map<String, String>>();
              // on a trouvé des gens !
              while (results.hasMoreElements()) {
***************
*** 464,468 ****
                      if (attr != null) {
                          tutorLogin = (String) attr.get();
!                         HashMap result = new HashMap();
                          result.put(
                              UsersConstants.SEARCH_TUTOR_LOGIN, tutorLogin);
--- 466,471 ----
                      if (attr != null) {
                          tutorLogin = (String) attr.get();
!                         Map<String, String> result =
!                                 new HashMap<String, String>();
                          result.put(
                              UsersConstants.SEARCH_TUTOR_LOGIN, tutorLogin);




Plus d'informations sur la liste de diffusion Castore-commits