1 19 20 package org.openharmonise.dav.server.webservice; 21 22 import java.rmi.RemoteException ; 23 24 import org.openharmonise.dav.server.utils.*; 25 import org.openharmonise.rm.resources.users.User; 26 import org.openharmonise.rm.search.HarmoniseAnalyzer; 27 import org.openharmonise.rm.security.authentication.*; 28 29 30 38 public class UtilityService { 39 40 43 public UtilityService() { 44 super(); 45 } 46 47 48 54 public static String getUserPath(String sUserName) throws RemoteException { 55 String sDAVPath = null; 56 57 UserAuthenticator auth = UserAuthenticatorFactory.getAuthenticator(); 58 59 try { 60 User usr = auth.getUser(sUserName); 61 62 sDAVPath = HarmoniseNameResolver.getDAVPath(usr); 63 } catch (UserAuthenticationException e) { 64 throw new RemoteException (e.getLocalizedMessage(),e); 65 } catch (NameResolverException e) { 66 throw new RemoteException (e.getLocalizedMessage(),e); 67 } 68 69 return sDAVPath; 70 } 71 72 77 public static String [] getIndexerStopWords() { 78 return HarmoniseAnalyzer.getStopWords(); 79 } 80 81 } 82 | Popular Tags |